Book Image

Gradle for Android

By : Kevin Pelgrims
Book Image

Gradle for Android

By: Kevin Pelgrims

Overview of this book

Table of Contents (16 chapters)
Gradle for Android
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Tips and best practices


There are a few ways to make it easier to deal with multimodule projects, and there are a few things to keep in mind when working with several modules. Being aware of these can save you time and frustration.

Running module tasks from Android Studio

As we saw in Chapter 2, Basic Build Customization, it is possible to run Gradle tasks straight from Android Studio. When you have multiple modules, Android Studio recognizes them, and shows a grouped overview of all available tasks.

The Gradle tool window makes it easier to run module-specific tasks. There is no option to run a task for all modules at the same time, so if you wish to do that, the command-line interface is still faster.

Speeding up multimodule builds

When you build a multimodule project, Gradle processes all modules sequentially. With more and more cores available in computers, we can make the build process a lot faster by building the modules in parallel. This feature already exists in Gradle, but is not enabled...