Used gradle version: 3.4.1

I have specified org.gradle.daemon=true in my gradle.properties(located in my project root directory), though whenever I run my gradlew I see in the logs the following line:

22:50:26 Starting a Gradle Daemon (subsequent builds will be faster)

22:50:41 :broker:clean

As you can see the time difference between the execution of clean task and starting the gradle deamon , it takes around 15 seconds to start the deamon every time.

After the build is finished, when I run ./gradlew --status command I see that there is no any running deamon as shown bellow:

No Gradle daemons are running.

PID STATUS INFO

10061 STOPPED (by user or operating system)

Please answer the following questions:

1) So what is the reason that gradle deamon is not running in the background despite the instruction in gradle.properties (I don't have gradle.properties in gradle installation folder overriding the gradle.properties in project root) ?

2) Also, I see the same build time irrespective to the value I set to org.gradle.jvmargs in gradle.properties, the build time is same for the values -Xmx512M -Xms512M and -Xmx32M -Xms32M and when I run gradlew with --debug option I always see the following line containing the value of Xmx equal to 1024m irrespective to what value I have set for it in gradle.properties:

16:18:16.996 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'Gradle build daemon'. Working directory: /home/suren/.gradle/daemon/3.4.1 Command: /usr/lib/java/jdk1.8.0_202/bin/java -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/suren/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s/gradle-3.4.1/lib/gradle-launcher-3.4.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 3.4.1

0 Answers