The Test task from java provides an `environment` property to specify environment variables from Gra...
h
The Test task from java provides an
environment
property to specify environment variables from Gradle. Is there any option to configure environment variables for Kotlin native tests too?
t
I suppose this should work:
Copy code
tasks.withType<org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest>().configureEach {
     environment.put(...)
}
h
Thanks! Almost, environment returns a Map.
Copy code
tasks.withType<org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest>().configureEach {
    environment("KEY", "value")
}