Skip to content

Commit

Permalink
Reconfigure jacoco
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit committed Oct 13, 2024
1 parent 79fdc14 commit 514e5f5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,27 @@ dependencies {
testImplementation "com.fasterxml.jackson.module:jackson-module-scala_2.11:${fasterxmlVersion}"
}

tasks.register('codeCoverageReport', JacocoReport) {
dependsOn tasks.test
executionData.setFrom(fileTree(project.rootDir).include("**/build/jacoco/*.exec"))

sourceDirectories.setFrom(files(sourceSets.main.allSource.srcDirs))
classDirectories.setFrom(fileTree(dir: "build/classes/java/main") {
exclude '**/SomeExcludedClass.class'
})

reports {
xml.required.set(true)
xml.outputLocation.set(file("${buildDir}/reports/jacoco/report.xml"))
html.required.set(true)
csv.required.set(false)
}
}

tasks.test {
finalizedBy tasks.codeCoverageReport
}

jar {
manifest {
attributes(
Expand Down

0 comments on commit 514e5f5

Please sign in to comment.