Kotlin/kotlin-interactive-shell

FR: Documentation for Invoking Programmatically

aryeh-looker opened this issue · 1 comments

Seems to work well with a call to org.jetbrains.kotlinx.ki.shell.KotlinShell.main(args)

In particular, one can do the following:

implementation group: 'org.jetbrains.kotlinx', name: 'ki-shell', version: '0.5.2'
  • create a main class with something like the following:
import org.jetbrains.kotlinx.ki.shell. KotlinShell

fun main(args: Array<String>) {
  KotlinShell.main(*args)
}
  • invoke your main class with the classpath set in whichever way is suggested by your build tool (ensuring that the 'org.jetbrains.kotlinx.ki-shell is on the path as well)