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

Advertisements

About Gautam Rege

Rubyist, Entrepreneur and co-founder of Josh-Software - one of the leading Ruby development shops in India.
This entry was posted in General. Bookmark the permalink.

2 Responses to Create multiple flavors of an Android app using gradle script

  1. Aditya Shedge says:

    With regards, Aditya Shedge.

    >

  2. Aditya Shedge says:

    Typo ‘depending’ spelling mistake.

    With regards, Aditya Shedge.

    >

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s