I have a white label app that has over 200 different flavors. These flavors are of two types: company and platform. There are over 100 different companies and only 2 platforms. Each company has an app on each platform. So companyAPlatformA/companyAPlatformB, companyBPlatformA/companyBPlatformB, etc.
The problem I am running into is that each applicationId has to be different and there is no set style of applicationId. For example, we have an app with com.app.companyAPlatformA but it's opposite platform is com.app.companyA.PlatformB. Additionally, we have a company with com.app.randomNumbersHere and it's opposite platform is com.app.companyBPlatformB. The problem is that these apps are long established so we cannot just change the applicationId to a certain standard convention for easier flavor builds using dimensions because that would lose users.
Would it be possible to have a flavor inside a flavor? Like this:
productFlavors {
companyA {
platformA {
applicationId 'com.example.companyA'
}
platformB {
applicationId 'com.example.companyA.platformB'
}
companyB {
platformA {
applicationId 'com.company.numbers'
}
platformB {
applicationId 'com.app.companyBPlatformB'
}
}
}
If I can do it this way, how would I build it? I know that I could use ./gradlew assembleCompanyAPlatformARelease if company and platform are different dimensions, but not sure what to do in this case.
Thanks in advance!