0

I added the jacoco aggregation plugin to my build

plugins {
    id("jacoco-report-aggregation")
}

When I run the task ./gradlew testCodeCoverageReport, the report is correctly generated in build/reports/jacoco/testCodeCoverageReport/html/index.html but it's kinda painful to lookup the file.

How can I simply automate gradle to print the path in the build log?

apflieger
  • 912
  • 10
  • 18

1 Answers1

1

Here's the solution:

tasks.withType<JacocoReport> {
    val reports = reports
    doLast {
        println("HTML report generated: " + reports.html.entryPoint)
    }
}
apflieger
  • 912
  • 10
  • 18