I have 2 build flavors, say, flavor1 and flavor2.
I would like my application to be named, say, \"AppFlavor1\" when I build for flavor1 an
Another option that I actually use is change the manifest for each application. Instead of copy the resource folder, you can create a manifest for each flavour.
sourceSets {
main {
}
release {
manifest.srcFile 'src/release/AndroidManifest.xml'
}
debug {
manifest.srcFile 'src/debug/AndroidManifest.xml'
}
}
You have to have a principal AndroidManifest in your src main that will be the principal. Then you can define a manifest with only some options for each flavour like (src/release/AndroidManifest.xml):
For debug, AndroidManifest (src/debug/AndroidManifest.xml):
Compiler will do a merge of the manifest and you can have a icon for each flavour.