Slackbot
05/03/2023, 12:36 PMNiels Doucet
05/03/2023, 12:43 PMStore as project file checkbox in the run configuration popup.
But a custom task is also possible of course 🙂Niels Doucet
05/03/2023, 12:46 PMapp:run task?Andrei Lenkei
05/03/2023, 12:47 PMNiels Doucet
05/03/2023, 12:48 PMtasks.run {
jvmArgs(...)
args(...)
}Niels Doucet
05/03/2023, 12:50 PMtasks.named("run")Andrei Lenkei
05/03/2023, 12:50 PMThomas Broyer
05/03/2023, 1:06 PMAndrei Lenkei
05/03/2023, 1:07 PMAndrei Lenkei
05/03/2023, 1:07 PMNiels Doucet
05/03/2023, 1:36 PMtasks.named("run"), as tasks.run is "captured" by kotlin stdlibVampire
05/03/2023, 2:13 PMtasks.run in Kotlin DSL does not work.
It will not use the task accessor but the standard Kotlin run extension function.
You need to use tasks.named<JavaExec>("run") { ... } or tasks.run.configure { ... }, or import kotlin.run as run_ (or any other name).
See https://www.linen.dev/s/gradle-community/t/2699183/how-can-i-add-an-enviroment-variable-to-the-gradle-run-task-Vampire
05/03/2023, 2:14 PMtasks.named("run") is not enough, as you then only get Task to configureAndrei Lenkei
05/03/2023, 6:28 PMVampire
05/03/2023, 6:48 PMVampire
05/03/2023, 6:49 PMVampire
05/03/2023, 6:49 PMrun task, but properly register additional JavaExec tasksVampire
05/03/2023, 6:50 PMAndrei Lenkei
05/03/2023, 6:55 PMAndrei Lenkei
05/03/2023, 6:58 PMVampire
05/03/2023, 7:01 PMrun task too and you need to do the same separately, not sure.
Maybe if you could knit an MCVE "someone" could throw an eye on it.Andrei Lenkei
05/04/2023, 6:55 AM