diff --git a/dependencies/src/main/java/com/google/cloud/tools/opensource/dependencies/Bom.java b/dependencies/src/main/java/com/google/cloud/tools/opensource/dependencies/Bom.java index 3d3531044..61d5912ef 100644 --- a/dependencies/src/main/java/com/google/cloud/tools/opensource/dependencies/Bom.java +++ b/dependencies/src/main/java/com/google/cloud/tools/opensource/dependencies/Bom.java @@ -148,6 +148,14 @@ public static boolean shouldSkipBomMember(Artifact artifact) { return true; } + // Skipping grpc-android as it is not used by Google Cloud Client Libraries for Java. Checking + // for availability of + // this unused artifact on Maven Central has caused BOM validation check to fail in the past. See + // https://github.com/googleapis/sdk-platform-java/pull/1989#issuecomment-1724039670 + if ("grpc-android".equals(artifact.getArtifactId())) { + return true; + } + return false; } } diff --git a/dependencies/src/test/java/com/google/cloud/tools/opensource/dependencies/BomTest.java b/dependencies/src/test/java/com/google/cloud/tools/opensource/dependencies/BomTest.java index 200d7e8ca..87fdc05c7 100644 --- a/dependencies/src/test/java/com/google/cloud/tools/opensource/dependencies/BomTest.java +++ b/dependencies/src/test/java/com/google/cloud/tools/opensource/dependencies/BomTest.java @@ -27,6 +27,7 @@ import java.nio.file.Path; import java.util.List; import org.eclipse.aether.artifact.Artifact; +import org.eclipse.aether.artifact.DefaultArtifact; import org.eclipse.aether.resolution.ArtifactDescriptorException; import org.junit.Assert; import org.junit.Test; @@ -77,4 +78,9 @@ public void testReadBom_path() .inOrder(); } + @Test + public void testIsSkipped_grpcAndroid() { + Artifact artifact = new DefaultArtifact("io.grpc:grpc-android:jar:1.58.0"); + Truth.assertThat(Bom.shouldSkipBomMember(artifact)).isTrue(); + } }