Product Flavor

Product Flavors allow for the utilisation of multiple variants of an app within a single application simultaneously. This structural concept resembles Build Types but provides greater flexibility by facilitating the creation of distinct versions of the application from a shared codebase. Android Product Flavors serve the purpose of generating diverse iterations of an app.

In the project structure, you'll notice two directories named "dev" and "pro." Here, you can configure different "google-service.json" files to build the app for testing in different variants. For instance, when building the app in dev mode, it won't impact your production app or users. This setup allows for easy testing of the app during the development phase. you can also configure everything here, including the application ID, app name, icon, or any other settings according to your preferences.

Here, in the build.gradle.kts file at the app level, you'll find the implementation of flavors. You'll notice different application IDs, allowing you to configure distinct ad IDs for production and development variants. The application ID now also handles Firebase configuration we will see it later

Last updated