Code coverage on Android/Kotlin with Kover and Sonar differs on percents

Viewed 1505

I'm using Kover to get coverage on kotlin and want to share it with sonar, configuration is like this:

plugins {
  ...
  id "org.jetbrains.kotlinx.kover" version "0.4.2"
  id "org.sonarqube" version "3.3"
}

sonarqube {
    properties {
        property "sonar.sourceEncoding", "UTF-8"
        ...
        property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/kover/report.xml"
    }
}

project.tasks["sonarqube"].dependsOn "koverReport"

Now, the HTML report of Kover says I have 33% of coverage meanwhile Sonar shows a 10% coverage. What could be the problem?

1 Answers
Related