Extending the Gradle Daemon idle timeout

浪子不回头ぞ 提交于 2019-12-01 04:13:03

问题


I'm using gradle and intellij to build my android project. I've noticed that after one minute the daemon process shut down and I can see in the daemon-11188.out.log that the idle timeout is set to 60000 (idleTimeout=60000).

Here is the line from the log:

15:51:46.747 [INFO] [org.gradle.launcher.daemon.server.Daemon] start() called on daemon - DefaultDaemonContext[uid=1be5dcbe-d445-4cf6-87d8-03e443368b0c,javaHome=C:\Program Files\Java\jdk1.7.0_45,daemonRegistryDir=C:\Users\ry_000\.gradle\daemon,pid=11624,idleTimeout=60000,daemonOpts=-Dfile.encoding=windows-1252]

I tried everything but couldn't find a way to override this setting.

Any help would be greatly appreciated, thank you.


回答1:


I had the same problem and looked through sources and found ExternalSystemExecutionSettings.java
So, to increase gradle daemon timeout in IntelliJ Idea add this line to idea.properties file:

external.system.remote.process.idle.ttl.ms=6000000



回答2:


Well, it turned out that IntelliJ uses the gradle api to set 1 minute for the idle timeout. I fixed that by compiling the gradle launcher with constant value of 3 hours. You can get the file here: gradle-launcher-1.9.jar

  • EDIT: Added gradle-launcher for 1.11 in here gradle-launcher-1.11.jar


来源:https://stackoverflow.com/questions/22380740/extending-the-gradle-daemon-idle-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!