feat: GH workflow (init)
Some checks failed
Build and Release / Quality gates (push) Failing after 1m27s
Publish Reports to GitHub Pages / Publish static reports (push) Failing after 1s
Build and Release / Publish tagged distribution (push) Has been skipped

feat: JaCoCo
This commit is contained in:
2026-04-14 00:36:56 +02:00
parent 5266650bc1
commit a7bc24886e
3 changed files with 370 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ plugins {
id 'java'
id 'application'
id 'pmd'
id 'jacoco'
id 'com.palantir.git-version' version '4.0.0'
}
@@ -12,6 +13,10 @@ configurations {
mockitoAgent
}
jacoco {
toolVersion = '0.8.14'
}
pmd {
consoleOutput = true
toolVersion = '7.20.0'
@@ -43,6 +48,34 @@ dependencies {
tasks.withType(Test).configureEach {
useJUnitPlatform()
jvmArgs += "-javaagent:${configurations.mockitoAgent.singleFile}"
finalizedBy(tasks.named('jacocoTestReport'))
reports {
junitXml.required = true
html.required = true
}
}
tasks.withType(Pmd).configureEach {
reports {
xml.required = true
html.required = true
}
}
tasks.named('jacocoTestReport', JacocoReport) {
dependsOn(tasks.named('test'))
reports {
xml.required = true
csv.required = false
html.required = true
}
}
tasks.named('check') {
dependsOn(tasks.named('jacocoTestReport'))
}
application {