properties.put("sonar.junit.reportsPath", testResultsDir);
}
project.getPlugins().withType(JacocoPlugin.class, new Action<JacocoPlugin>() {
public void execute(JacocoPlugin jacocoPlugin) {
JacocoTaskExtension jacocoTaskExtension = testTask.getExtensions().getByType(JacocoTaskExtension.class);
File destinationFile = jacocoTaskExtension.getDestinationFile();
if (destinationFile.exists()) {
properties.put("sonar.jacoco.reportPath", destinationFile);
}
}
});