so .. the minimal scripting example has been updat...
# scripting
so .. the minimal scripting example has been updated.. now it also features the idea integration: although firs time opening i expect it to not work until it ran
one on the
if anyone know how to make this work as ONE gradle project without publishing to maven and depending on that, PRs or hints are welcome
This is all looking so close to awesome, but doesn't quite just work. Do you need to restart or just reopen the project after publishing to maven?
I'm going to park this for a few weeks and come back. I've got a lot of scripts I'm going to move over from the JSR 223 approach once it's there e.g.
you need to reopen it once because idea needs to get the jar which is loaded up from mavenLocal
@yschimke i think that kotlin scripting is ready enough for that kind of usecase.. especially if you keep your scrift-host and your scripts in seperate repositories
whati i do is i have a not included samples folder (seperate gradle project) and then do a
task pointing to the parent folder that invokes
publishToMavenLocal shadowJar
which makes it available to the IDE and then i copy the shadowJar over to have it available, similar to here: (but this one is doing it on a subdirectry instead)
I assume the need for separate modules will be fixed. Also extension association and highlighting was working for me. But really I want Coroutines support before I upgrade. I don’t want runBlocking in my scripts
i wonder if you can make your Script class extend Job or somehow other wrap the code to accept suspending functions
i think it might just be possile already but i don't relly know that much about how you can use coroutines in all kinds of ways
either way what you can already to is assign a suspending function a variable that can then be called llater.. its working somewhat well if you want to set multiple generators.. like for avtions you want delayed and/or repeated but for other usecases its ugly
i think you might need to open a issue for the suspend functionality.. even if just to keep track of it
I have one from 11 months ago 🙂
and starred..
from the KEEP:
scriptBodyTarget - the generation into method body is not yet supported, so this parameter is ignored
so.. this seems like it will be possible to set the target to a suspend function
Yes, the suspend support in scripts, as far as we imagine it now, depends on implementation of generating script into a method (instead of a constructor + initializers). The issue - At the moment it is not clear how long it will take, the previous attempt to implement it was blocked by various technical issues.
❤️ 1
👍 1
Great that you are working on this, this seems to vastly simplify a typical shell script use, while having clear semantics for the coroutine scope.