4

Everytime Jenkins finished the build, it will kill every process it produced. But with Android project, I want the Gradle Daemon to keep alive in the background to get fast build time in the next build, is there any solution to this?

Thank you for any help!

ldjhust
  • 401
  • 3
  • 13
  • Did you find out how to do this? I am also wondering. – Tsury Oct 18 '16 at 15:04
  • yeah, put the BUILD_ID=dontKillMe before you command! https://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build eg: BUILD_ID=dontKillMe gradle aDeb --daemon – ldjhust Jan 22 '17 at 03:02
  • Thanks, I'll try it! – Tsury Jan 22 '17 at 08:48
  • 3
    Note that using the Gradle Daemon in CI environment is NOT recommended: https://docs.gradle.org/current/userguide/gradle_daemon.html#when_should_i_not_use_the_gradle_daemon – mark.monteiro Mar 31 '17 at 14:02
  • 1
    @mark.monteiro where is this exactly mentioned? This is what's mentioned there `...we enable Daemon by default and recommend using it for both developers' machines and Continuous Integration servers. However, if you suspect that Daemon makes your CI builds unstable, you can disable it to use a fresh runtime...` – Henry Feb 27 '18 at 08:41
  • 2
    @Henry It looks like my comment is outdated, the documentation used to explicitly say not to use it in a CI environment. I should have linked to a specific version of the documentation, because now I'm not sure at exactly what version this changed. However, the start of your quote says this has been the recommendation `Since Gradle 3.0`. – mark.monteiro Feb 27 '18 at 15:03

0 Answers0