[gax-java] chore: include only external-facing gax testing utils in testlibJar #1120
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1120 +/- ##
=========================================
Coverage 78.72% 78.72%
Complexity 1169 1169
=========================================
Files 204 204
Lines 5184 5184
Branches 416 416
=========================================
Hits 4081 4081
Misses 928 928
Partials 175 175 Continue to review full report at Codecov.
|
@@ -190,6 +190,10 @@ subprojects { | |||
task testlibJar(type: Jar, dependsOn: test) { | |||
classifier = 'testlib' | |||
from sourceSets.test.output | |||
|
|||
include('com/google/api/gax/rpc/testing/**') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How exactly to define the external-facing gax testing utils here? I see this puts only the "testing" subfolders, but is that it? There are other infrastructure classes, which are not in testing subfodlers. For example com.google.api.gax.core.FakeApiClock
or com.google.api.gax.rpc.AccumulatingStreamObserver
.
Also, does this solve the other part of the issue (missing source files in the artifact)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elharo to confirm whether the external-facing utils are limited to the testing
packages.
The testlib sources are already in the sources jar, but I've added something to strip out unit tests as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this fix a bug? If so, add it to the PR description.
Done, and this PR is already linked to issue #700. |
This PR fixes #700 by removing unit tests from the testlib and sources jar. On doing
./gradlew testlibJar
, I now see only the following files in the resulting{gax,gax-grpc,gax-httpjson}-1.56.0.testlib.jar
files: