Sonar Server : v2025.2
Sonar gradle plugin : 6.1.0.5360
scanner-java-library: 3.3.1.450
Hi there,
I have the following gradle project monorepo setup
my-gradle-monorepo/
├── build.gradle.kts
├── settings.gradle.kts
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── apps/
│ ├── app1/
│ │ └── build.gradle.kts
│ └── app2/
│ └── build.gradle.kts
├── libraries/
│ ├── lib1/
│ │ └── build.gradle.kts
│ ├── lib2/
│ │ └── build.gradle.kts
│ ├── lib3/
│ │ └── build.gradle.kts
│ └── lib4/
│ └── build.gradle.kts
├── shared/
│ ├── utils/
│ │ └── build.gradle.kts
│ ├── common/
│ │ └── build.gradle.kts
│ └── network/
│ └── build.gradle.kts
└── README.md
This is a gradle monorepo where I would want to club multiple modules together as a single sonar
project. For example a separate
my-gradle-monorepo-libraries
: Containing all the modules under thelibraries
foldermy-gradle-monorepo-apps
: Containing all the modules under theapps
foldermy-gradle-monorepo-shared
: Containing all the modules under theshared
folder
Is there a way for me achieve this using the sonar gradle plugin? In it’s current implementation since the sonar plugin can only be applied to the root project, it would treat the my-gradle-monorepo
as a single project with all the subprojects as a part of it.