Earlier this year I released an app for a client that we used flavor dimensions with. We had
Full | Preview
Apple | Apple | Apple.Preview
Orange | Orange | Orange.Preview
This worked perfectly. But now I need to add Banana to the project as another app, and things are getting messy.
In the full versions, I have some features that are shared by the existing versions that I want to be left out from the new app entirely. There are some resources that would be nice to remove as well, but since those are small files I'm not as concerned about it. I also would prefer to avoid the Full and Preview versions of Banana, but if I can't do that then it's ok. What I really need to do it group some files in Apple and Orange, and others for all 3. Kind of like making a third dimension. Any advise?
First, for your distinct file, use
productFlavorsorGradleIf you want to use that string, use this
BuildConfig.MY_DISTINC_STUFFSecond, if you want to group some files that can use for 1,2 or all. You have to do this.
srcfolderbuild.gradle(App level). Ex: folderapple, folderorange, folderbanana.DON'Tremove your main foldermainfolder. (Don't care 3 others)samename, butdifferent folder.Build Variants.Android Runtime will decide which file have to be loaded.