I have a multi-module gradle project. Tests for one of my module are in separate modules. For ex: ProjectA, ProjectATest1, ProjectATest2, ProjectATest3. Jacoco execution reports are getting created in the test projects. I want to do sonar analysis of my ProjectA and sonar fails to find the jacoco files.
in ProjectA, sonarqube properties, I gave
sonarqube{
properties {
property "sonar.jacoco.reportPaths","ProjectATest1/gradleBuild/jacoco/Tests.exec", "ProjectATest2/gradleBuild/jacoco/Tests.exec", "ProjectATest3/gradleBuild/jacoco/Tests.exec"
}
}
But I get this exception
Could not find method property() for arguments [sonar.jacoco.reportPaths,"ProjectATest1/gradleBuild/jacoco/Tests.exec", "ProjectATest2/gradleBuild/jacoco/Tests.exec", "ProjectATest3/gradleBuild/jacoco/Tests.exec"]
SonarQube: Coverage incomplete on multimodule gradle project with JaCoCo the answer says it should work. Is there a bug in sonar gradle plugin?