diff options
author | Eric Anderson <ejona@google.com> | 2020-03-31 18:04:10 -0700 |
---|---|---|
committer | Eric Anderson <ejona86@gmail.com> | 2020-04-01 10:33:32 -0700 |
commit | 186cfebcbae6646cef9f636316fc2808d7b63e3a (patch) | |
tree | 808074d7f5420e39c72348f06cb7d60f60bcedb5 | |
parent | ffb70cd433818f8f40be285349bfd6764af9f759 (diff) | |
download | grpc-grpc-java-186cfebcbae6646cef9f636316fc2808d7b63e3a.tar.gz |
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.
-rw-r--r-- | all/build.gradle | 14 | ||||
-rw-r--r-- | okhttp/build.gradle | 9 | ||||
-rw-r--r-- | testing/build.gradle | 9 |
3 files changed, 23 insertions, 9 deletions
diff --git a/all/build.gradle b/all/build.gradle index 060a8d0ae..fad1a175f 100644 --- a/all/build.gradle +++ b/all/build.gradle @@ -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 { diff --git a/okhttp/build.gradle b/okhttp/build.gradle index 1f0e4eaf7..b594600c2 100644 --- a/okhttp/build.gradle +++ b/okhttp/build.gradle @@ -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/**', + ]) + } +} diff --git a/testing/build.gradle b/testing/build.gradle index 7365d7d53..54c9dff6d 100644 --- a/testing/build.gradle +++ b/testing/build.gradle @@ -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/**', + ]) + } +} |