if (LOGGER.isInfoEnabled()) {
LOGGER.info("Executing Sonar Runner with properties:\n[{}]", Joiner.on(", ").withKeyValueSeparator(": ").join(properties));
}
JavaExecHandleBuilder javaExec = new JavaExecHandleBuilder(getFileResolver());
getForkOptions().copyTo(javaExec);
FileCollection sonarRunnerConfiguration = getProject().getConfigurations().getAt(SonarRunnerExtension.SONAR_RUNNER_CONFIGURATION_NAME);
Properties propertiesObject = new Properties();
propertiesObject.putAll(properties);
File propertyFile = new File(getTemporaryDir(), "sonar-project.properties");
GUtil.saveProperties(propertiesObject, propertyFile);
return javaExec
.systemProperty("project.settings", propertyFile.getAbsolutePath())
// This value is set in the properties file, but Sonar Runner 2.4 requires it on the command line as well
// http://forums.gradle.org/gradle/topics/gradle-2-2-nightly-sonarrunner-task-fails-with-toolversion-2-4
.systemProperty("project.home", getProject().getProjectDir().getAbsolutePath())