From 5c4504878ef63f2bba93ef1b8c089b7339b7202e Mon Sep 17 00:00:00 2001 From: Kaiyi Li Date: Fri, 15 May 2026 19:30:27 +0000 Subject: [PATCH] Upgrade protobuf to 34.1 --- MODULE.bazel | 10 +++++----- README.md | 2 +- WORKSPACE | 2 +- defs.bzl | 12 ++++++------ examples/basicapp/WORKSPACE | 2 +- prereqs.bzl | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index cc23ad0a9..698f2bbfe 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -15,7 +15,7 @@ bazel_dep(name = "stardoc", version = "0.8.0", dev_dependency = True) rules_java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains") use_repo(rules_java_toolchains, "remote_java_tools") -bazel_dep(name = "protobuf", version = "33.4", repo_name = "com_google_protobuf") +bazel_dep(name = "protobuf", version = "34.1", repo_name = "com_google_protobuf") bazel_dep(name = "rules_jvm_external", version = "6.9") bazel_dep(name = "bazel_skylib", version = "1.8.1") bazel_dep(name = "rules_robolectric", version = "4.14.1.2", repo_name = "robolectric") @@ -78,8 +78,8 @@ maven.install( # These technically aren't needed, but the protobuf version pulled # in by these older deps has compatibility issues with the newer # protobuf runtimes. - "com.google.protobuf:protobuf-java:4.33.4", - "com.google.protobuf:protobuf-java-util:4.33.4", + "com.google.protobuf:protobuf-java:4.34.1", + "com.google.protobuf:protobuf-java-util:4.34.1", ], repositories = [ "https://maven.google.com", @@ -117,8 +117,8 @@ maven.install( "jakarta.inject:jakarta.inject-api:2.0.1", "junit:junit:4.13.2", "com.beust:jcommander:1.82", - "com.google.protobuf:protobuf-java:4.33.4", - "com.google.protobuf:protobuf-java-util:4.33.4", + "com.google.protobuf:protobuf-java:4.34.1", + "com.google.protobuf:protobuf-java-util:4.34.1", "com.google.code.findbugs:jsr305:3.0.2", "androidx.databinding:databinding-compiler:8.7.0", "org.ow2.asm:asm:9.6", diff --git a/README.md b/README.md index 6831ecbd3..7fd1fcb2e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() # note that the following line is what is minimally required from protobuf for the java rules # consider using the protobuf_deps() public API from @com_google_protobuf//:protobuf_deps.bzl -load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility +load("@com_google_protobuf//bazel/private/oss:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility proto_bazel_features(name = "proto_bazel_features") # register toolchains load("@rules_java//java:repositories.bzl", "rules_java_toolchains") diff --git a/WORKSPACE b/WORKSPACE index c5a3ae913..74eae371f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -17,7 +17,7 @@ rules_java_dependencies() # note that the following line is what is minimally required from protobuf for the java rules # consider using the protobuf_deps() public API from @com_google_protobuf//:protobuf_deps.bzl -load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility +load("@com_google_protobuf//bazel/private/oss:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility proto_bazel_features(name = "proto_bazel_features") diff --git a/defs.bzl b/defs.bzl index ec41efbb3..afc5c2437 100644 --- a/defs.bzl +++ b/defs.bzl @@ -57,8 +57,8 @@ def rules_android_workspace(): # These technically aren't needed, but the protobuf version pulled # in by these older deps has compatibility issues with the newer # protobuf runtimes. - "com.google.protobuf:protobuf-java:4.33.4", - "com.google.protobuf:protobuf-java-util:4.33.4", + "com.google.protobuf:protobuf-java:4.34.1", + "com.google.protobuf:protobuf-java-util:4.34.1", ], repositories = [ "https://maven.google.com", @@ -94,8 +94,8 @@ def rules_android_workspace(): "jakarta.inject:jakarta.inject-api:2.0.1", "junit:junit:4.13.2", "com.beust:jcommander:1.82", - "com.google.protobuf:protobuf-java:4.33.4", - "com.google.protobuf:protobuf-java-util:4.33.4", + "com.google.protobuf:protobuf-java:4.34.1", + "com.google.protobuf:protobuf-java-util:4.34.1", "com.google.code.findbugs:jsr305:3.0.2", "androidx.databinding:databinding-compiler:8.7.0", "org.ow2.asm:asm:9.6", @@ -150,8 +150,8 @@ def rules_android_workspace(): "com.google.code.gson:gson:2.10.1", # bazel worker api "com.google.errorprone:error_prone_annotations:2.23.0", # bazel worker api "com.google.guava:guava:33.0.0-jre", # bazel worker api - "com.google.protobuf:protobuf-java:4.33.4", # bazel worker api - "com.google.protobuf:protobuf-java-util:4.33.4", # bazel worker api + "com.google.protobuf:protobuf-java:4.34.1", # bazel worker api + "com.google.protobuf:protobuf-java-util:4.34.1", # bazel worker api "junit:junit:4.13.2", # bazel worker api "org.mockito:mockito-core:5.4.0", # bazel worker api "com.google.truth:truth:1.4.0", # bazel worker api diff --git a/examples/basicapp/WORKSPACE b/examples/basicapp/WORKSPACE index 3f4d9342f..53e641f29 100644 --- a/examples/basicapp/WORKSPACE +++ b/examples/basicapp/WORKSPACE @@ -21,7 +21,7 @@ rules_java_dependencies() # note that the following line is what is minimally required from protobuf for the java rules # consider using the protobuf_deps() public API from @com_google_protobuf//:protobuf_deps.bzl -load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility +load("@com_google_protobuf//bazel/private/oss:proto_bazel_features.bzl", "proto_bazel_features") # buildifier: disable=bzl-visibility proto_bazel_features(name = "proto_bazel_features") # register toolchains load("@rules_java//java:repositories.bzl", "rules_java_toolchains") diff --git a/prereqs.bzl b/prereqs.bzl index b1995bf0d..8583fba26 100644 --- a/prereqs.bzl +++ b/prereqs.bzl @@ -63,8 +63,8 @@ def rules_android_prereqs(dev_mode = False): url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/%s/rules_jvm_external-%s.tar.gz" % (RULES_JVM_EXTERNAL_TAG, RULES_JVM_EXTERNAL_TAG), ) - PROTOBUF_VERSION = "33.4" - PROTOBUF_HASH = "bc670a4e34992c175137ddda24e76562bb928f849d712a0e3c2fb2e19249bea1" + PROTOBUF_VERSION = "34.1" + PROTOBUF_HASH = "e4e6ff10760cf747a2decd1867741f561b216bd60cc4038c87564713a6da1848" maybe( http_archive, name = "com_google_protobuf",