Reputation: 16982
Is there a way to exclude specific version of a transitive dependency? I currently have the below but version doesn't seem to be supported.
configurations {
compile.exclude group: 'org.hibernate',module: 'hibernate-core'
}
Upvotes: 3
Views: 12125
Reputation: 1732
Maybe not an answer as such, but could be helpful.
Gradle ignores version in exclude clause (only supports module
and group
) and one way to achieve your goal is to attack it from a different angle. If you are interested in excluding particular version, maybe you could settle on forcing another version instead, that could be achieved with:
configurations.all {
resolutionStrategy {
force 'your-lib:your-ver'
}
}
Upvotes: 11