Jacaco powermock offlinetest coverage report

Unable to read execution data file C:\xxx\xxxxx\AndroidStudioProjects\android-xxapp\app\build\jacoco\testDebugUnitTest.exec

task in gradle file added below

task createOfflineTestCoverageReport(dependsOn: [‘instrument’, ‘testDebugUnitTest’]) {
doLast {
ant.taskdef(name: ‘report’,
classname: ‘org.jacoco.ant.ReportTask’,
classpath: configurations.jacocoAnt.asPath)
ant.report() {
executiondata {
ant.file(file: “$buildDir.path/jacoco/testDebugUnitTest.exec”)
structure(name: ‘Example’) {
classfiles {
fileset(dir: “$project.buildDir/intermediates/javac/debug”)
sourcefiles {
fileset(dir: ‘src/main/java’)
//Uncomment if we want the task to generate jacoco html reports. However, the current script does not exclude files.
//An alternative is to used jacocoTestReport after this task finishes
//html(destdir: “$buildDir.path/reports/jacocoHtml”)

Can somebody pls explain why the jacoco.exec file not generating in build while running the above task