Moving from kotlin 1.3.72 to 1.4.0 broke my simple...
# scripting
Moving from kotlin 1.3.72 to 1.4.0 broke my simple app. Currently the app parses a dsl string and casts it to a class. Works fine in 1.3.72. I am currently using Kotlin-script-util, kotlin-compiler-embeddable, kotlin-compiler-embeddable. I am now getting Error class not found org.jetbrains.kotlin.cli.common.repl.KotlinJsr223JvmScriptEngineFactoryBase. Any idea what maven dependencies I am missing/should change to?
I guess that you're using JSR-223 (
) API, right? In this case you only need to use the
dependency now. Here is the example -
I tried adding this dependency but I get NoClassDefFound for: org/jetbrains/kotlin/cli/common/repl/KotlinJsr223JvmScriptEngineFactoryBase. In addition do you recommend a different approach to parsing a dsl string into class at runtime other than Jsr223?
Please try to use only mentioned dependency, the
is most probably the cause of the problem you see. Please have a look at the example project I linked above.
The JSR-223 is probably the simplest approach, but for the other approaches, you can check other examples in the repo
Thanks you, the suggested projects worked for me. This should be higher in search results as an improvement for Kotlin 1.4.0