Skip to content

Commit

Permalink
configure jacoco
Browse files Browse the repository at this point in the history
  • Loading branch information
Robothy committed Oct 11, 2023
1 parent 0258323 commit 7c5c63c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ plugins {
id 'jacoco'
id 'maven-publish'
id 'io.franzbecker.gradle-lombok' version '5.0.0'
id 'com.robothy.github-repository-release-plugin' version '1.1'
id 'signing'
id 'com.robothy.cn-repo' version '1.8'
}
Expand Down Expand Up @@ -52,6 +53,22 @@ test {
useJUnitPlatform()
}

task mergeReports(type: JacocoReport) {
executionData.from(project.fileTree(dir: '.', include: '**/build/jacoco/test.exec'))
sourceDirectories.from(project.fileTree(dir: '.', include: '**/src/main/java/**'))
classDirectories.from(project.fileTree(dir: '.', include: '**/build/classes/java/main/**'))
reports {
xml.required.set(true)
html.required.set(true)
//csv.required.set(true)
}
}

project.subprojects.each {
it.afterEvaluate {
mergeReports.dependsOn(it.tasks['test'])
}
}

publishing {

Expand Down

0 comments on commit 7c5c63c

Please sign in to comment.