josephivie
08/23/2019, 1:05 AM@Repository
and such, possibly with Maven Central and JCenter just implied - future-compatible support with normal Kotlin scripts top priority
- Interactive mode - load the KT/KTS file and then get a REPL
- Line Argument - run the KT/KTS file, providing the expression you wish to be executed in that context.
- Open in IntelliJ - creates a project in a temp folder, including needed files using hard links. Full auto-complete. Does not use Gradle under the hood, but rather direct IML files.
- Fully platform independent, running in Java without any platform-specific features nor a separate installation of Kotlin (use embedded compiler instead)
- Perhaps platform-specific GUI integration - double click on script file to run, context-menu edit...
Is this something people would be interested in?
I think it wouldn't take me too long - I've experimented with similar things already. I already know how to create IntelliJ projects from XML, running Kotlin scripts, running the embedded Kotlin compiler, etc.
I'd primarily use it for build-scripts, personally. It would be nice to ditch Gradle and anything Gradle-like in favor of straight-up using libraries from Maven to compile your stuff. That would be some nice standard reuse there. I can imagine creating a build.kts
file and then opening it in interactive mode in the terminal of IntelliJ to run tasks like build()
, run()
, publish()
, etc. It would be so much faster to edit (Gradle's KTS editing isn't too speedy and resolving plugins can be tricky) and would make build files easier to follow, as they'd just be more normal Kotlin without extra bulky configuration systems and magic plugins. No build system, just... Kotlin. I'd have to make a couple of Maven libraries to make it more convenient to set up, but that's not too bad.ilya.chernikov
08/23/2019, 8:57 AMefemoney
08/24/2019, 8:29 PM