Skip to content

Instantly share code, notes, and snippets.

@kolorobot
Last active December 21, 2017 16:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kolorobot/71f0f208ffcd7c5979e7 to your computer and use it in GitHub Desktop.
Save kolorobot/71f0f208ffcd7c5979e7 to your computer and use it in GitHub Desktop.
Spring Boot with overridden Spring Version (with dependency management)
buildscript {
ext {
springBootVersion = '1.2.5.RELEASE'
}
ext['spring.version'] = '4.2.1.RELEASE'
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("io.spring.gradle:dependency-management-plugin:0.5.3.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'spring-boot'
apply plugin: 'io.spring.dependency-management'
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")
}
dependencyManagement {
imports {
mavenBom 'io.spring.platform:platform-bom:1.1.3.RELEASE'
}
}
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