I'm programmatically accessing `kotlinc` and feedi...
# scripting
r
I'm programmatically accessing
kotlinc
and feeding it snippets to verify they can be compiled. Is there a way to also evaluate expressions and obtain their results in the same way the
kotlinc
REPL does? Any help or pointers in the right direction are appreciated 🙂
i
The simplest and the most future-proof way is to use JSR-223. For sample scripting host implementation and tests see this project - https://github.com/JetBrains/kotlin/tree/master/libraries/examples/kotlin-jsr223-local-example
r
thanks @ilya.chernikov! I'll check it out