I frequently test my client-server game by running :server:run and :client:run at the same time (as separate commands). One of the tasks tends to be far slower than the other. Using --status, I noticed that, within seconds of stopping the ‘run’ tasks, all idle daemons except one die off. This forces one of the daemons to be restarted almost every time I test-run the game, adding a whopping 6 seconds to the 2 second build time and completely defeating the purpose of a daemon - fast builds.
How do I make gradle keep two or three idle daemons alive? (I may need a third for continuous build.)
Or at least, how else can I reduce the time between making code changes and running the game?
EDIT: Running “:server:run :client:run” in the same command with parallel builds enabled almost does what I want. But then I can’t re-run the server/client independently of each other.
EDIT: Found an ugly fix! If I make the daemons incompatible with each other by changing one of these options, they will all stay alive. So I gave each of my run configurations in IntelliJ a different VM option, e.g. -Xms255m, -Xms254m, -Xms253m, etc, and now my builds are fast!
EDIT: Also created an idea.properties file containing this setting to increase idle timeout from 1 minute to 3 hours:
external.system.remote.process.idle.ttl.ms=10800000