Notes:
- The file name has to end in
.main.kts
andkotlin-main-kts.jar
has to be on classpath. See https://youtrack.jetbrains.com/issue/KT-27853 - Transitive dependencies have to be explicitly listed, and version conflicts manually resolved by hard-coding the right versions.
kotlinc
: https://kotlinlang.org/docs/tutorials/command-line.html
To edit this in IntelliJ IDEA:
- create and
idea
folder next to the.kts
file - save
build.gradle
to that folder - import the project from
idea/build.gradle
.