-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
executable file
·92 lines (74 loc) · 2.43 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
buildscript {
ext {
springBootVersion = '1.5.4.RELEASE'
springCloudVersion = 'Dalston.SR1'
lombokVersion = '1.16.16'
hibernateJpa21Api = '1.0.0.Final'
}
}
plugins {
id 'java'
id 'idea'
id 'eclipse'
id 'cn.bestwu.propdeps-idea' version '0.0.10'
id 'cn.bestwu.propdeps-eclipse' version '0.0.10'
id 'cn.bestwu.propdeps' version '0.0.10' apply false
id 'cn.bestwu.propdeps-maven' version '0.0.10' apply false
id 'org.springframework.boot' version '1.5.4.RELEASE' apply false
id 'io.spring.dependency-management' version '1.0.3.RELEASE' apply false
}
configure(allprojects) { p ->
group 'daggerok'
version '0.0.1'
def self = p.toString()
if (self?.contains('twitter-docker') || p.name.endsWith('modules')) {
task clean {
doLast {
delete p.buildDir
}
}
println "early stopped $self configuration"
return
}
apply plugin: 'java'
apply plugin: 'maven'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
mavenCentral()
}
if (rootProject.name == p.name) {
println "early stopped $self"
return
}
apply plugin: 'io.spring.dependency-management'
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion"
}
}
apply plugin: 'cn.bestwu.propdeps'
apply plugin: 'cn.bestwu.propdeps-maven'
dependencies {
compile 'org.springframework.boot:spring-boot-starter',
'com.fasterxml.jackson.core:jackson-databind',
'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
compileOnly('org.projectlombok:lombok')
optional("org.springframework.boot:spring-boot-configuration-processor")
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompileOnly('org.projectlombok:lombok')
}
apply plugin: 'org.springframework.boot'
springBoot {
executable = true
}
def backingServicesUp = ':twitter-docker:twitter-docker-backing-services:backingServicesUp'
def backingServicesDown = ':twitter-docker:twitter-docker-backing-services:backingServicesDown'
if (p.name.startsWith('twitter-docker')) return
[test, build, bootRun].each { task ->
task.dependsOn ':assemble', backingServicesUp
task.finalizedBy backingServicesDown
task.shouldRunAfter clean, ':assemble', backingServicesDown
}
}