I have 2 target android flavor, with 2 different customer flavor. I need:
- first target with an appId and different suffix by customer
- second target with a different appId without any suffix.
My tries:
flavorDimensions "customer","target"
productFlavors {
customerA {
dimension "customer"
applicationId = "com.mycompany.newappname.customerA"
}
customerB {
dimension "customer"
applicationId = "com.mycompany.newappname.customerB"
}
targetA{
dimension "target"
}
targetB{
dimension "target"
applicationId = "com.mycompany.oldappname"
}
}
it doesn't work on targetB. I get appId defined in dimension customer, not the one in dimension target.
And I tried:
defaultConfig {
applicationId "com.mycompany.newappname"
}
...
flavorDimensions "customer","target"
productFlavors {
customerA {
dimension "customer"
applicationIdSuffix = ".customerA"
}
customerB {
dimension "customer"
applicationIdSuffix = ".customerB"
}
targetA{
dimension "target"
}
targetB{
dimension "target"
applicationIdSuffix = ""
applicationId = "com.mycompany.oldappname"
}
}
but I get on resulting targetB appId= "com.mycompany.oldappname.customerB"
EDIT
I have specialized code in folders java/res of companyA/companyB needed both for targetA and targetB