Disable Gradle Daemon

android
gradle

#1

My builds are using too much memory. When I looked at the memory usage in top I see a gradle daemon process. According to the gradle documentation it is not recommended to run a gradle daemon in a ci environment.

My question is how do I disable the daemon?

I’ve tried running:

./gradlew --stop

before my build commands. As well as adding the --no-daemon option to the commands.

Thanks,
Noah


#2

The Gradle Daemon is enabled by default in Gradle 3.0 which was released recently. I’m not sure if this was your problem at first place.

Anyway to disable it:
In your gradle.properties file add the following line:

org.gradle.daemon=false

https://docs.gradle.org/current/userguide/gradle_daemon.html#sec:disabling_the_daemon


#3