Adam Brown
01/12/2024, 8:24 AMrun
task of the module. I have a run configuration for that gradle task saved to the project file, and I want that config to always run in development mode. So I added the VM option to do so, and seem to be running into a problem where my program doesn't actually have these system props set at run time.Adam Brown
01/12/2024, 8:26 AM12:21:46 AM: Executing 'run -Dio.ktor.development=true'...
But in my code, when I attempt to query anything I set in the VM options, it's never set:
println(System.getProperty("io.ktor.development")) // This always returns false
Adam Brown
01/12/2024, 8:27 AMtwisterrob
01/12/2024, 6:47 PMtwisterrob
01/12/2024, 6:48 PMrun
is for Gradle, so the println will ONLY work in build.gradle.ktstwisterrob
01/12/2024, 6:49 PMtwisterrob
01/12/2024, 6:50 PMorg.gradle.application
plugin's run
task is in play in bothAdam Brown
01/12/2024, 8:24 PMAdam Brown
01/13/2024, 12:23 AMAdam Brown
01/13/2024, 12:23 AMAdam Brown
01/13/2024, 12:24 AMAdam Brown
01/13/2024, 12:24 AMtwisterrob
01/13/2024, 2:56 AMif (System.getProperty("idea.version").isNotEmpty()) {
tasks.named<Exec>("run") { systemProperty("io.ktor.development", true) }
}