If your use-case is just faster execution from yor own CLI, then kscript will do this for you (really well!)
g
gildor
06/10/2021, 3:41 AM
I believe there is already caching of script in standard kotli, but probaly you want not just precompile kts, but also include dependencies, right?
gildor
06/10/2021, 3:43 AM
Because just to precompile class itself is enough just call kotlinc your-script.kts
e
eygraber
06/10/2021, 3:14 PM
@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
gildor
06/11/2021, 1:35 AM
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