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

Commit

Permalink
deps: upgrade protobuf to 3.19.1 (#1571)
Browse files Browse the repository at this point in the history
* deps: protobuf dependency check

* deps: protobuf 3.19 and PROTOBUF_MAVEN_ARTIFACTS in Bazel
  • Loading branch information
suztomo committed Nov 29, 2021
1 parent e3c844c commit 7b354e7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yaml
Expand Up @@ -53,7 +53,10 @@ jobs:
echo "The old one will disappear after 7 days."
- name: Run bazel tests
run: bazel --batch test //... --noshow_progress --test_output=errors
run: |
which bazel
bazel --version
bazel --batch test //... --noshow_progress --test_output=errors
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
Expand Down
25 changes: 24 additions & 1 deletion WORKSPACE
Expand Up @@ -12,7 +12,30 @@ load("//:repositories.bzl", "com_google_api_gax_java_repositories")

com_google_api_gax_java_repositories()

load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
load("@com_google_protobuf//:protobuf_deps.bzl",
"PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")

# From protobuf 3.19, protobuf project started to provide
# PROTOBUF_MAVEN_ARTIFACTS variable so that the Bazel users can resolve their
# dependencies through maven_install.
# https://github.com/protocolbuffers/protobuf/issues/9132
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
RULES_JVM_EXTERNAL_TAG = "4.2"
RULES_JVM_EXTERNAL_SHA = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca"
http_archive(
name = "rules_jvm_external",
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
sha256 = RULES_JVM_EXTERNAL_SHA,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)
load("@rules_jvm_external//:defs.bzl", "maven_install")
maven_install(
artifacts = PROTOBUF_MAVEN_ARTIFACTS,
generate_compat_repositories = True,
repositories = [
"https://repo.maven.apache.org/maven2/",
],
)

protobuf_deps()

Expand Down
2 changes: 1 addition & 1 deletion dependencies.properties
Expand Up @@ -23,7 +23,7 @@ version.gax_httpjson=0.92.1-SNAPSHOT
# Versions for dependencies which actual artifacts differ between Bazel and Gradle.
# Gradle build depends on prebuilt maven artifacts, while Bazel build depends on Bazel workspaces
# with the sources.
version.com_google_protobuf=3.18.1
version.com_google_protobuf=3.19.1
version.google_java_format=1.1
version.io_grpc=1.41.0

Expand Down

0 comments on commit 7b354e7

Please sign in to comment.