Skip to content

Commit

Permalink
fix: Exclude appengine artifacts from duplicate class check (#2326)
Browse files Browse the repository at this point in the history
  • Loading branch information
suztomo authored Feb 17, 2023
1 parent 344dc70 commit 17df2e9
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,16 @@ private static void assertUniqueClasses(List<Artifact> allArtifacts)
for (ClassPathEntry classPathEntry : result.getClassPath()) {
Artifact currentArtifact = classPathEntry.getArtifact();

if (!currentArtifact.getGroupId().contains("google")
|| currentArtifact.getGroupId().contains("com.google.android")
|| currentArtifact.getGroupId().contains("com.google.cloud.bigtable")
|| currentArtifact.getArtifactId().startsWith("proto-")
|| currentArtifact.getArtifactId().equals("protobuf-javalite")
|| currentArtifact.getArtifactId().equals("appengine-testing")) {
String artifactId = currentArtifact.getArtifactId();
String groupId = currentArtifact.getGroupId();
if (!groupId.contains("google")
|| groupId.contains("com.google.android")
|| groupId.contains("com.google.cloud.bigtable")
|| artifactId.startsWith("proto-")
|| artifactId.equals("protobuf-javalite")
|| artifactId.equals("appengine-testing")
|| artifactId.equals("appengine-remote-api")
|| artifactId.equals("appengine-api-1.0-sdk")) {
// Skip libraries that produce false positives.
// See: https://github.com/GoogleCloudPlatform/cloud-opensource-java/issues/2226
continue;
Expand Down

0 comments on commit 17df2e9

Please sign in to comment.