Hello wonderful people, I am quite stuck on this project where I need to run Sonarqube scan on multiple directories. For a single module project I can use this to get the scan done and codecoverage.
jacocoTestReport { reports { xml.enabled true } }
sonarqube {
properties {
property "sonar.host.url", "http://www.sonarqube.test.com" // url is your sonar server
property "sonar.projectName", "app" // this name will appear in dashboard
property "sonar.projectKey", "com.app.test"
// It sould be a keybased on this report is created
property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/test/jacocoTestReport.xml"
property "sonar.java.binaries", "build/classes/java/main"
property "sonar.java.coveragePlugin", "jacoco"
}
}
But now my project hierarchy is
|
->account
| |->src
| |->build.gradle
|
->example
| |->scr
| |->build.gradle
|
->setting.gradle
In account, I am having src and build.gradle. Similarly, In example as well.
Also, I want to use the same project(same projectkey) in sonar.xxx.com.
I found a link where someone suggested using separate projectkeys for each module.