-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
73 lines (55 loc) · 1.53 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
buildscript {
ext {
springBootVersion = "1.5.7.RELEASE"
}
}
plugins {
id "java"
id "idea"
id "eclipse"
id "org.springframework.boot" version "1.5.7.RELEASE" apply false
id "io.spring.dependency-management" version "1.0.3.RELEASE" apply false
}
subprojects { project ->
def self = project?.toString()
if (self?.contains("docker")) {
task clean {
doLast {
delete project.buildDir
}
}
return
}
apply plugin: "java"
version = "0.0.1"
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
apply plugin: "io.spring.dependency-management"
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
}
}
apply plugin: "org.springframework.boot"
springBoot {
executable = true
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-data-rest")
compileOnly("org.projectlombok:lombok")
testCompile("org.springframework.boot:spring-boot-starter-test")
}
if (self?.contains("embedded")) return
rootProject.project.tasks.findByName("clean").dependsOn ":docker:redisDown"
[test, build, bootRun].each {
it.shouldRunAfter clean, ":docker:composeUp"
it.dependsOn ":docker:composeUp"
it.finalizedBy ":docker:composeDown"
}
}
if (System.getenv("TRAVIS")) {
println "apply travis colored schema"
apply from: "https://raw.githubusercontent.com/mendhak/Gradle-Travis-Colored-Output/master/ColoredOutput.gradle"
}