fix jacoco test coverage reporting (#335)

This commit is contained in:
Albert Lo 2022-06-20 17:19:20 -07:00 коммит произвёл Mohtasim
Родитель 15d4025ea8
Коммит 726d2b30f7
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -6,7 +6,8 @@ jacoco {
task jacocoTestReport(type: JacocoReport, dependsOn: ['testCallingDebugUnitTest']) {
def coverageSourceDirs = [
"src/main/java"
"src/main/java",
"src/calling/java"
]
def fileFilter = [
'**/R.class',
@ -17,17 +18,17 @@ task jacocoTestReport(type: JacocoReport, dependsOn: ['testCallingDebugUnitTest'
'**/Manifest*.*'
]
def javaClasses = fileTree(
dir: "$buildDir/intermediates/classes/debug",
dir: "$buildDir/intermediates/javac/callingDebug",
excludes: fileFilter
)
def kotlinClasses = fileTree(
dir: "$buildDir/tmp/kotlin-classes/debug",
dir: "$buildDir/tmp/kotlin-classes/callingDebug",
excludes: fileFilter
)
classDirectories.setFrom(files([javaClasses], [kotlinClasses]))
sourceDirectories.setFrom(files(coverageSourceDirs))
executionData(fileTree(dir: "$buildDir", includes: [
"jacoco/testDebugUnitTest.exec"
"jacoco/testCallingDebugUnitTest.exec"
]))
reports {
xml.required = true