aboutsummaryrefslogtreecommitdiffstats
path: root/buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-11-17 03:06:39 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-11-17 03:06:39 +0100
commit720b9e2fb0968905e5a80f6099eab37554a6af58 (patch)
treeb471f4da129efbfa730830a70e0107de852833d7 /buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle
parentbuild: use version catalogs (diff)
downloadrefinery-720b9e2fb0968905e5a80f6099eab37554a6af58.tar.gz
refinery-720b9e2fb0968905e5a80f6099eab37554a6af58.tar.zst
refinery-720b9e2fb0968905e5a80f6099eab37554a6af58.zip
build: move scripts into script plugins
Script plugins allow applying other plugins from plugins { } blocks, which simplifies the build script.
Diffstat (limited to 'buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle')
-rw-r--r--buildSrc/src/main/groovy/tools.refinery.junit-conventions.gradle33
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 @@
1plugins {
2 id 'jacoco'
3 id 'tools.refinery.java-conventions'
4}
5
6dependencies {
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
15def jacocoTestReport = tasks.named('jacocoTestReport')
16jacocoTestReport.configure {
17 dependsOn test
18 reports {
19 xml.required = true
20 }
21}
22
23tasks.named('test') {
24 useJUnitPlatform {
25 excludeTags 'slow'
26 }
27 finalizedBy jacocoTestReport
28}
29
30tasks.register('slowTest', Test) {
31 useJUnitPlatform()
32 finalizedBy jacocoTestReport
33}