Gradle/Kotlin JVM projects are just a five short lines away from building self-contained, executable .jars, using the application and Shadow Gradle plugins:

From a Kotlin project template

After reading quite a few articles with much longer solutions, I was pleasantly surprised to see it was really this easy. Note that the Shadow plugin doesn’t have to be configured at all — it relies on the application plugin to figure out the details, and in particular the main class.

Jason Dusek

the lyf so short, the craft so long to lerne

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store