Created
September 3, 2015 22:05
-
-
Save kolorobot/b5db05f6a5930642e6e3 to your computer and use it in GitHub Desktop.
Spring Boot with overridden Spring Version (without dependency management)
This file contains hidden or 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
buildscript { | |
ext { | |
springBootVersion = '1.2.5.RELEASE' | |
springVersion = '4.2.1.RELEASE' | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") | |
} | |
} | |
apply plugin: 'java' | |
apply plugin: 'spring-boot' | |
jar { | |
baseName = 'demo' | |
version = '0.0.1-SNAPSHOT' | |
} | |
sourceCompatibility = 1.8 | |
targetCompatibility = 1.8 | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile("org.springframework.boot:spring-boot-starter-web") | |
testCompile("org.springframework.boot:spring-boot-starter-test") | |
} | |
configurations.all { | |
resolutionStrategy.eachDependency { DependencyResolveDetails details -> | |
if (details.requested.group == 'org.springframework') { | |
details.useVersion "${springVersion}" | |
} | |
} | |
} | |
task wrapper(type: Wrapper) { | |
gradleVersion = '2.6' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment