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?
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.
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.
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.
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.
You should run ./gradlew build
at the root of your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With