This sounds plausible (in which case it’s of course not a Gradle problem), I will look into what compilation mode is actually doing. As I understand, it shouldn’t kill anything and let the main process exit and daemon keep running, right?
I also ran it with --info
, here is the output (actual build log is omitted as it is hardly interesting here).
cd ~/...; gradle --info ...
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
Starting daemon process: workingDir = /home/.../.gradle/daemon/2.5, daemonArgs: [/opt/jdk1.8.0_40/bin/java, -XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=UTF-8, -Duser.country=GB, -Duser.language=en, -Duser.variant, -cp, /home/.../.local/gradle-2.5/lib/gradle-launcher-2.5.jar, org.gradle.launcher.daemon.bootstrap.GradleDaemon, 2.5]
Starting process 'Gradle build daemon'. Working directory: /home/.../.gradle/daemon/2.5 Command: /opt/jdk1.8.0_40/bin/java -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=UTF-8 -Duser.country=GB -Duser.language=en -Duser.variant -cp /home/.../.local/gradle-2.5/lib/gradle-launcher-2.5.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 2.5
Successfully started process 'Gradle build daemon'
An attempt to start the daemon took 0.481 secs.
Connected to daemon DaemonInfo{pid=20189, address=[62b44a55-b134-439e-86fc-f8a1566d8c9b port:62981, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=63642e25-06d4-4e0c-ae33-347d22b3b5b5,javaHome=/opt/jdk1.8.0_40,daemonRegistryDir=/home/.../.gradle/daemon,pid=20189,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=GB,-Duser.language=en,-Duser.variant]}. Dispatching request Build{id=306347ed-5b1e-4922-b17d-adbc3062323e.1, currentDir=/home/.../...}.
The client will now receive all logging from the daemon (pid: 20189). The daemon log file: /home/.../.gradle/daemon/2.5/daemon-20189.out.log
Starting build in new daemon [memory: 954.7 MB]
Executing build with daemon context: DefaultDaemonContext[uid=63642e25-06d4-4e0c-ae33-347d22b3b5b5,javaHome=/opt/jdk1.8.0_40,daemonRegistryDir=/home/.../.gradle/daemon,pid=20189,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=GB,-Duser.language=en,-Duser.variant]
Starting Build
[...]
BUILD SUCCESSFUL
Total time: 7.54 secs
Stopped 0 compiler daemon(s).
Received result Success[value=null] from daemon DaemonInfo{pid=20189, address=[62b44a55-b134-439e-86fc-f8a1566d8c9b port:62981, addresses:[/0:0:0:0:0:0:0:1%lo, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=63642e25-06d4-4e0c-ae33-347d22b3b5b5,javaHome=/opt/jdk1.8.0_40,daemonRegistryDir=/home/.../.gradle/daemon,pid=20189,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=GB,-Duser.language=en,-Duser.variant]}.
Compilation finished at Mon Aug 10 09:43:04