Notes:
- The file name has to end in
.main.ktsandkotlin-main-kts.jarhas 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
ideafolder next to the.ktsfile - save
build.gradleto that folder - import the project from
idea/build.gradle.