Skip to content

Instantly share code, notes, and snippets.

@breskeby
Created September 23, 2014 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save breskeby/488817c36223ea6379f9 to your computer and use it in GitHub Desktop.
Save breskeby/488817c36223ea6379f9 to your computer and use it in GitHub Desktop.
whitelisted dependencies
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.1.1.RELEASE'
}
}
apply plugin: 'spring-boot'
repositories {
mavenCentral()
}
dependencies {
versionManagement 'io.spring.platform:platform-versions:1.0.0.RELEASE@properties'
compile 'org.springframework:spring-core'
compile 'org.springframework.data:spring-data-jpa'
}
Properties whitelist = new Properties()
configurations.versionManagement.singleFile.withInputStream {
stream -> whitelist.load(stream)
}
project.configurations.all {
resolutionStrategy.eachDependency { details ->
String version = whitelist.get(details.requested.group + ":" + details.requested.name)
if (version) {
details.useVersion(version)
}
}
}
@breskeby
Copy link
Author

this results in

+--- org.springframework:spring-core: -> 4.0.5.RELEASE
|    \--- commons-logging:commons-logging:1.1.3
\--- org.springframework.data:spring-data-jpa: -> 1.6.0.RELEASE
     +--- org.springframework.data:spring-data-commons:1.8.0.RELEASE
     |    +--- org.springframework:spring-core:3.2.9.RELEASE -> 4.0.5.RELEASE (*)
     |    +--- org.springframework:spring-beans:3.2.9.RELEASE -> 4.0.5.RELEASE
     |    |    \--- org.springframework:spring-core:4.0.5.RELEASE (*)
     |    +--- org.slf4j:slf4j-api:1.7.7
     |    \--- org.slf4j:jcl-over-slf4j:1.7.7
     |         \--- org.slf4j:slf4j-api:1.7.7
     +--- org.springframework:spring-orm:3.2.9.RELEASE -> 4.0.5.RELEASE
     |    +--- org.springframework:spring-beans:4.0.5.RELEASE (*)
     |    +--- org.springframework:spring-core:4.0.5.RELEASE (*)
     |    +--- org.springframework:spring-jdbc:4.0.5.RELEASE
     |    |    +--- org.springframework:spring-beans:4.0.5.RELEASE (*)
     |    |    +--- org.springframework:spring-core:4.0.5.RELEASE (*)
     |    |    \--- org.springframework:spring-tx:4.0.5.RELEASE
     |    |         +--- org.springframework:spring-beans:4.0.5.RELEASE (*)
     |    |         \--- org.springframework:spring-core:4.0.5.RELEASE (*)
     |    \--- org.springframework:spring-tx:4.0.5.RELEASE (*)
     +--- org.springframework:spring-context:3.2.9.RELEASE -> 4.0.5.RELEASE
     |    +--- org.springframework:spring-aop:4.0.5.RELEASE
     |    |    +--- aopalliance:aopalliance:1.0
     |    |    +--- org.springframework:spring-beans:4.0.5.RELEASE (*)
     |    |    \--- org.springframework:spring-core:4.0.5.RELEASE (*)
     |    +--- org.springframework:spring-beans:4.0.5.RELEASE (*)
     |    +--- org.springframework:spring-core:4.0.5.RELEASE (*)
     |    \--- org.springframework:spring-expression:4.0.5.RELEASE
     |         \--- org.springframework:spring-core:4.0.5.RELEASE (*)
     +--- org.springframework:spring-aop:3.2.9.RELEASE -> 4.0.5.RELEASE (*)
     +--- org.springframework:spring-tx:3.2.9.RELEASE -> 4.0.5.RELEASE (*)
     +--- org.springframework:spring-beans:3.2.9.RELEASE -> 4.0.5.RELEASE (*)
     +--- org.springframework:spring-core:3.2.9.RELEASE -> 4.0.5.RELEASE (*)
     +--- org.aspectj:aspectjrt:1.8.0
     +--- org.slf4j:slf4j-api:1.7.7
     \--- org.slf4j:jcl-over-slf4j:1.7.7 (*)

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