Skip to content

Instantly share code, notes, and snippets.

@nubunto
Created August 30, 2019 19:14
Show Gist options
  • Save nubunto/cf9270a2a797902ae942b555c5ebfe8d to your computer and use it in GitHub Desktop.
Save nubunto/cf9270a2a797902ae942b555c5ebfe8d to your computer and use it in GitHub Desktop.
Gradle Kotlin FatJar
val fatJar = task("fatJar", type = Jar::class) {
baseName = "${project.name}-fat"
manifest {
attributes["Implementation-Title"] = "Gradle Jar File Example"
attributes["Implementation-Version"] = "1.0.0"
attributes["Main-Class"] = "com.ignite.demo.App"
}
from(configurations.runtimeClasspath.get().map({ if (it.isDirectory) it else zipTree(it) }))
with(tasks.jar.get() as CopySpec)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment