com.github.jengelman.gradle.plugins.shadow.internal.JavaJarExec.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shadow-gradle-plugin Show documentation
Show all versions of shadow-gradle-plugin Show documentation
Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.
package com.github.jengelman.gradle.plugins.shadow.internal
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.JavaExec
import org.gradle.api.tasks.TaskAction
internal abstract class JavaJarExec : JavaExec() {
@get:InputFile
abstract val jarFile: RegularFileProperty
@TaskAction
override fun exec() {
val allArgs = buildList {
add(jarFile.get().asFile.path)
// Must cast args to List here to avoid type mismatch.
addAll(args as List)
}
setArgs(allArgs)
super.exec()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy