Skip to content

Instantly share code, notes, and snippets.

@michail-nikolaev
Created March 14, 2013 15:01
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save michail-nikolaev/5162034 to your computer and use it in GitHub Desktop.
Save michail-nikolaev/5162034 to your computer and use it in GitHub Desktop.
Gradle - force transitive dependency version for some group
apply plugin: 'java'
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
//specifying a fixed version for all libraries with 'org.gradle' group
if (details.requested.group == 'org.springframework') {
details.useVersion "$springVersion"
}
}
}
}
@diegopacheco
Copy link

@michail-nikolaev

Thanks! This saved my day :-)

@Xerosigma
Copy link

Perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment