aboutsummaryrefslogtreecommitdiffstats
path: root/gradle/junit.gradle
blob: c5b60e471096a58b777e06fcebdaf1285041d4a2 (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 libs.hamcrest
	testImplementation libs.junit.api
	testRuntimeOnly libs.junit.engine
	testImplementation libs.junit.params
	testImplementation libs.mockito.core
	testImplementation libs.mockito.junit
}

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
}