Skip to content

Commit

Permalink
build: Upgrade protobuf to 21.7 and ensure we choose the right version.
Browse files Browse the repository at this point in the history
And add it as an explicit dependency of the gazelle plugin.
Otherwise, a random one would be picked, usually from one of the grpc
dependencies.
  • Loading branch information
Borja Lorente committed Jul 11, 2023
1 parent 81d3c4a commit 2f0406c
Show file tree
Hide file tree
Showing 6 changed files with 934 additions and 926 deletions.
5 changes: 5 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ contrib_rules_jvm_gazelle_setup()

load("@rules_jvm_external//:defs.bzl", "maven_install")
load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS")
load("//third_party:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION")

# This only exists to give us a target to use with `./tools/update-dependencies.sh`.
# If you update this, then please re-run that script and commit the changes to repo.
Expand Down Expand Up @@ -91,6 +92,10 @@ maven_install(
},
"org.slf4j:slf4j-api:1.7.32",
"org.slf4j:slf4j-jdk14:1.7.32",

# We explicitly declare a protobuf runtime version
# so that it coincides with the one we use to generate the code.
"com.google.protobuf:protobuf-java:{}".format(PROTOBUF_JAVA_VERSION),
] + IO_GRPC_GRPC_JAVA_ARTIFACTS,
fail_if_repin_required = True,
fetch_sources = True,
Expand Down
Loading

0 comments on commit 2f0406c

Please sign in to comment.