How to SCAN and check code coverage of multiple modules in same project

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 "", "" //  url is your sonar server
        property "sonar.projectName", "app"   //  this name will appear in dashboard
        property "sonar.projectKey", ""
        // It sould be a keybased on this report is created
        property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/test/jacocoTestReport.xml"
        property "", "build/classes/java/main"
        property "", "jacoco"

But now my project hierarchy is
| |->src
| |->build.gradle
| |->scr
| |->build.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
I found a link where someone suggested using separate projectkeys for each module.

Hi @Vikas_Rathore ,

We have this guide but it doesn’t address Gradle multimodule projects like yours: [Coverage & Test Data] Importing JaCoCo coverage report in XML format

Please see my example here: sonar-scanning-examples/sonarqube-scanner-gradle/gradle-multimodule-coverage at master · SonarSource/sonar-scanning-examples · GitHub

Scroll down and read how I did it in my example in the “Coverage” section.