I’m working on the kotlin vertx wrapper and I’m having a bit of a time here. Alex T’s script showed values being passed to the script (Vertx object, Verticle object, etc). Of course this seems to violate normal kotlin syntax and certainly confused IDEA. He then created an instance of the script with:
Is there any capabilities for Kotlin to do something like this? There is not a whole lot of documentation on scripts and I’m sort of assuming they’re regular old kotlin files with a main function. But it would be fantastic for kotlin to be able to have launching scripts for vertx.
I was thrown off by Idea showing a red error. Is there any way to communicate with idea that these parameters are passed in at execution time or is that just something that has to be fixed by the IDE team?
There is support for scripts in the IDEA but it currently missing crucial component - ability to call project code. You can follow this discussion. Also there is a link there to tracker. You can vote it up if you want this feature.
Personally, I am waiting for it with great anticipation. For now I use groovy scripts, but Kotlin, being type safe is much better.