Skip to content

Commit 684f754

Browse files
authored
test: add duplicate class exclusion for gapic-generator-java artifact (#5962)
* Adds an exclusion for the gapic-generator-java artifact in assertUniqueClasses check. * BOMContentTest currently fails since inclusion of this artifact in gapic-generator-java-bom as of v2.18.0. gapic-generator-java is not intended for use by client libraries, and was added for downstream usage by the spring-cloud-gcp code generator.
1 parent 4477816 commit 684f754

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/src/test/java/com/google/cloud/BomContentTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ private static void assertUniqueClasses(List<Artifact> allArtifacts)
146146
continue;
147147
}
148148

149+
if (currentArtifact.getGroupId().equals("com.google.api")
150+
&& currentArtifact.getArtifactId().equals("gapic-generator-java")) {
151+
// Skip gapic-generator-java artifact, which is part of gapic-generator-java-bom
152+
// but not intended to be client library user-facing. It has copied classes of its dependencies in it.
153+
continue;
154+
}
155+
149156
String artifactCoordinates = Artifacts.toCoordinates(currentArtifact);
150157

151158
for (String className : classPathEntry.getFileNames()) {

0 commit comments

Comments
 (0)