I could put together a temporary solution with the...
# scripting
j
I could put together a temporary solution with these features: - Maven dependency resolution via future-standard
@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.
i
It seems that except a few points, you’re describing the kscript feature set. Maybe it is better to help @holgerbrandl instead. (Btw, I’m in the (too slow, unfortunately) progress of helping Holger to make kscript reuse kotlin scripting infrastructure in full, that hopefully make it easier to evolve.)
👍 1
e
Yeah I support contributing to kscript.
👍 1