forked from xp-dojo-classes/tdd-bank-account-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
51 lines (42 loc) · 1.2 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
defaultTasks 'clean', 'build', 'jacocoTestReport'
repositories {
jcenter()
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'jacoco'
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2',
'org.assertj:assertj-core:3.16.1',
'org.jmock:jmock-junit5:2.11.0',
'org.mockito:mockito-core:3.3.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
}
ext {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
testLogging {
afterSuite { desc, result ->
if (!desc.parent) {
new File(buildDir, "test-results.json").text =
"{ " +
"\"result\": \"${result.resultType}\", " +
"\"tests\": ${result.testCount}, " +
"\"passed\": ${result.successfulTestCount}, " +
"\"failed\": ${result.failedTestCount}, " +
"\"skipped\": ${result.skippedTestCount} " +
"}"
}
}
}
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled true
}
}