I\'ve created an Android App which needs to be build in many (30+) flavors.
My idea was to generate the different productFlavors
directly from the folde
Solved by trial and error:
android {
// let's assume these are return by a function which reads the filesystem
def myFlavors = [
flavor1: [
packageName: "com.example.flavor1"
],
flavor2: [
packageName: "com.example.flavor2"
]
]
productFlavors {
myFlavors.each { name, config ->
"$name" {
packageName config.packageName
}
}
}
}