mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-21 23:48:18 -05:00
Exclude the android folder from coverage
This commit is contained in:
parent
66a91efe8b
commit
9aa83bebe2
@ -16,10 +16,22 @@ dependencies {
|
|||||||
testCompile 'org.robolectric:robolectric:+'
|
testCompile 'org.robolectric:robolectric:+'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
jacocoTestReport {
|
jacocoTestReport {
|
||||||
// Add Android sources/classes for coverage
|
// Add Android sources/classes for coverage
|
||||||
additionalSourceDirs files(androidModule.android.sourceSets.main.java.srcDirs)
|
// We can't use additionalClassDirs because of this:
|
||||||
additionalClassDirs firstVariant.javaCompile.outputs.files
|
// http://stackoverflow.com/a/17411305/1454178
|
||||||
|
// Additionally, for whatever reason, the exclude() call doesn't work
|
||||||
|
// inside doFirst {}, please don't move this.
|
||||||
|
def jacocoExcludes = [
|
||||||
|
"android/**/*"
|
||||||
|
]
|
||||||
|
firstVariant.javaCompile.exclude(jacocoExcludes).outputs.files
|
||||||
|
|
||||||
|
doFirst {
|
||||||
|
sourceDirectories = files(androidModule.android.sourceSets.main.java.srcDirs)
|
||||||
|
classDirectories = firstVariant.javaCompile.outputs.files
|
||||||
|
}
|
||||||
|
|
||||||
reports {
|
reports {
|
||||||
xml.enabled true
|
xml.enabled true
|
||||||
|
Loading…
Reference in New Issue
Block a user