build: Switch to use Android's Native coverage check - #322
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the manual JaCoCo report task and the JaCoCo plugin, transitioning to SonarQube's built-in coverage reporting. Feedback was provided regarding the SonarQube configuration in build.gradle.kts, specifically noting that sonar.java.binaries does not support wildcards and is missing Kotlin class paths. It was also suggested to explicitly define sonar.sources and migrate coverage exclusions to sonar.coverage.exclusions to maintain report accuracy.
| property("sonar.tests", "src/test/java,src/test/kotlin") | ||
| property("sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml") | ||
| property("sonar.coverage.jacoco.xmlReportPaths", "**/build/reports/coverage/test/debug/report.xml") | ||
| property("sonar.java.binaries", "**/build/intermediates/javac/*/classes") |
There was a problem hiding this comment.
The sonar.java.binaries property generally does not support wildcards and should point to specific directories. It is also missing the path to compiled Kotlin classes. Additionally, you should explicitly define sonar.sources to include Kotlin files and migrate the previous coverage exclusions (like R classes and BuildConfig) to sonar.coverage.exclusions to ensure the report remains accurate and consistent with the previous configuration.
property("sonar.sources", "helperlib/src/main/java,helperlib/src/main/kotlin")
property("sonar.java.binaries", "helperlib/build/intermediates/javac/debug/classes,helperlib/build/tmp/kotlin-classes/debug")
property("sonar.coverage.exclusions", "**/R.class,**/R$*.class,**/BuildConfig.*,**/Manifest*.*,**/*Test*.*,android/**/*.*")
|



No description provided.