diff --git a/java-shared-dependencies/unmanaged-dependency-check/src/main/java/com/google/cloud/UnmanagedDependencyCheck.java b/java-shared-dependencies/unmanaged-dependency-check/src/main/java/com/google/cloud/UnmanagedDependencyCheck.java index b86722a66f..f06d2437ff 100644 --- a/java-shared-dependencies/unmanaged-dependency-check/src/main/java/com/google/cloud/UnmanagedDependencyCheck.java +++ b/java-shared-dependencies/unmanaged-dependency-check/src/main/java/com/google/cloud/UnmanagedDependencyCheck.java @@ -19,13 +19,17 @@ */ public class UnmanagedDependencyCheck { // Regex of handwritten artifacts. - // There are customized artifacts defined in some handwritten libraries, e.g., firestore and - // datastore, add entries in regex to exclude these artifacts. + // There are customized artifacts defined in gapic-bom and handwritten libraries, + // e.g., firestore and datastore, add entries in regex to exclude these artifacts. private final static String downstreamArtifact = "(com.google.cloud:google-.*)|" - + "(com.google.api.grpc:(grpc|proto)-google-.*)|" + + "(com.google.api.grpc:(gapic|grpc|proto)-google-.*)|" + "(com.google.cloud:proto-google-cloud-firestore-bundle-.*)|" - + "(com.google.cloud.datastore:datastore-.*-proto-client)"; + + "(com.google.cloud.datastore:datastore-.*-proto-client)|" + + "(com.google.analytics:google-analytics-.*)|" + + "(com.google.apis:google-api-.*)|" + + "(com.google.area120:google-area120-.*)|" + + "(io.grafeas:grafeas)"; /** * @param args An array with two elements.

The first string is the path of Java shared diff --git a/java-shared-dependencies/unmanaged-dependency-check/src/test/java/com/google/cloud/UnmanagedDependencyCheckTest.java b/java-shared-dependencies/unmanaged-dependency-check/src/test/java/com/google/cloud/UnmanagedDependencyCheckTest.java index cac88ae426..e95544d37f 100644 --- a/java-shared-dependencies/unmanaged-dependency-check/src/test/java/com/google/cloud/UnmanagedDependencyCheckTest.java +++ b/java-shared-dependencies/unmanaged-dependency-check/src/test/java/com/google/cloud/UnmanagedDependencyCheckTest.java @@ -20,7 +20,7 @@ public void getUnmanagedDependencyFromSamePomTest() } @Test - public void getUnmanagedDependencyFromHWBomTest() + public void getUnmanagedDependencyFromGapicAndHandwrittenBomTest() throws MavenRepositoryException, InvalidVersionSpecificationException { List unManagedDependencies = UnmanagedDependencyCheck.getUnmanagedDependencies( diff --git a/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/google-internal-artifact-test-case-pom.xml b/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/google-internal-artifact-test-case-pom.xml index 668976848c..029b9f431a 100644 --- a/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/google-internal-artifact-test-case-pom.xml +++ b/java-shared-dependencies/unmanaged-dependency-check/src/test/resources/google-internal-artifact-test-case-pom.xml @@ -55,6 +55,13 @@ import pom + + com.google.cloud + gapic-libraries-bom + 1.23.0 + import + pom +