How to fix JaCoCo reportDir is deprecated

Viewed 1702

Gradle 7.1

jacoco {
    toolVersion = "0.8.5"
    reportsDir = file("$buildDir/jacoco")
}

How to replace the statement with reportsDir to hide warning about deprecated feature?

1 Answers

Have you tried checking the plugin's documentation? As you can see here the reportsDir property seems to have been replaced by reportsDirectory.

Also the JacocoPluginExtension documentation mentions that the reportsDirectory property is the one to be used for setting the output directory.

Related