Setting sonar to module project

Example Project View:


I have a spring project with a modular project. All tests and business logic on a modular project. I want to setup sonar and coverage for a modular project.

MainProject build.gradle :

sonarqube {
	properties {
		property("sonar.projectName", "ModuleProject")
		property("sonar.exclusions", "src/**/*")
		property("sonar.sources", "ModuleProject/src/")
		property("sonar.test.inclusions", "ModuleProject/src/test/**")
		property("sonar.coverage.jacoco.xmlReportPaths", "ModuleProject/build/reports/jacoco/test/jacocoTestReport.xml")

But it doesn’t work.

How can I implement this from main project? Is it possible?


You’ve categorized this as and tagged it with sonarqube but your screenshot indicates SonarCloud. Which is it?

Regarding your configuration, the docs on Analyzing multi-project builds should help.