All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.jengelman.gradle.plugins.shadow.internal.JavaJarExec.kt Maven / Gradle / Ivy

Go to download

Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.

There is a newer version: 9.0.0-beta4
Show newest version
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