Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit 7b354e7

Browse files
authored
deps: upgrade protobuf to 3.19.1 (#1571)
* deps: protobuf dependency check * deps: protobuf 3.19 and PROTOBUF_MAVEN_ARTIFACTS in Bazel
1 parent e3c844c commit 7b354e7

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

‎.github/workflows/ci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ jobs:
5353
echo "The old one will disappear after 7 days."
5454
5555
- name: Run bazel tests
56-
run: bazel --batch test //... --noshow_progress --test_output=errors
56+
run: |
57+
which bazel
58+
bazel --version
59+
bazel --batch test //... --noshow_progress --test_output=errors
5760
5861
- uses: actions/upload-artifact@v2
5962
if: ${{ failure() }}

‎WORKSPACE

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,30 @@ load("//:repositories.bzl", "com_google_api_gax_java_repositories")
1212

1313
com_google_api_gax_java_repositories()
1414

15-
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
15+
load("@com_google_protobuf//:protobuf_deps.bzl",
16+
"PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")
17+
18+
# From protobuf 3.19, protobuf project started to provide
19+
# PROTOBUF_MAVEN_ARTIFACTS variable so that the Bazel users can resolve their
20+
# dependencies through maven_install.
21+
# https://github.com/protocolbuffers/protobuf/issues/9132
22+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
23+
RULES_JVM_EXTERNAL_TAG = "4.2"
24+
RULES_JVM_EXTERNAL_SHA = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca"
25+
http_archive(
26+
name = "rules_jvm_external",
27+
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
28+
sha256 = RULES_JVM_EXTERNAL_SHA,
29+
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
30+
)
31+
load("@rules_jvm_external//:defs.bzl", "maven_install")
32+
maven_install(
33+
artifacts = PROTOBUF_MAVEN_ARTIFACTS,
34+
generate_compat_repositories = True,
35+
repositories = [
36+
"https://repo.maven.apache.org/maven2/",
37+
],
38+
)
1639

1740
protobuf_deps()
1841

‎dependencies.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ version.gax_httpjson=0.92.1-SNAPSHOT
2323
# Versions for dependencies which actual artifacts differ between Bazel and Gradle.
2424
# Gradle build depends on prebuilt maven artifacts, while Bazel build depends on Bazel workspaces
2525
# with the sources.
26-
version.com_google_protobuf=3.18.1
26+
version.com_google_protobuf=3.19.1
2727
version.google_java_format=1.1
2828
version.io_grpc=1.41.0
2929

0 commit comments

Comments
 (0)