diff options
Diffstat (limited to 'buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle')
-rw-r--r-- | buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle b/buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle new file mode 100644 index 00000000..d62207b7 --- /dev/null +++ b/buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle | |||
@@ -0,0 +1,33 @@ | |||
1 | plugins { | ||
2 | id 'jacoco' | ||
3 | id 'tools.refinery.java-conventions' | ||
4 | } | ||
5 | |||
6 | dependencies { | ||
7 | testImplementation libs.hamcrest | ||
8 | testImplementation libs.junit.api | ||
9 | testRuntimeOnly libs.junit.engine | ||
10 | testImplementation libs.junit.params | ||
11 | testImplementation libs.mockito.core | ||
12 | testImplementation libs.mockito.junit | ||
13 | } | ||
14 | |||
15 | def jacocoTestReport = tasks.named('jacocoTestReport') | ||
16 | jacocoTestReport.configure { | ||
17 | dependsOn test | ||
18 | reports { | ||
19 | xml.required = true | ||
20 | } | ||
21 | } | ||
22 | |||
23 | tasks.named('test') { | ||
24 | useJUnitPlatform { | ||
25 | excludeTags 'slow' | ||
26 | } | ||
27 | finalizedBy jacocoTestReport | ||
28 | } | ||
29 | |||
30 | tasks.register('slowTest', Test) { | ||
31 | useJUnitPlatform() | ||
32 | finalizedBy jacocoTestReport | ||
33 | } | ||