I'm looking to compile and distribute simple scripts. I'm currently doing this with Groovy and if Groovy is already installed, it's very simple for a user to run the scripts. I would like to do the same kind of thing with Kotlin. Since Kotlin is compiled like Java, all the user needs is to have the JVM installed.
My requirement is for a minimal compilation and execution format. No IDE, XML, Ant, Maven, long classpath, etc. Ideally I would distribute a single .class file. Can the Kotlin runtime be included in a single class file or does the runtime need to be distributed as a seperate file?
So, for a simple HelloWorld script, what parms should I use on the kotlinc command and the java command to execute the script?