vanniktech/gradle-android-junit-jacoco-plugin

Push coverage to Sonar not working

fegoulart opened this issue · 3 comments

Hello !

I can't push code coverage to Sonar.
Any idea ?

junitJacoco {
    jacocoVersion = '0.8.5' // type String
    includeNoLocationClasses = false
    includeInstrumentationCoverageInMergedReport = false // type boolean
}
    sonarqube {
        properties {
            property "sonar.sourceEncoding", "UTF-8"
            property "sonar.jacoco.xmlReportPaths", "build/reports/jacocoCombined/debug/jacoco.xml"
            property "sonar.projectName", "project-android"
            property "sonar.projectVersion", "$System.env.CI_COMMIT_SHORT_SHA"
            property "sonar.androidVariant", "DevDebug"
        }
    }

Nope. Never used that feature.

tynn commented

The androidVariant is set to DevDebug, so you're probably missing the flavor in the report path:

build/reports/jacocoCombined/dev/debug/jacoco.xml

I'm closing this issue due to inactivity. If you have any further input on the issue, don't hesitate to reopen this issue or post a new one.