Skip to content

Instantly share code, notes, and snippets.

@daicham
Created August 11, 2016 06:55
Show Gist options
  • Save daicham/ca0f51ffeffdcbf72ab799a8b9587426 to your computer and use it in GitHub Desktop.
Save daicham/ca0f51ffeffdcbf72ab799a8b9587426 to your computer and use it in GitHub Desktop.
A sample bulid.gradle of Spring Boot
buildscript {
ext {
springBootVersion = '1.4.0.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'spring-boot'
group 'com.daicham'
version '1.0-SNAPSHOT'
ext {
javaVersion = 1.8
defaultEncoding = 'UTF-8'
lombokVersion = '1.16.10'
}
configurations {
provided
}
sourceSets {
main { compileClasspath += configurations.provided }
}
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
[compileJava, compileTestJava]*.options*.encoding = defaultEncoding
repositories {
mavenCentral()
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
provided("org.projectlombok:lombok:${lombokVersion}")
testCompile("org.springframework.boot:spring-boot-starter-test")
}
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment