Hi, just out of curiosity. If i would like to make...
# scripting
k
Hi, just out of curiosity. If i would like to make a simple script but with external dependencies - is it plausible to load them form maven and import ?
n
if you know exactly which dependencies then it is easy, if you want them to be added via annotation it is still easy, in the tests for scirpting such a annotation should actaully already be in use .. for maven dependencies
k
Do you know where i could find some examples? I would love to play with it.
n
i actually cannot fnd it right now.. you might have to roll your own or bundle the dependecies you want to use with your script as a shadowJar
g
If i would like to make a simple script but with external dependencies
Do you mean just standalone kts file with dependencies? There is an experimental solution for that based on new scripting support https://blog.jetbrains.com/kotlin/2018/09/kotlin-1-3-rc-is-here-migrate-your-coroutines/#scripting Also there is kscript that uses own runtime for scripts, but provides more tools and easier to use https://github.com/holgerbrandl/kscript
n
thats what i was looking for.. and thats why i could not find it .. it was in a different repo
g
was in a different repo? Are you talking about kotlin-main-kts? It should be in JetBrains/Kotlin repo
n
then i wonder why a search though github skipped those files.. does not matter anyways thats whati meant and that will most likely be enough to get some stanadlone scripts working until you decide you need some more configurability