Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I build all my gradle build flavors at once?

I have several build flavors for an application. I want to build all differently flavored apks at once and find them in my /output folder. I don't want to select each flavor and build it individually. How can I do this?

like image 245
Tyler Pfaff Avatar asked Feb 04 '15 03:02

Tyler Pfaff


People also ask

When would you use a product flavors in your build setup?

You use same core ingredients to make the base but will use different toppings for each one to have a different taste. Similarly, android apps can have the same base functionalities with changes to some of the features like styles, logo etc. This can be achieved using product flavours.

Why are there multiple build Gradle files?

Android Studio projects contain a top-level project Gradle build file that allows you to add the configuration options common to all application modules in the project. Each application module also has its own build. gradle file for build settings specific to that module.

What is difference between assemble and build in Gradle?

assemble will build your artifacts, and build will assemble your artifacts with additional checks. You can have a look on the tasks that will be executed by using the --dry-run flag. e.g. You will see that apart from assemble also lint and test will be executed.

How long does it take Gradle to build Android Studio?

In your build. gradle, if you have minifyEnabled for debug, remove it. I had it in my project and it took ~2-3 minutes to build.


1 Answers

You should run ./gradlew build at the root of your project.

like image 190
Sandro Machado Avatar answered Oct 05 '22 17:10

Sandro Machado