Closed yshrsmz closed 5 years ago
passing value via command line will work, but I'm not sure how I can do that in Android Studio/IntelliJ IDEA
$ ./gradlew -Pbuildkonfig.flavor=dev build
gradle.properties
gradle.properties
while development-P
in CIThis should work
NamedDomainObjectContainer
is Set
, so duplicated name is not allowed.
buildkonfig {
defaultConfigs("dev") {}
defaultConfigs("release") {}
// void targetConfigs(String flavor, Closure closure)
targetConfigs("dev") {
android {
}
ios {
}
}
targetConfigs("release") {
android {
}
ios {
}
}
}
Also, defaultConfigs
should be configurable per flavor
Some thing like Android's product flavor could be useful. But since Kotlin MPP does not support it, we need to come up with some workaround.