What’s current modern way to make a fat-jar, jar-j...
# random
o
What’s current modern way to make a fat-jar, jar-jar, shadow-jar with gradle? That is, a single jar with all the dependencies and manifest?
f
by letting spring boot handle it 😛
t
gradle application plugin I believe can do it in a decent way
k
I second the
application
plugin, it works without any configuration and it can even generate a runner script for Windows and Linux/iOS.
t
probably depends on if you actually need it to shade things for further downstream consumption
o
Thanks, will check it
g
No, application plugin cannot build fat jar. It creates runnable distribution, but there are many jars and shell runner. If you want to build single runnable jar distribution you need shadow plugin + default application plugin to make it runnable - http://imperceptiblethoughts.com/shadow/
👍 1
n
I concur with Andrey on the Shadow plugin, which also works fine with Gradle Kotlin DSL. 😄
g
Yeah, and it’s most mature and featureful plugin for this case imho