它在android gradle构建脚本中。我在gradle中有多种口味:
flavorDimensions "brand", "appVariant"
productFlavors {
stage {
dimension "appVariant"
}
prod {
dimension "appVariant"
}
brand1 {
dimension "brand"
}
brand2 {
dimension "brand"
}
}
如何使用kotlin-dsl重写它?
答案 0 :(得分:1)
这将起作用:
flavorDimensions("brand", "appVariant")
productFlavors {
create("var1") {
setDimension("appVariant")
}
create("var2") {
setDimension("appVariant")
}
create("brand1") {
setDimension("brand")
}
create("brand2") {
setDimension("brand")
}
}