- Add the product flavour in the
productFlavoursclosure inapp/build.gradle. - Update the
variantFilterclosure to remove the unnecessary build for the new variant.- For e.g.: we don't want the ability to create debug variants of flavors like Demo and Production.
- Add the API endpoint in
gradle.propertiesand add this as theAPI_ENDPOINTbuild config field when defining the product flavour inapp/build.gradle. This might need to be overriden on Bitrise based on the needs of the build flavour. - Add the Mixpanel project token in
gradle.propertiesand add this as theMIXPANEL_TOKENbuild config field when defining the product flavour inapp/build.gradle. This might need to be overriden on the Bitrise based on the needs of the build flavour. - Update the
applicationIdSuffixandversionNameSuffixwhen defining the product flavour. - Update the
afterEvaluateclosure at the end of theandroidblock inapp/build.gradleto include the build tasks for the new variant (only needed if you have enabled proguard for the build).- For e.g.: We only use Proguard to minify source files and not to obfuscate them. However, Proguard still creates empty
mapping.txtfiles. We use theafterEvaluateblock to delete those emptymapping.txtfiles.
- For e.g.: We only use Proguard to minify source files and not to obfuscate them. However, Proguard still creates empty
- All resources must be updated at the path
app/src/<build flavour>/res. - The app name must be added at
values/strings.xml, with the resource idapp_name. - Update the launcher icons for pre-sdk26 in the
mipmap-<density>folders. - Update the adaptive icon foreground for sdk26+ in
drawable-v26. - Add the
logo_largedrawable resource in thedrawablefolder. This is the large logo with text used on the app bar in some screens. - Add the
ic_icons_logodrawable resource in thedrawablefolder. This is the small logo (without text) used on the app bar in the home screen.