2017-06-30 13:20:46 -04:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'maven'
|
|
|
|
apply plugin: 'idea'
|
|
|
|
apply plugin: 'org.springframework.boot'
|
|
|
|
|
|
|
|
group = 'com.baeldung'
|
|
|
|
version = '0.0.1-SNAPSHOT'
|
|
|
|
|
|
|
|
description = """spring-boot"""
|
|
|
|
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
options.encoding = 'UTF-8'
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
2017-08-01 09:03:07 -04:00
|
|
|
springBoot {
|
|
|
|
executable = true
|
|
|
|
}
|
|
|
|
|
2017-06-30 13:20:46 -04:00
|
|
|
import org.apache.tools.ant.filters.ReplaceTokens
|
|
|
|
processResources {
|
|
|
|
with copySpec {
|
|
|
|
from 'src/main/resources'
|
|
|
|
include '**/application*.yml'
|
|
|
|
include '**/application*.yaml'
|
|
|
|
include '**/application*.properties'
|
|
|
|
project.properties.findAll().each { prop ->
|
|
|
|
|
|
|
|
if (prop.value != null) {
|
|
|
|
filter(ReplaceTokens, tokens: [ (prop.key): prop.value])
|
|
|
|
filter(ReplaceTokens, tokens: [ ('project.' + prop.key): prop.value])
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile("org.springframework.boot:spring-boot-starter")
|
|
|
|
}
|