jdemeulenaere
09/22/2019, 12:07 PMcedric
09/22/2019, 3:44 PMjdemeulenaere
09/22/2019, 3:55 PMcedric
09/22/2019, 3:55 PMcedric
09/22/2019, 3:56 PMkobaltw
which is a small piece of code that looks up existing downloaded jar files, checks if a newer version is available, possibly downloads it. Then launch the main
in that jar file.cedric
09/22/2019, 3:56 PM./kobaltw --update
, or something like that).efemoney
09/22/2019, 4:42 PMbaseConfigurations
arg.
Something like
class ScriptHost {
// ...
private val compilationConfiguration = createCompilationConfigurationFromTemplate( ... ) {
jvm {
// ... Remove dynamic jar declaration
}
}
fun evaluate(code: String): CodeEvaluationResult {
// ...
val newConfig = ScriptCompilationConfiguration(
compilationConfiguration
) {
dependencies.append(JvmDependency(<updated dynamic jar file>))
}
val evaluationResult =
jvmHost.eval(scriptSource, newConfig, null)
// ...
}
}