Pitel
09/13/2021, 1:25 PMkotlinc
directly from command line?Vampire
09/13/2021, 1:50 PMPitel
09/13/2021, 1:51 PMtasks.withType<Kotlin2JsCompile> {
kotlinOptions {
freeCompilerArgs += "-Xir-property-lazy-initialization"
}
}
Well, then I have this, but I don't want to use this parameter when compiling tests. How to do that?Vampire
09/13/2021, 1:52 PMVampire
09/13/2021, 1:53 PMtasks.withType<Kotlin2JsCompile> {
if (name != "whateverthetesttasknameis") {
kotlinOptions {
freeCompilerArgs += "-Xir-property-lazy-initialization"
}
}
}
Pitel
09/13/2021, 1:56 PMif (!name.contains("test", true))
🤷🏻♂️ Isn't there a better way to detect test tasks?Vampire
09/13/2021, 1:59 PMVampire
09/13/2021, 2:00 PMPitel
09/13/2021, 2:01 PMVampire
09/13/2021, 2:03 PMPitel
09/13/2021, 2:05 PMname
🙂