@@ -12,7 +12,30 @@ load("//:repositories.bzl", "com_google_api_gax_java_repositories")
1212
1313com_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
1740protobuf_deps ()
1841
0 commit comments