aboutsummaryrefslogtreecommitdiffstats
path: root/buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle
blob: d62207b769015f8d82907827b7c23a4941a7416a (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
31
32
33
plugins {
	id 'jacoco'
	id 'tools.refinery.java-conventions'
}

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
}