Last active
November 9, 2016 13:28
-
-
Save rafaeltoledo/521ca928290f0c41102b 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 | |
} | |
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