what it takes to bundle kotlin compiler as part of...
# announcements
o
what it takes to bundle kotlin compiler as part of my program, in case if I want to be able to compile user provided "configs" written in my kotlin DSL?
w
c
Last time I tried to do that, it didn't work because of conflicts between my app dependencies and shadowed dependencies of the embeddable kotlin compiler. It was several versions back though, so your mileage may vary. Basically you take either embeddable compiler and use it in your app directly or you take kotlin-script-util and use that. kscript is mostly for command-line scripting, not for embedding.
c
Yup, that's what I was talking about.
I tried to take https://github.com/JetBrains/kotlin/tree/master/libraries/examples/kotlin-jsr223-local-example and repeat the same in my Spring Boot application. And that unfortunately didn't work (it was kotlin 1.1.something) because dependencies shadowed inside kotlin-compiler-embeddable were conflicting with the dependencies I used for my application. I haven't found any work-around, so I'm still sticking with Groovy config scripts.