-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
171 lines (125 loc) · 4.34 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id "io.spring.dependency-management" version "1.0.5.RELEASE"
id 'org.springframework.boot' version '1.5.14.RELEASE'
id 'net.saliman.cobertura' version '2.5.4'
}
allprojects {
repositories.mavenCentral()
apply plugin: 'jacoco'
apply plugin: 'idea'
apply plugin: 'project-report'
idea.module.downloadJavadoc = true
ext {
springBootVersion = '1.5.14.RELEASE'
junit5Version = '5.2.0'
jacksonVersion = '2.9.+'
}
}
subprojects {
apply plugin: 'io.spring.dependency-management'
apply plugin: "java"
apply plugin: 'net.saliman.cobertura'
version = '1.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
dependencyManagement.imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
}
ext.libraries = [
vavr : 'io.vavr:vavr:0.9.+',
commons_lang3 : 'org.apache.commons:commons-lang3:3.+',
jackson_annotations: "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}",
jackson_core : "com.fasterxml.jackson.core:jackson-core:2.9.+${jacksonVersion}",
jackson_databind : "com.fasterxml.jackson.core:jackson-databind:2.9.+${jacksonVersion}",
mockito_core : 'org.mockito:mockito-core:2.12.0'
]
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}
}
project(':controller') {
jar.baseName = 'taxy4fun-rest-controller'
dependencies {
implementation project(':service-api')
implementation project(':test-utils')
implementation libraries.vavr,
libraries.commons_lang3,
libraries.jackson_annotations,
libraries.jackson_core,
libraries.jackson_databind,
'org.springframework.boot:spring-boot-starter',
'org.springframework:spring-webmvc:4.+'
testImplementation 'org.springframework.boot:spring-boot-starter-test',
libraries.mockito_core
testRuntimeOnly 'javax.servlet:javax.servlet-api:3.1.0'
}
}
project(':service-api') {
jar.baseName = 'taxy4fun-service-api'
dependencies {
implementation 'org.springframework.boot:spring-boot-starter',
libraries.vavr,
libraries.commons_lang3
testImplementation 'org.springframework.boot:spring-boot-starter-test',
libraries.mockito_core
}
}
project(':hello-world') {
apply plugin: 'org.springframework.boot'
apply plugin: 'application'
jar.baseName = 'taxy4fun-hello-world'
test {
useJUnitPlatform()
}
dependencies {
implementation libraries.commons_lang3,
'org.springframework.boot:spring-boot-starter'
testImplementation ('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'junit' , module: 'junit'
}
testImplementation "org.junit.jupiter:junit-jupiter-api:${junit5Version}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit5Version}"
}
mainClassName = 'com.springuers.taxy4fun.HelloWorldApp'
}
project(':persistence') {
jar.baseName = 'taxy4fun-persistence'
dependencies {
implementation libraries.commons_lang3,
'org.springframework.boot:spring-boot-starter',
'org.springframework.boot:spring-boot-starter-data-jpa'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'com.h2database:h2:1.4.+'
}
}
project(':test-utils') {
jar.baseName = 'taxy4fun-test-utils'
dependencies {
implementation libraries.jackson_annotations,
libraries.jackson_core,
libraries.jackson_databind
}
bootRepackage.enabled = false
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.enabled true
html.enabled false
csv.enabled false
}
}
codeCoverageReport.dependsOn {
subprojects*.test
}