Hi, I'm searching for a way to package a Kotlin executable JAR built with Gradle to distribute it to user. I managed to do it with shadowJar, but that means pushing multiple megabytes to CI/CD, when all the dependencies are already in maven repositories... It sounds like there should be a way to have the user automatically download all of those directly?
My ultimate aim is to have a small bash/shell script that I could distribute, that would download everything and run it with the correct classpath
m
mbonnin
10/23/2020, 10:28 PM
I'd love to have an easy way to distribute executable jar files. The closest I have found is to distribute a
.main.kts
file that would download the depdendencies
mbonnin
10/23/2020, 10:29 PM
It'll require users to have kotlin installed on their machine
c
CLOVIS
10/24/2020, 8:13 AM
How do you do this? I've tried with kscript, but currently the dependency download is completely broken
m
mbonnin
10/24/2020, 10:31 PM
Name a file
something.main.kts
and Kotlin 1.3.72+ can execute it
mbonnin
10/24/2020, 10:32 PM
The dependency download is also broken but in different ways than kscript 🙈 so it might suit you better