Skip to content

Commit

Permalink
all: fix jacoco
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-roland committed Jul 4, 2024
1 parent b072b21 commit 3a5d41c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions hms-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ android {
}
}
}
unitTests.all {
jacoco {
includeNoLocationClasses = true
excludes = ['jdk.internal.*']
}
}
}
}

Expand Down
6 changes: 3 additions & 3 deletions hms-plugin/jacoco.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ task testDebugCoverageUnitTest(dependsOn: ['instrument', 'testDebugUnitTest']) {
structure(name: 'HmsCoverage') {
classfiles {
fileset(
dir: "$buildDir/intermediates/javac/debug/classes",
dir: "$buildDir/intermediates/javac/debug/compileDebugJavaWithJavac/classes",
excludes: '**/R.class,**/R$*.class,**/BuildConfig.*'
)
}
Expand Down Expand Up @@ -83,7 +83,7 @@ task instrument(dependsOn:'compileDebugUnitTestSources') {
classpath: configurations.jacocoAnt.asPath)

ant.instrument(destdir: offline_instrumented_outputDir) {
fileset(dir: "$buildDir.path/intermediates/javac/debug/classes")
fileset(dir: "$buildDir.path/intermediates/javac/debug/compileDebugJavaWithJavac/classes")
}
}
}
}

0 comments on commit 3a5d41c

Please sign in to comment.