Gradle requires Java and it can reuse all great features from the runtime. The drawback is that it takes several seconds to boot whole Groovy/Java engine after typing command: gradle.

There is simple way how to speed up Gradle: use daemon mode.

The easiest approach is to put following line into file ~/.gradle/gradle.properties:

org.gradle.daemon=true

Gradle will automatically spawn daemon process after the first execution of command gradle.

gradle-java-process

Every build is starting faster.

That’s nice, but daemon is sitting in the memory. You can shut down daemon by command:

gradle --stop

Interesting option for developers is to leave daemon in running in foreground and watch daemon in debug mode:

gradle --foreground --debug

More detailed info about Gradle daemon is available in Gradle manual.

Comments