Created
September 4, 2020 09:48
-
-
Save dryrain39/3b1bd04e86bbdb37f10be1b98f2392ad to your computer and use it in GitHub Desktop.
fatjar
This file contains 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
jar { | |
manifest { | |
attributes("Manifest-Version": "1.0", | |
"Main-Class": "your.package.name.HelloWorldApplication"); | |
} | |
} | |
task fatJar(type: Jar) { | |
manifest.from jar.manifest | |
classifier = 'all' | |
from { | |
configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } | |
} { | |
exclude "META-INF/*.SF" | |
exclude "META-INF/*.DSA" | |
exclude "META-INF/*.RSA" | |
} | |
with jar | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment