Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

[gax-java] chore: include only external-facing gax testing utils in testlibJar #1120

Merged
merged 2 commits into from Jun 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions build.gradle
Expand Up @@ -165,6 +165,8 @@ subprojects {
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource, sourceSets.test.allSource

exclude('**/*Test.java')
}

// JavaDoc
Expand All @@ -190,6 +192,10 @@ subprojects {
task testlibJar(type: Jar, dependsOn: test) {
classifier = 'testlib'
from sourceSets.test.output

include('com/google/api/gax/rpc/testing/**')
Copy link
Contributor

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)?

Copy link
Contributor Author

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.

include('com/google/api/gax/grpc/testing/**')
include('com/google/api/gax/httpjson/testing/**')
}

// ShadowJar
Expand Down