From 4affc32a9ac59586f57ed709374bee615ca4c3c5 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Wed, 8 Jul 2026 17:14:19 +0000 Subject: [PATCH 1/2] deps(parents): declare jspecify in jar parent and ignore if unused Declare org.jspecify:jspecify as a dependency in google-cloud-jar-parent so that all client libraries inherit it, resolving "used undeclared dependency" issues caused by the new gapic-generator-java JSpecify onboarding. Also add org.jspecify:jspecify to ignoredUnusedDeclaredDependencies in java-shared-config to prevent "unused declared dependency" warnings/failures in modules that do not use it yet. TAG=agy CONV=d6bb9d61-0aa4-4d9f-af2b-ce10da21c3bd --- google-cloud-jar-parent/pom.xml | 7 +++++++ java-shared-config/java-shared-config/pom.xml | 1 + 2 files changed, 8 insertions(+) diff --git a/google-cloud-jar-parent/pom.xml b/google-cloud-jar-parent/pom.xml index 01c1cc9a8180..e824958cf545 100644 --- a/google-cloud-jar-parent/pom.xml +++ b/google-cloud-jar-parent/pom.xml @@ -148,6 +148,13 @@ + + + org.jspecify + jspecify + + + java9 diff --git a/java-shared-config/java-shared-config/pom.xml b/java-shared-config/java-shared-config/pom.xml index 1323169e6ebb..05801eabfe81 100644 --- a/java-shared-config/java-shared-config/pom.xml +++ b/java-shared-config/java-shared-config/pom.xml @@ -145,6 +145,7 @@ javax.annotation:javax.annotation-api + org.jspecify:jspecify From d18132622b497c2c91637158acad084c1ade0f45 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Wed, 8 Jul 2026 18:38:15 +0000 Subject: [PATCH 2/2] deps(parents): ignore jspecify in overriding parent POMs if unused Update parent POMs that override ignoredUnusedDeclaredDependencies to explicitly include org.jspecify:jspecify. This prevents "unused declared dependency" failures in submodules (like grpc-* modules) that inherit JSpecify from google-cloud-jar-parent but do not use it, when their parent POM overrides the global ignore list defined in java-shared-config. TAG=agy CONV=d6bb9d61-0aa4-4d9f-af2b-ce10da21c3bd --- java-bigquery/pom.xml | 1 + java-bigquerystorage/pom.xml | 1 + java-datastore/pom.xml | 1 + java-logging/pom.xml | 1 + java-pubsub/google-cloud-pubsub/pom.xml | 1 + java-pubsub/pom.xml | 1 + java-spanner-jdbc/pom.xml | 1 + java-storage-nio/google-cloud-nio/pom.xml | 1 + 8 files changed, 8 insertions(+) diff --git a/java-bigquery/pom.xml b/java-bigquery/pom.xml index ad819236599f..c96383dedfac 100644 --- a/java-bigquery/pom.xml +++ b/java-bigquery/pom.xml @@ -135,6 +135,7 @@ org.junit.platform:junit-platform-suite-engine javax.annotation:javax.annotation-api + org.jspecify:jspecify diff --git a/java-bigquerystorage/pom.xml b/java-bigquerystorage/pom.xml index 5fa8dd337e23..dabcddd765bd 100644 --- a/java-bigquerystorage/pom.xml +++ b/java-bigquerystorage/pom.xml @@ -173,6 +173,7 @@ org.junit.jupiter:junit-jupiter-engine org.junit.vintage:junit-vintage-engine + org.jspecify:jspecify diff --git a/java-datastore/pom.xml b/java-datastore/pom.xml index ab18e3bcc51e..0f179079830b 100644 --- a/java-datastore/pom.xml +++ b/java-datastore/pom.xml @@ -214,6 +214,7 @@ com.google.http-client:google-http-client-jackson2 com.google.oauth-client:google-oauth-client javax.annotation:javax.annotation-api + org.jspecify:jspecify diff --git a/java-logging/pom.xml b/java-logging/pom.xml index b60e00540b42..3fec5ba8f610 100644 --- a/java-logging/pom.xml +++ b/java-logging/pom.xml @@ -89,6 +89,7 @@ javax.annotation:javax.annotation-api org.objenesis:objenesis + org.jspecify:jspecify diff --git a/java-pubsub/google-cloud-pubsub/pom.xml b/java-pubsub/google-cloud-pubsub/pom.xml index 194a34deeef9..05584b039eed 100644 --- a/java-pubsub/google-cloud-pubsub/pom.xml +++ b/java-pubsub/google-cloud-pubsub/pom.xml @@ -203,6 +203,7 @@ io.opencensus:opencensus-impl javax.annotation:javax.annotation-api org.assertj:assertj-core + org.jspecify:jspecify diff --git a/java-pubsub/pom.xml b/java-pubsub/pom.xml index e81d3417ae72..b7d9e4e84bf5 100644 --- a/java-pubsub/pom.xml +++ b/java-pubsub/pom.xml @@ -127,6 +127,7 @@ org.objenesis:objenesis javax.annotation:javax.annotation-api + org.jspecify:jspecify diff --git a/java-spanner-jdbc/pom.xml b/java-spanner-jdbc/pom.xml index 1a4901840759..15e481b89c61 100644 --- a/java-spanner-jdbc/pom.xml +++ b/java-spanner-jdbc/pom.xml @@ -373,6 +373,7 @@ com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1 io.opentelemetry:* javax.annotation:javax.annotation-api + org.jspecify:jspecify io.opentelemetry:* diff --git a/java-storage-nio/google-cloud-nio/pom.xml b/java-storage-nio/google-cloud-nio/pom.xml index 1455d5df5698..9cca49d38839 100644 --- a/java-storage-nio/google-cloud-nio/pom.xml +++ b/java-storage-nio/google-cloud-nio/pom.xml @@ -189,6 +189,7 @@ com.google.api:gax:jar javax.annotation:javax.annotation-api + org.jspecify:jspecify