Is there any way to precompile a main.kts script?
# scripting
e
Is there any way to precompile a main.kts script?
­čĹÇ 1
d
If your use-case is just faster execution from yor own CLI, then kscript will do this for you (really well!)
g
I believe there is already caching of script in standard kotli, but probaly you want not just precompile kts, but also include dependencies, right?
Because just to precompile class itself is enough just call kotlinc your-script.kts
e
@darkmoon_uk I was originally using kscript but I needed slightly more functionality than they offer. I was wondering if kotlinc caught up to it yet. @gildor yes, I want to include dependencies
g
If you want to include all runtime dependencies you need fat jar which will include all the dependencies, not just script compilation I would recomemnd just to use standard Kotlin JVM project with Gradle instead, it gives a lot more flexibility with minimal setup