Create multiple flavors of an Android app using gradle script

Product Flavor is a very powerful feature available in the Android gradle plugin that allows us to manage different “flavors” of an application.

In this blog, we are going to learn, how to design and build a single application with multiple flavors, which can be pushed to the Play Store and deployed on the same device simultaneously.

Android Experience

I’ve been asked sometimes on how to work with different hosts, different icons, or even different package names, deppending on different versions of the same app.

There are lot of reasons to do this and one easy way to go: Product Flavors.

Product Flavor is a very powerful feature available in the Android gradle plugin that allows us to manage different “flavors” of an application.

In this blog, we are going to learn, how to design and build a single application with multiple flavors, which can be pushed to the Play Store and deployed on the same device simultaneously.

You can use the productFlavors closure of your app/build.gradle file to define different variants of your product.

In addition to flavors, there is another very important concept regarding building android apps, called “build types”.

Once the changes have been made on app/build.gradle file, a yellow warning bar will appear across the…

View original post 403 more words

2 thoughts on “Create multiple flavors of an Android app using gradle script

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.