Avoid blocking daemon for long running tasks

We use Gradle to run some development servers (e.g. a run task from the Application plugin). Unfortunately this “binds” the daemon to that task - if we have three servers running, that means three separate daemons.

Is there a way to free the daemon up for other work? The original Gradle invocation should still wait for/print standard out from the development server.

The Gradle invocation just tells a Gradle deamon what to do.
Even if you use --no-daemon a Gradle daemon is used, it is just not reused for later builds but shut down after the build.
So no, there is not way I’m aware of to do what you ask for, except may you build something around like detaching the started process, redirecting its output to a file and displaying that file then.

Hmm, that’s unfortunate. I imagine this a somewhat common use case, so I’m surprised there’s not a better solution.

What’s bad with the current solution?

Since the daemons are still running (one per development server) they are using up memory.

Yeah, up to 512 MiB with default settings.