它在Android Gradle构建脚本中。我在Gradle中有多种口味:
flavorDimensions "brand", "appVariant"
productFlavors {
stage {
dimension "appVariant"
}
prod {
dimension "appVariant"
}
brand1 {
dimension "brand"
}
brand2 {
dimension "brand"
}
}
如何重写使用Kotlin-DSL?
这将有效:
flavorDimensions("brand", "appVariant")
productFlavors {
create("var1") {
setDimension("appVariant")
}
create("var2") {
setDimension("appVariant")
}
create("brand1") {
setDimension("brand")
}
create("brand2") {
setDimension("brand")
}
}