Expand JaCoCo exclusion filters for generated code#1697
Conversation
77c8a22 to
232d144
Compare
| exclude(fileFilter) | ||
| val compiledClassPaths = listOf( | ||
| "tmp/kotlin-classes/debug", | ||
| "intermediates/javac/debug/classes", |
There was a problem hiding this comment.
Does this support wildcards? We could just skip the whole "intermeriates/**"
There was a problem hiding this comment.
I tried, but the coverage data disappeared from the XML report
| "**/Manifest*.*", | ||
| "**/*Test*.*", | ||
| "android/**/*.*", | ||
| "**/*Dagger*.*", |
There was a problem hiding this comment.
Do we need to do the same for any ksm/generaed code? For example retrofit.
There was a problem hiding this comment.
I added the Room DAOs, but I don't think we need to skip everything.
38b8c42 to
8b3f24d
Compare
…ath detection logic
8b3f24d to
5c1456e
Compare
|
There was a problem hiding this comment.
Pull request overview
This PR updates the simprints.ci.jacoco convention plugin to broaden JaCoCo exclusion filtering (especially for generated code) and to make class-directory discovery more robust across different AGP intermediate output locations, improving CI coverage reporting reliability.
Changes:
- Consolidates JaCoCo exclusion patterns into a single
excludedPatternslist reused by bothJacocoReportclass filtering andJacocoTaskExtensionexcludes. - Expands exclusion patterns to cover additional generated code (Hilt/KSP, Room/KSP, Kotlin synthetic patterns, etc.).
- Refactors class directory collection to scan multiple known compiled-class intermediate paths under
build/.



This PR fixs the empty JaCoCo reports