-
Notifications
You must be signed in to change notification settings - Fork 19
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.