BuildListenerImpl listener) {
assertCanExecute();
if (isQuiet()) {
parameter.setLogLevel(LogLevel.QUIET);
}
GradleLauncher gradleLauncher = GradleLauncher.newInstance(parameter);
gradleLauncher.addListener(listener);
gradleLauncher.addStandardOutputListener(outputListener);
gradleLauncher.addStandardErrorListener(errorListener);
try {
return gradleLauncher.run();
} finally {
System.clearProperty("test.single");
}
}