ServiceRegistry (DaemonClientFactory daemonClientFactory) { BuildLayoutParameters layout = new BuildLayoutParameters(); if (myServiceDirectoryPath != null && !myServiceDirectoryPath.isEmpty()) { layout.setGradleUserHomeDir(new File(myServiceDirectoryPath)); } DaemonParameters daemonParameters = getDaemonParameters(layout); return daemonClientFactory.createBuildClientServices(new OutputEventListener() { @Override public void onOutput(OutputEvent event) { } }, daemonParameters, new ByteArrayInputStream(new byte[0])); }