test: add jacoco

This commit is contained in:
ReaJason
2024-11-24 13:32:05 +08:00
parent d37b0a1929
commit a42b2bd38c
3 changed files with 30 additions and 1 deletions
+8
View File
@@ -1,5 +1,6 @@
allprojects {
apply(plugin: 'java')
apply(plugin: 'jacoco')
repositories {
mavenCentral()
@@ -11,6 +12,13 @@ allprojects {
}
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.11.3')
testImplementation 'org.junit.jupiter:junit-jupiter'