blob: 44a463c7d2c7514491f4f3e5f2f74faba4bc3d57 (
plain) (
blame)
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
|
apply plugin: 'jacoco'
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
testImplementation "org.hamcrest:hamcrest:${hamcrestVersion}"
testImplementation "org.mockito:mockito-core:${mockitoVersion}"
testImplementation "org.mockito:mockito-junit-jupiter:${mockitoVersion}"
}
def jacocoTestReport = tasks.named('jacocoTestReport')
jacocoTestReport.configure {
dependsOn test
reports {
xml.required = true
}
}
tasks.named('test') {
useJUnitPlatform {
excludeTags 'slow'
}
finalizedBy jacocoTestReport
}
tasks.register('slowTest', Test) {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
|