Created
December 22, 2015 16:28
-
-
Save rafaeltoledo/941025e7f416fe636369 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'jacoco' | |
task jacocoTestReport(type: JacocoReport, dependsOn: 'testDebugUnitTest') { | |
reports { | |
xml.enabled = true | |
html.enabled = true | |
} | |
jacocoClasspath = configurations['androidJacocoAnt'] | |
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*'] | |
def debugTree = fileTree(dir: "${buildDir}/intermediates/classes/debug", excludes: fileFilter) | |
def mainSrc = "${project.projectDir}/src/main/java" | |
sourceDirectories = files([mainSrc]) | |
classDirectories = files([debugTree]) | |
executionData = files("${buildDir}/jacoco/testDebugUnitTest.exec") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment