private SonarRunner createTask(final Project project, final Map<Project, ActionBroadcast<SonarProperties>> actionBroadcastMap) {
SonarRunner sonarRunnerTask = project.getTasks().create(SonarRunnerExtension.SONAR_RUNNER_TASK_NAME, SonarRunner.class);
sonarRunnerTask.setDescription("Analyzes " + project + " and its subprojects with Sonar Runner.");
ConventionMapping conventionMapping = new DslObject(sonarRunnerTask).getConventionMapping();
conventionMapping.map("sonarProperties", new Callable<Object>() {
public Object call() throws Exception {
Map<String, Object> properties = Maps.newLinkedHashMap();
computeSonarProperties(project, properties, actionBroadcastMap);
return properties;
}