Created
August 30, 2019 19:14
-
-
Save nubunto/cf9270a2a797902ae942b555c5ebfe8d to your computer and use it in GitHub Desktop.
Gradle Kotlin FatJar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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