How to show Jacoco code coverage in sonar for groovy modules

Hi,

I have a multi module project with some modules written in Java and some in Groovy

I have the Jacoco plugin set up to generate code coverage reports, which it does for all modules.

I have the Sonar runner plugin set up to analyse all modules.

When I view sonar, the test success and code coverage shows only the results for the java modules, not the groovy modules. The rest of the sonar analysis is there for all modules.

Gradle version 2.2.1 (Was on 1.10 but upgraded to see if it would help).

I have no specific config for the jacoco plugin. Below is what I have for sonar, the only difference is the language on the groovy modules

sonarRunner {
        sonarProperties {
            property "sonar.java.coveragePlugin", "jacoco"
            property "sonar.junit.reportsPath", "${testResultsDir}"
            property "sonar.surefire.reportsPath", "${testResultsDir}"
            property "sonar.jacoco.reportPath", "$buildDir/jacoco/test.exec"
        }
    }

When I output info, the logs for the java modules include the line

Sensor JaCoCoSensor...

But the Groovy modules do not (although they mention Sensor Groovy CoberturaSensor… which I am not using).

Is it possible to show jacoco coverage in sonar for groovy?

Thanks!

In answer to my own question, it sounds like this isn’t possible yet - there’s a pull request waiting on the groovy-sonar plugin to support it.