Created
August 22, 2018 08:17
-
-
Save Renkai/58ec2272f3d614baa8fdb4e3778481a1 to your computer and use it in GitHub Desktop.
create fat jar with gradle kotlin dsl
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
tasks.create<Jar>("fatJar") { | |
appendix = "fat" | |
setDuplicatesStrategy(DuplicatesStrategy.FAIL) | |
manifest { | |
attributes(mapOf("Main-Class" to "Main")) // replace it with your own | |
} | |
val sourceMain = java.sourceSets["main"] | |
from(sourceMain.output) | |
configurations.runtimeClasspath.filter { | |
it.name.endsWith(".jar") | |
}.forEach { jar -> | |
from(zipTree(jar)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not worked for me in case smallrye microprofile...
I found, that this one is working as expected: