Browse Source

Fix Jacoco coverage runner.

- Correctly set the version of Jacoco to use via classpath dependency in
  build.gradle as noted in JacocoOptions.java
- Move to using jacoco 0.7.8

Bug: 37475483
Test: ./gradlew assembleAndroidTest and locally verify that dist/ and test apks contain
      correct version of Jacoco.

Change-Id: I2577bdaf3d5ba31102191ac0048595e042513618
transition-compose-core
Aurimas Liutikas 7 years ago
parent
commit
0a65df70bc
  1. 1
      build.gradle
  2. 1
      dependencies.gradle
  3. 6
      src/main/groovy/android/support/SupportLibraryPlugin.groovy

1
build.gradle

@ -9,6 +9,7 @@ repos.addMavenRepositories(repositories)
dependencies {
compile libs.gradle
compile libs.jacoco
compile libs.error_prone
compile libs.jarjar_gradle
}

1
dependencies.gradle

@ -24,6 +24,7 @@ libs.junit = 'junit:junit:4.12'
libs.test_runner = 'com.android.support.test:runner:0.6-alpha'
libs.espresso_core = 'com.android.support.test.espresso:espresso-core:2.3-alpha'
libs.espresso_contrib = 'com.android.support.test.espresso:espresso-contrib:2.3-alpha'
libs.jacoco = 'org.jacoco:org.jacoco.core:0.7.8'
def androidPluginVersionOverride = System.getenv("GRADLE_PLUGIN_VERSION")

6
src/main/groovy/android/support/SupportLibraryPlugin.groovy

@ -59,12 +59,6 @@ class SupportLibraryPlugin implements Plugin<Project> {
testInstrumentationRunner INSTRUMENTATION_RUNNER
}
// A workaround for b.android.com/293641 where Android Gradle Plugin delays Jacoco
// dependency resolution if it is not set explicitly.
project.dependencies {
androidJacocoAnt "org.jacoco:org.jacoco.ant:0.7.5.201505241946"
}
library.signingConfigs {
debug {
// Use a local debug keystore to avoid build server issues.

Loading…
Cancel
Save