-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
195 lines (154 loc) · 4.89 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
buildscript {
repositories {
mavenCentral()
maven { url 'http://repository.activeeon.com/content/groups/proactive/' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.3.5.RELEASE'
classpath "com.diffplug.gradle.spotless:spotless:2.4.0"
classpath "org.ow2.proactive:coding-rules:1.0.0"
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.7.1'
classpath "io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE"
}
dependencies {
delete "gradle/ext"
ant.unjar src: configurations.classpath.find { it.name.startsWith("coding-rules") }, dest: 'gradle/ext'
}
}
apply plugin: 'spring-boot'
apply plugin: 'com.github.kt3k.coveralls'
apply from: "$rootDir/gradle/ext/coding-format.gradle"
apply plugin: "io.spring.dependency-management"
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'war'
group = 'org.ow2.proactive'
bootRepackage {
enabled = false
}
configurations {
// The following module is excluded to avoid clashes when embedded inside the ProActive Scheduler
all*.exclude module: 'spring-boot-starter-logging'
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
coveralls {
sourceDirs = allprojects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"
}
ext {
generatedSrcDir = "$projectDir/src/generated/java"
}
repositories {
jcenter()
maven { url 'http://repository.activeeon.com/content/groups/proactive/' }
}
sourceSets {
generated {
java {
srcDirs += generatedSrcDir
}
}
main {
java {
srcDirs += generatedSrcDir
}
}
integrationTest {
java.srcDir file('src/integration-test/java')
resources.srcDir file('src/integration-test/resources')
compileClasspath = sourceSets.main.output + configurations.integrationTestCompile
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
}
}
springBoot {
mainClass = 'org.ow2.proactive.microservice.Application'
}
war {
baseName = "microservice"
version = version
}
dependencyManagement {
imports {
mavenBom "org.ow2.proactive:parent-bom:${version}"
}
}
dependencies {
compile "org.ow2.proactive:microservices-common:$version"
compile 'org.projectlombok:lombok'
compile 'commons-fileupload:commons-fileupload'
compile 'org.apache.logging.log4j:log4j-web'
compile 'org.springframework.boot:spring-boot-starter-log4j2'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.hateoas:spring-hateoas'
providedCompile 'org.springframework.boot:spring-boot-starter-tomcat'
compile 'io.springfox:springfox-spring-web'
compile 'io.springfox:springfox-swagger2'
compile 'io.springfox:springfox-swagger-ui'
compile 'com.google.guava:guava'
compile 'com.fasterxml.jackson.core:jackson-databind'
testCompile 'org.hamcrest:hamcrest-junit'
testCompile 'com.google.truth:truth'
testCompile 'junit:junit'
testCompile 'nl.jqno.equalsverifier:equalsverifier'
testCompile 'org.mockito:mockito-core'
testCompile 'com.google.code.gson:gson'
testCompile 'com.jayway.restassured:rest-assured'
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
test {
jacoco {
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
}
}
task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
classpath += sourceSets.test.runtimeClasspath
jacoco {
destinationFile = file("$buildDir/jacoco/jacocoIntegrationTest.exec")
}
testLogging {
events "passed", "skipped", "failed"
}
}
jacocoTestReport {
executionData test, integrationTest
sourceSets project.sourceSets.main
reports {
html.enabled = true
xml.enabled = true
}
}
clean {
sourceSets.generated.java.srcDirs.each {
srcDir -> delete srcDir
}
}
task wrapper(type: Wrapper) {
gradleVersion = '3.3'
}
check.dependsOn integrationTest
jacocoTestReport.dependsOn check
tasks.coveralls.dependsOn jacocoTestReport
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
}
idea {
module {
testSourceDirs += file('src/integration-test/java')
testSourceDirs += file('src/integration-test/resources')
scopes.TEST.plus += [
configurations.integrationTestCompile,
configurations.integrationTestRuntime
]
}
}