Sunday, May 17, 2015

Speed up Gradle build time by enabling the Gradle Daemon

Gradle is the new build system for Android projects on Android Studio.

The Gradle Daemon is a background process that does the heavy lifting of running builds, then stays alive between builds waiting for the next build. This allows data and code that is likely to be required in the next build to be kept in memory, ready to go. This dramatically improves the performance of subsequent builds. Enabling the Gradle Daemon is an extremely cheap way to decrease build times.

To enable Gradle Daemon, create a file "" in Gradle directory:
on Linux
on Mac
on Windows

Add the following lines to the file:

In Android Studio
> File > Settings > Gradle then enable “Offline work”

Restart Android Studio.


No comments: