Skip to content

Instantly share code, notes, and snippets.

@braska
Created February 17, 2016 19:46
Show Gist options
  • Save braska/0eaca1e17ed4767698f2 to your computer and use it in GitHub Desktop.
Save braska/0eaca1e17ed4767698f2 to your computer and use it in GitHub Desktop.
Spring example gradle config
buildscript {
ext {
springBootVersion = '1.4.0.BUILD-SNAPSHOT'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'spring-boot'
jar {
baseName = 'online-shop'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-actuator')
compile "org.springframework.boot:spring-boot-starter-jetty"
compile('org.springframework.boot:spring-boot-starter-aop')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-devtools')
compile('org.springframework.boot:spring-boot-starter-freemarker')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.session:spring-session')
compile('org.springframework.boot:spring-boot-starter-web')
/**
* So we can use yaml config files in spring-boot
*/
compile "org.yaml:snakeyaml:1.13"
runtime('org.postgresql:postgresql')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment