Step 5: given them to jacoco task to publish the coverage (It should interanlly merege them)
While many of them merges smoothly, many still cry for "execution data does not match". (I checked, these are both java and kotlin classes)
reports {
csv.enabled true
csv.destination file("${rootProject.buildDir}/jacoco/coverage-report.csv")
xml.enabled true
xml.destination file("${rootProject.buildDir}/jacoco/coverage-report.xml")
html.enabled true
html.destination file("${rootProject.buildDir}/jacoco/html-report")
}
def javaClasses = []
def kotlinClasses = []
def javaSrc = []
def kotlinSrc = []
def javaPath = "intermediates/javac"
def kotlinPath = "tmp/kotlin-classes"
javaSrc << "$proj.projectDir/src/main/java"
kotlinSrc << "$proj.projectDir/src/main/kotlin"
javaClasses << fileTree(dir: "<my_path>/build/${javaPath}/devDebug", excludes: fileFilter)
kotlinClasses << fileTree(dir: "<my_path>/build/${kotlinPath}/devDebug", excludes: fileFilter)
sourceDirectories.from = files([javaSrc, kotlinSrc])
classDirectories.from = files([javaClasses, kotlinClasses])
getExecutionData().setFrom(
fileTree(dir: "code_coverage", includes: ['**/*.ec']))
Environment Info
OS: Linux 5.15.0-1050-azure amd64
Java: openjdk 17.0.9 2023-10-17
JVM: 1.8.0_382
Gradle 7.5
Kotlin: 1.6.21
Groovy: 3.0.10
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
What step maybe changing the .class files to make it feel different and marking as "does not match"?
Debug build setting has
- Minify false
- Shrink false