From 188baa7d1b6c77e06acd5d5380c50562ed4a4a12 Mon Sep 17 00:00:00 2001 From: Shobhit Agarwal Date: Sat, 10 Mar 2018 03:13:45 +0530 Subject: [PATCH] Update jacoco to latest release v0.8.0 (#1993) --- build.gradle | 9 +-------- collect_app/build.gradle | 6 ------ config/quality.gradle | 15 ++++++++++++--- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 6187f2bc0be..3062ccf81c5 100644 --- a/build.gradle +++ b/build.gradle @@ -7,14 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.google.gms:google-services:3.0.0' - classpath 'org.jacoco:org.jacoco.core:0.7.9' - } - configurations.all { - resolutionStrategy { - // use old jacoco so Robolectric test coverage is included in reports - // track https://github.com/paveldudka/JacocoEverywhere/issues/14 for a less hacky solution - force 'org.jacoco:org.jacoco.core:0.7.2.201409121644' - } + classpath 'org.jacoco:org.jacoco.core:0.8.0' } } diff --git a/collect_app/build.gradle b/collect_app/build.gradle index dfd0cc9bfd6..dd0612e3c50 100644 --- a/collect_app/build.gradle +++ b/collect_app/build.gradle @@ -154,12 +154,6 @@ android { unitTests { includeAndroidResources = true returnDefaultValues = true - - all { - jacoco { - includeNoLocationClasses = true - } - } } } } diff --git a/config/quality.gradle b/config/quality.gradle index d22d0936710..d8907ae8757 100644 --- a/config/quality.gradle +++ b/config/quality.gradle @@ -20,7 +20,12 @@ apply plugin: 'jacoco' */ jacoco { - toolVersion '0.7.4+' + // https://bintray.com/bintray/jcenter/org.jacoco:org.jacoco.core + toolVersion = '0.8.0' +} + +tasks.withType(Test) { + jacoco.includeNoLocationClasses = true } // Add checkstyle, findbugs, pmd and lint to the check task. @@ -115,8 +120,12 @@ task jacocoTestReport(type: JacocoReport, dependsOn: 'testDebugUnitTest') { sourceDirectories = files(coverageSourceDirs) classDirectories = fileTree( dir: "${buildDir}/intermediates/classes/debug", - excludes: ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', - '**/*Test*.*', 'android/**/*.*', + excludes: ['**/R.class', + '**/R$*.class', + '**/BuildConfig.*', + '**/Manifest*.*', + '**/*Test*.*', + 'android/**/*.*', '**/*_MembersInjector.class', '**/Dagger*Component.class', '**/Dagger*Component$Builder.class',