edwinRNDR
10/11/2023, 1:37 PMVampire
10/11/2023, 2:09 PMVampire
10/11/2023, 2:27 PMKotlinJvmRunDsl
which only allows to configure main class, arguments and classpath, so probably not from there. But you can probably directly configure the carrier task like
val jvmRun by tasks.existing(JavaExec::class) {
workingDir = ...
}
edwinRNDR
10/11/2023, 2:33 PMTask with name 'jvmRun' not found in project
edwinRNDR
10/11/2023, 2:36 PMafterEvaluate {}
inside jvm().mainRun{ }
and that seems to do the jobVampire
10/11/2023, 2:41 PMafterEvaluate
is evil, don't use it if avoidable. It's main effect is introducing timing problems, ordering problems, and race conditions, while usually just doing symptom treatment.
tasks.withType<JavaExec>().matching { it.name == "jvmRun" }.configureEach { workingDir = ... }
edwinRNDR
10/11/2023, 2:42 PMedwinRNDR
10/11/2023, 2:46 PM