jdemeulenaere
08/16/2019, 8:15 AMlouiscad
08/16/2019, 9:04 AMkotlinc
binary, you just need to add the -script
option.jdemeulenaere
08/16/2019, 10:38 AMlouiscad
08/16/2019, 10:53 AMkotlinc
binary? (Sorry, that's what I meant when I wrote kotlin
, forgot the c
) I'm not sure how a jar
would work for the compiler, because kotlin scripts need to be compiled, and that happens with kotlinc
, not a magic dependency.jdemeulenaere
08/16/2019, 11:01 AMlouiscad
08/16/2019, 11:51 AMkotlinc
. I just checked by downloading the file kotlin-compiler-1.3.41.zip
(43.5 MB) from that release page, opened its bin
directory, created a sample script with println("Hello World!")
as its code, then running ./kotlinc -script hello\ world.kts
printed the result in the terminal.
javac
is not a .jar
, cmake
isn't either, and for kotlinc
, it's a binary as well.
By curiosity though, I looked at the sibling directory named lib
, and found a file named kotlin-scripting-compiler.jar
. This is all available in the zip file aforementioned. Nothing seems to be missing.jdemeulenaere
08/16/2019, 12:29 PMjdemeulenaere
08/16/2019, 12:30 PMlouiscad
08/16/2019, 12:53 PMlouiscad
08/16/2019, 12:55 PMilya.chernikov
08/16/2019, 1:56 PMkotlinc
release is a distribution of the command-line compiler with standard library, all the other jars there are included because they are needed for the compiler or compiler plugins (including scripting plugin).
Jars/libraries that are intended to be used by the user’s applications are officially distributed via Maven Central. The kotlin-scripting-jvm-host
is exactly one of these, but definitely not the only one of the scripting libs.
And it is definitely recommended to use jars from Maven Central, if you are building your apps with scripting.jdemeulenaere
08/17/2019, 9:32 AM