-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature to ban certain dependencies #1069
Comments
What about this: https://docs.gradle.org/current/userguide/rich_versions.html dependencies {
constraints {
rootConfiguration 'ch.qos.logback:logback-core', {
version { reject() }
because ' ... explanation ... '
}
} |
I couldn't get that to work (
It mostly does what I want, and the only difference is that I've found something where I'm fine with using it in a test source set but not the main source set. So I'd like to ban from all main source sets, but allow in the test one. |
Update: I got something working on GPT-o1's suggestion:
|
What happened?
Occasionally I want to ban a dependency in a repo, and fail gradle checks if it appears in
versions.lock
.For example, if I've spent some work to migrate off of a problematic library, I'd like to then add it to a banned list to make sure that it doesn't sneakily re-appear in a repo as a result of some auto-upgrade bump. In my example it's a certain maven coordinate, not a specific version of a coordinate.
What did you want to happen?
Some way to provide a list of deps that cannot be depended on, directly or transitively. For example:
The text was updated successfully, but these errors were encountered: