diff --git a/alts/BUILD.bazel b/alts/BUILD.bazel
index 819daedcc8..73420e1105 100644
--- a/alts/BUILD.bazel
+++ b/alts/BUILD.bazel
@@ -19,7 +19,6 @@ java_library(
"@com_google_protobuf//:protobuf_java_util",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
artifact("io.netty:netty-buffer"),
artifact("io.netty:netty-codec"),
artifact("io.netty:netty-common"),
@@ -45,7 +44,6 @@ java_library(
artifact("com.google.auth:google-auth-library-oauth2-http"),
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
artifact("io.netty:netty-common"),
artifact("io.netty:netty-handler"),
artifact("io.netty:netty-transport"),
diff --git a/api/BUILD.bazel b/api/BUILD.bazel
index 07be1d58dc..6bf3375e9f 100644
--- a/api/BUILD.bazel
+++ b/api/BUILD.bazel
@@ -13,6 +13,5 @@ java_library(
artifact("com.google.errorprone:error_prone_annotations"),
artifact("com.google.guava:failureaccess"), # future transitive dep of Guava. See #5214
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
],
)
diff --git a/auth/BUILD.bazel b/auth/BUILD.bazel
index 095fae5af8..a19562fa7f 100644
--- a/auth/BUILD.bazel
+++ b/auth/BUILD.bazel
@@ -11,6 +11,5 @@ java_library(
artifact("com.google.auth:google-auth-library-credentials"),
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
],
)
diff --git a/core/BUILD.bazel b/core/BUILD.bazel
index a1d3d19e82..35c20628d0 100644
--- a/core/BUILD.bazel
+++ b/core/BUILD.bazel
@@ -30,7 +30,6 @@ java_library(
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.errorprone:error_prone_annotations"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
artifact("io.perfmark:perfmark-api"),
artifact("org.codehaus.mojo:animal-sniffer-annotations"),
],
diff --git a/examples/pom.xml b/examples/pom.xml
index fdf92e9eca..5cd721b50d 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -55,6 +55,11 @@
protobuf-java-util
${protobuf.version}
+
+ com.google.j2objc
+ j2objc-annotations
+ 3.0.0
+
org.apache.tomcat
annotations-api
diff --git a/gcp-observability/build.gradle b/gcp-observability/build.gradle
index 0de7f8363b..f869bd61a7 100644
--- a/gcp-observability/build.gradle
+++ b/gcp-observability/build.gradle
@@ -65,8 +65,7 @@ dependencies {
libraries.auto.value.annotations, // Use our newer version
libraries.guava.jre, // Use our newer version
libraries.protobuf.java.util, // Use our newer version
- libraries.re2j, // Use our newer version
- libraries.j2objc.annotations // Explicit dependency to keep in step with version used by guava
+ libraries.re2j // Use our newer version
testImplementation testFixtures(project(':grpc-api')),
project(':grpc-testing'),
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 299ca60ab4..488ead9ad8 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -42,7 +42,6 @@ guava-testlib = "com.google.guava:guava-testlib:33.2.1-android"
# May be different from the -android version.
guava-jre = "com.google.guava:guava:33.2.1-jre"
hdrhistogram = "org.hdrhistogram:HdrHistogram:2.2.2"
-j2objc-annotations = " com.google.j2objc:j2objc-annotations:3.0.0"
jakarta-servlet-api = "jakarta.servlet:jakarta.servlet-api:5.0.0"
javax-annotation = "org.apache.tomcat:annotations-api:6.0.53"
javax-servlet-api = "javax.servlet:javax.servlet-api:4.0.1"
diff --git a/grpclb/BUILD.bazel b/grpclb/BUILD.bazel
index 517155bbfc..2dd24bb52a 100644
--- a/grpclb/BUILD.bazel
+++ b/grpclb/BUILD.bazel
@@ -21,7 +21,6 @@ java_library(
"@io_grpc_grpc_proto//:grpclb_load_balancer_java_proto",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
],
)
diff --git a/grpclb/build.gradle b/grpclb/build.gradle
index cea599828f..93331053b0 100644
--- a/grpclb/build.gradle
+++ b/grpclb/build.gradle
@@ -19,9 +19,9 @@ dependencies {
implementation project(':grpc-core'),
project(':grpc-protobuf'),
project(':grpc-stub'),
+ libraries.guava,
libraries.protobuf.java,
- libraries.protobuf.java.util,
- libraries.guava
+ libraries.protobuf.java.util
runtimeOnly libraries.errorprone.annotations
compileOnly libraries.javax.annotation
testImplementation libraries.truth,
diff --git a/inprocess/BUILD.bazel b/inprocess/BUILD.bazel
index aa614df654..bef3861271 100644
--- a/inprocess/BUILD.bazel
+++ b/inprocess/BUILD.bazel
@@ -13,6 +13,5 @@ java_library(
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.errorprone:error_prone_annotations"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
],
)
diff --git a/netty/BUILD.bazel b/netty/BUILD.bazel
index daf2e83e59..9fe52ea586 100644
--- a/netty/BUILD.bazel
+++ b/netty/BUILD.bazel
@@ -15,7 +15,6 @@ java_library(
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.errorprone:error_prone_annotations"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
artifact("io.netty:netty-buffer"),
artifact("io.netty:netty-codec"),
artifact("io.netty:netty-codec-http"),
diff --git a/okhttp/BUILD.bazel b/okhttp/BUILD.bazel
index 7cf1775da2..80068c9bb5 100644
--- a/okhttp/BUILD.bazel
+++ b/okhttp/BUILD.bazel
@@ -17,7 +17,6 @@ java_library(
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.errorprone:error_prone_annotations"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
artifact("com.squareup.okhttp:okhttp"),
artifact("com.squareup.okio:okio"),
artifact("io.perfmark:perfmark-api"),
diff --git a/protobuf-lite/BUILD.bazel b/protobuf-lite/BUILD.bazel
index 087723e95f..dad794e8b5 100644
--- a/protobuf-lite/BUILD.bazel
+++ b/protobuf-lite/BUILD.bazel
@@ -10,7 +10,6 @@ java_library(
"//api",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
] + select({
":android": ["@com_google_protobuf//:protobuf_javalite"],
"//conditions:default": ["@com_google_protobuf//:protobuf_java"],
diff --git a/protobuf/BUILD.bazel b/protobuf/BUILD.bazel
index 47cc8f9d03..724c78ca6e 100644
--- a/protobuf/BUILD.bazel
+++ b/protobuf/BUILD.bazel
@@ -13,6 +13,5 @@ java_library(
artifact("com.google.api.grpc:proto-google-common-protos"),
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
],
)
diff --git a/services/build.gradle b/services/build.gradle
index de716c9fa1..fade7aef3f 100644
--- a/services/build.gradle
+++ b/services/build.gradle
@@ -27,11 +27,10 @@ dependencies {
implementation project(':grpc-core'),
project(':grpc-protobuf'),
project(':grpc-util'),
- libraries.protobuf.java.util,
- libraries.guava.jre // JRE required by protobuf-java-util
+ libraries.guava.jre, // JRE required by protobuf-java-util
+ libraries.protobuf.java.util
runtimeOnly libraries.errorprone.annotations,
- libraries.j2objc.annotations, // Explicit dependency to keep in step with version used by guava
libraries.gson // to fix checkUpperBoundDeps error here
compileOnly libraries.javax.annotation
testImplementation project(':grpc-testing'),
diff --git a/stub/BUILD.bazel b/stub/BUILD.bazel
index 8950a1cfd3..6d06e01f91 100644
--- a/stub/BUILD.bazel
+++ b/stub/BUILD.bazel
@@ -12,7 +12,6 @@ java_library(
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.errorprone:error_prone_annotations"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
],
)
diff --git a/testing/BUILD.bazel b/testing/BUILD.bazel
index 668a666c2f..78f9b84075 100644
--- a/testing/BUILD.bazel
+++ b/testing/BUILD.bazel
@@ -18,7 +18,6 @@ java_library(
"//util",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
artifact("com.google.truth:truth"),
artifact("junit:junit"),
],
diff --git a/util/BUILD.bazel b/util/BUILD.bazel
index 7a38063a98..8fb00e21d5 100644
--- a/util/BUILD.bazel
+++ b/util/BUILD.bazel
@@ -15,7 +15,6 @@ java_library(
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.errorprone:error_prone_annotations"),
artifact("com.google.guava:guava"),
- artifact("com.google.j2objc:j2objc-annotations"),
artifact("org.codehaus.mojo:animal-sniffer-annotations"),
],
)
diff --git a/xds/build.gradle b/xds/build.gradle
index a1d5aa753c..a738145a2a 100644
--- a/xds/build.gradle
+++ b/xds/build.gradle
@@ -52,6 +52,7 @@ dependencies {
project(':grpc-services'),
project(':grpc-auth'),
project(path: ':grpc-alts', configuration: 'shadow'),
+ libraries.guava,
libraries.gson,
libraries.re2j,
libraries.auto.value.annotations,