gradle Gradle Performance Gradle Parallel builds


Gradle will only run one task at a time by default, regardless of the project structure. By using the --parallel switch, you can force Gradle to execute independent subprojects - those that have no implicit or explicit project dependencies between one another - in parallel, allowing it to run multiple tasks at the same time as long as those tasks are in different projects.

To build a projects in parallel mode:

gradle build --parallel

You can also make building in parallel the default for a project by adding the following setting to the project’s file: