Created
February 20, 2014 16:28
-
-
Save hlship/9117680 to your computer and use it in GitHub Desktop.
Overriding transitive dependency versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def versionOverrides = [ | |
"asm:asm": "3.3.1", | |
"bultitude:bultitude": "0.1.7", | |
"commons-codec:commons-codec": "1.7", | |
"commons-io:commons-io": "2.4", | |
"io.aviso:pretty": "0.1.9-SNAPSHOT", | |
"joda-time:joda-time": "2.1", | |
"org.clojure:core.incubator": "0.1.1", | |
"org.clojure:tools.macro": "0.1.1", | |
"org.clojure:tools.namespace": "0.1.1", | |
"org.codehaus.groovy:groovy-all": "1.8.6", | |
"org.jsoup:jsoup": "1.7.1", | |
"org.yaml:snakeyaml": "1.12", | |
"slingshot:slingshot": "0.10.3" | |
] | |
subprojects { | |
configurations.all { | |
resolutionStrategy.eachDependency { DependencyResolveDetails details -> | |
def overrideVersion = versionOverrides[details.requested.group + ":" + details.requested.name] | |
if (overrideVersion != null && details.requested.version != overrideVersion) { | |
logger.info "Overriding dependency ${details.requested.group}:${details.requested.name} version ${details.requested.version} --> $overrideVersion" | |
details.useVersion overrideVersion | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment