Application plugin - Stopping a running application kills the Gradle daemon

(jon.rimmer) #1

I have been getting push-back from the development team over our new Gradle-based build, as it is an order of magnitude slower to build and launch the application than it was using the old IDE-based build.

I investigated using the Gradle daemon to improve the situation, and this initially looked promising, but I have run into a problem. When I run tasks like build, clean, distTar, etc, the daemon process continues running in the background, and subsequent tasks run much more quickly.

However, when I use the “Run” task to launch the application, and then stop the application via a control-c on the command line, or the “stop” function in the IDE (IntelliJ IDEA), then the daemon process is killed, and the subsequent task is again very slow to start. How can I ensure the daemon continues to run even when the run task is ended?

(Luke Daley) #2

Hi Jon,

This is indeed a problem. Unfortunately, it’s not trivial to fix. We’d have to either use native or non portable code to install a temporary signal handler.

Is is something you’d be interested in working on?

(Luke Daley) #3

BTW, raised GRADLE-3083