I am trying to make kover create an aggregated code coverage file. I see that they made this PR to create that implementation a couple years ago, but I am not sure about how it works since the readme has been changed a lot since then since the link in that PR’s readme change no longer works. The coverage for my system is currently generated like this.
withSonarQubeEnv('Name-Sonar-Cloud') {
shWithRetryOnGradleException("gradle: Sonarqube analysis", """
./gradlew koverXmlReport
./gradlew koverHtmlReport
./gradlew koverCollectReports
./gradlew sonarqube --stacktrace \
-Dsonar.log.level=TRACE \
-Dsonar.verbose=true \
-DenableJacoco=true \
-Dsonar.branch.name="main" \
-Dsonar.projectName="android" \
-Dsonar.coverage.jacoco.htmlReportPaths="${env.WORKSPACE}/build/reports/kover/all/*.html"
-Dsonar.coverage.jacoco.xmlReportPaths="${env.WORKSPACE}/build/reports/kover/all/*.xml"
""")
uploadCodeCoverageToS3()
}
}
I have tried moving the koverCollectReports that to the beginning but that fails since it requires the html or xml files to exist initially. I think I should be able to use this command to modify the output? I found it the current readme but the workflow is completely different from mine so I am not sure how to add it
coverage-overall - [integer] The overall coverage of the project