mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-12-22 14:48:23 -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:+'
|
||||
}
|
||||
|
||||
|
||||
jacocoTestReport {
|
||||
// Add Android sources/classes for coverage
|
||||
additionalSourceDirs files(androidModule.android.sourceSets.main.java.srcDirs)
|
||||
additionalClassDirs firstVariant.javaCompile.outputs.files
|
||||
// We can't use additionalClassDirs because of this:
|
||||
// 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 {
|
||||
xml.enabled true
|
||||
|
Loading…
Reference in New Issue
Block a user