https://kotlinlang.org logo
#scripting
Title
# scripting
b

bsideup

01/31/2017, 9:13 AM
and, to simplify the testing and development I want to have full IDE support in
app
module for the scripts
i

ilya.chernikov

01/31/2017, 9:26 AM
bsideup: and how you’ll be running scripts in the app module?
b

bsideup

01/31/2017, 9:27 AM
JSR-223 Also, the question is not about the runtime. I just want IDEA to recognize the scripts and auto complete them
i

ilya.chernikov

01/31/2017, 9:49 AM
You can specify template class name and classpath (that shall contain the template class and all it’s dependencies) in the kotlin compiler settings in IDEA. But it will be most likely static, so changes there will not be automatically applied until you reload the project. Alternatively you can write an IDEA plugin for your specific case - there is an extension point that allow you to supply classpath and other things more dynamically. And we are planning to develop some templates discovery mechanisms for typical use cases.
As of classloader control - you can supply one to
javax.script.ScriptEngineManager
constructor, and you can dynamically extend it using kotlin script resolving mechanisms.
b

bsideup

01/31/2017, 10:36 AM
ok, thanks, will try
2 Views