I'm trying to generate a Jacoco test report in Gradle. When I try to sync my code, I will receive the following error:
Error:(56, 0) Could not find method jacocoTestReport() for arguments [build_38ehqsoyd54r3n1gzrop303so$_run_closure4@10012308] on project ':app' of type org.gradle.api.Project.
My build.gradle file contains the following items:
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.7.6.201602180812"
reportsDir = file("$buildDir/reports/jacoco")
}
jacocoTestReport {
group = "Reporting"
reports {
xml.enabled true
csv.enabled false
html.destination "${buildDir}/reports/coverage"
}
}
When I look at the documentation , I don't see anything which I'm doing wrong.
Gradle version: 3.3
Why am I receiving this error and how can I fix it?