all: Move jacocoTestReport exclusions to individual projects

The sourceSets.main.output.collect should probably be improved at some point to
improve loading performance, but this is technically better than what we had
before so let's call it a win and move on.
This commit is contained in:
Eric Anderson 2020-03-31 18:04:10 -07:00 committed by Eric Anderson
parent ffb70cd433
commit 186cfebcba
3 changed files with 23 additions and 9 deletions

View File

@ -60,15 +60,11 @@ jacocoTestReport {
html.enabled = true
}
additionalSourceDirs.from(files(subprojects.sourceSets.main.allSource.srcDirs))
sourceDirectories.from(files(subprojects.sourceSets.main.allSource.srcDirs))
classDirectories.from(files(subprojects.sourceSets.main.output).collect {
fileTree(dir: it,
exclude: [
'**/io/grpc/internal/testing/**',
'**/io/grpc/okhttp/internal/**',
])
})
subprojects.each { subproject ->
additionalSourceDirs.from(subproject.jacocoTestReport.additionalSourceDirs)
sourceDirectories.from(subproject.jacocoTestReport.sourceDirectories)
classDirectories.from(subproject.jacocoTestReport.classDirectories)
}
}
coveralls {

View File

@ -36,3 +36,12 @@ checkstyleMain.exclude '**/io/grpc/okhttp/internal/**'
javadoc.exclude 'io/grpc/okhttp/internal/**'
javadoc.options.links 'http://square.github.io/okhttp/2.x/okhttp/'
jacocoTestReport {
classDirectories.from = sourceSets.main.output.collect {
fileTree(dir: it,
exclude: [
'**/io/grpc/okhttp/internal/**',
])
}
}

View File

@ -33,3 +33,12 @@ dependencies {
}
javadoc { exclude 'io/grpc/internal/**' }
jacocoTestReport {
classDirectories.from = sourceSets.main.output.collect {
fileTree(dir: it,
exclude: [
'**/io/grpc/internal/testing/**',
])
}
}