-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (63 loc) · 1.55 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
plugins {
id 'java'
id "com.palantir.jacoco-full-report" version "0.4.0"
id "com.palantir.jacoco-coverage" version "0.4.0"
}
group 'org.example'
version '1.0-SNAPSHOT'
apply plugin: 'jacoco'
test.finalizedBy jacocoTestReport
test.outputs.upToDateWhen {false}
sourceCompatibility = 1.11
repositories {
mavenCentral()
}
dependencies {
testImplementation('org.junit.jupiter:junit-jupiter:5.5.2')
testRuntimeOnly('org.junit.jupiter:junit-jupiter:5.5.2')
compile 'org.hamcrest:hamcrest-all:1.3'
compile 'org.mockito:mockito-core:2.18.3'
compile 'org.easytesting:fest-assert:1.4'
compile 'org.hamcrest:hamcrest-all:1.3'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
jacoco {
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
classDumpDir = file("$buildDir/jacoco/classpathdumps")
}
}
jacoco {
toolVersion = "0.8.5"
reportsDir = file("$buildDir/customJacocoReportDir")
}
//Configuring violation rules
/*jacocoTestCoverageVerification{
violationRules {
rule {
limit {
minimum = 0.5
}
}
rule {
enabled = false
element = 'CLASS'
includes = ['org.gradle.*']
limit {
counter = 'LINE'
value = 'TOTALCOUNT'
maximum = 0.3
}
}
}
}*/
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("/jacocoHtml")
}
}