Skip to content

Instantly share code, notes, and snippets.

@letientai299
Created July 12, 2017 08:15
Show Gist options
  • Save letientai299/61ea74ca1f3c829fa6a9680533d8b91a to your computer and use it in GitHub Desktop.
Save letientai299/61ea74ca1f3c829fa6a9680533d8b91a to your computer and use it in GitHub Desktop.
Gradle Spring boot build config with commons settings
buildscript {
ext {
springBootVersion = '1.5.4.RELEASE'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.10"
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: "net.ltgt.errorprone"
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
configurations.errorprone {
// This error_prone version is the latest that use javac 8.
// Work around to fix build issue when lombok still not ready for java 9
resolutionStrategy.force 'com.google.errorprone:error_prone_core:2.0.15'
}
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter')
compile('org.springframework.boot:spring-boot-devtools')
// Lombok project
compile group: 'org.projectlombok', name: 'lombok', version: '1.16.16'
// JPA
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile group: 'org.postgresql', name: 'postgresql', version: '42.1.1'
compile('com.h2database:h2')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('pl.pragmatists:JUnitParams:1.1.0')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment