Skip to content

Instantly share code, notes, and snippets.

@wicaksana
Created February 3, 2017 23:10
Show Gist options
  • Save wicaksana/b01f161867b5c7d811e1ca5232c817a4 to your computer and use it in GitHub Desktop.
Save wicaksana/b01f161867b5c7d811e1ca5232c817a4 to your computer and use it in GitHub Desktop.
Gradle for Spring Boot
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.1.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
jar {
baseName = 'gs-spring-boot'
version = '0.1.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
// tag::jetty[]
compile("org.springframework.boot:spring-boot-starter-web") {
exclude module: "spring-boot-starter-tomcat"
}
compile("org.springframework.boot:spring-boot-starter-jetty")
// end::jetty[]
// tag::actuator[]
compile("org.springframework.boot:spring-boot-starter-actuator")
// end::actuator[]
testCompile("junit:junit")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment