dropbox / dependency-guard

A Gradle plugin that guards against unintentional dependency changes.
Apache License 2.0
406 stars 15 forks source link

`baselineFilter` - Filter out certain dependencies from baseline (allowed, but ignored for baseline purposes) #15

Closed autonomousapps closed 2 years ago

autonomousapps commented 2 years ago

In our build, we have a lot of convention plugins that we publish to an internal Artifactory instance, and which we update regularly. Their coordinates look like this:

com.squareup.register:plugins:1.40.0

Since we run ./gradlew :dependencyGuard on every build, we get a failure every time we publish a new version. (The baseline will contain ...1.39.0, but the build is running on 1.40.0.) One way to avoid this is to filter these buildscript dependencies out of the classpath.txt baseline file: basically ignore them for purposes of the baseline.

Alternatively, say that we don't care if the version changes (only care about the identifer, or com.squareup.register:plugins in this case).

I'm not actually convinced this is a great idea, but I wanted to run it by you to get your thoughts.