Script Runner Bridge
class ScriptRunnerBridge @JvmOverloads constructor(classpathFilter: (File) -> Boolean? = null)(source)
Evaluates Kotlin scripts with the Kotlin scripting host, keeping the state of a session across calls so that successive snippets share declarations.
Unlike JSR-223 (deprecated in Kotlin 2.2.0), this drives the REPL API of the scripting host ([JvmReplCompiler] and [JvmReplEvaluator]). Every [eval] compiles a snippet against the declarations of the previous snippets and evaluates it on top of them. The script classpath is derived from the current context, so snippets can reference the SMILE libraries and any other dependency of the hosting application.
This class is not thread safe; callers must serialize access. Haifeng LiAuthor