dropbox / dropbox/dependency-guard
Issue when code coverage involved
- Dominant language
- Kotlin
- Stars
- 493
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
Problem
In our project, we use dependency-guard to enforce dependency consistency between local development and CI. However, we’ve encountered an issue due to differing code coverage setups:
Local Development:
Developers typically disable code coverage (e.g., testCoverageEnabled = false in Gradle for Android projects), so JaCoCo dependencies (like org.jacoco:org.jacoco.agent) aren’t included in the resolved dependency set. When we generate the baseline with ./gradlew dependencyGuardBaseline, the resulting file excludes JaCoCo, as expected.
CI Environment: CI pipeline enables code coverage (testCoverageEnabled = true) for builds like debug or qa. This adds JaCoCo dependencies to the runtime classpath. When CI runs ./gradlew dependencyGuard, it detects these extra JaCoCo dependencies, which aren’t in the checked-in baseline, causing the task to fail with a dependency mismatch error.
What can we do in this case?
Can we add a filter to ignore certain package? so in non CI env, I can skip that package.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Gradle tasks named in the issue: dependencyGuardBaseline and dependencyGuard, then trace how CI coverage settings add JaCoCo dependencies to the runtime classpath. Done means defining and validating a way to handle environment-specific dependencies without causing the checked-in baseline and CI verification to disagree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- build-system, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100