DaemonOutputConsumer outputConsumer = new DaemonOutputConsumer();
ExecHandle handle = new DaemonExecHandleBuilder().build(args, workingDir, outputConsumer);
handle.start();
LOGGER.debug("Gradle daemon process is starting. Waiting for the daemon to detach...");
ExecResult result = handle.waitForFinish();
LOGGER.debug("Gradle daemon process is now detached.");
return daemonGreeter.parseDaemonOutput(outputConsumer.getProcessOutput(), result);
} catch (GradleException e) {
throw e;