Skip to content

Commit

Permalink
all: Move jacocoTestReport exclusions to individual projects
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ejona86 committed Apr 1, 2020
1 parent ffb70cd commit 186cfeb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
14 changes: 5 additions & 9 deletions all/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 9 additions & 0 deletions okhttp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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/**',
])
}
}
9 changes: 9 additions & 0 deletions testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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/**',
])
}
}

0 comments on commit 186cfeb

Please sign in to comment.