Kensuke Sano
08/01/2023, 4:16 AMAlexey Belkov [JB]
08/01/2023, 2:24 PMAnton Mefodichev
08/03/2023, 2:35 PMval isDebugBuild by extra { project.findProperty("isDebugBuild")?.toString()?.toBoolean() ?: false }
2. Add a condition with selection of language version:
kotlin {
sourceSets.all {
languageSettings {
if (isDebugBuild) {
languageVersion = "2.0"
} else {
languageVersion = "1.9"
}
}
}
}
3. When run gradle build command: specify this variable as true:
./gradlew build -PisDebugBuild=true
If I understood your request incompletely, can you please provide more details and conditions regarding the situation?