xref: /aosp_15_r20/external/grpc-grpc/bazel/grpc_deps.bzl (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1# Copyright 2021 The gRPC Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14"""Load dependencies needed to compile and test the grpc library as a 3rd-party consumer."""
15
16load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
17load("@com_github_grpc_grpc//bazel:grpc_python_deps.bzl", "grpc_python_deps")
18
19# buildifier: disable=unnamed-macro
20def grpc_deps():
21    """Loads dependencies need to compile and test the grpc library."""
22
23    native.bind(
24        name = "upb_amalgamation_lib",
25        actual = "@com_google_protobuf//upb:amalgamation",
26    )
27
28    native.bind(
29        name = "upb_base_lib",
30        actual = "@com_google_protobuf//upb/base",
31    )
32
33    native.bind(
34        name = "upb_message_lib",
35        actual = "@com_google_protobuf//upb:message",
36    )
37
38    native.bind(
39        name = "upb_mem_lib",
40        actual = "@com_google_protobuf//upb/mem",
41    )
42
43    native.bind(
44        name = "upb_reflection",
45        actual = "@com_google_protobuf//upb:reflection",
46    )
47
48    native.bind(
49        name = "upb_lib_descriptor",
50        actual = "@com_google_protobuf//upb:descriptor_upb_proto",
51    )
52
53    native.bind(
54        name = "upb_lib_descriptor_reflection",
55        actual = "@com_google_protobuf//upb:descriptor_upb_proto_reflection",
56    )
57
58    native.bind(
59        name = "upb_textformat_lib",
60        actual = "@com_google_protobuf//upb/text",
61    )
62
63    native.bind(
64        name = "upb_json_lib",
65        actual = "@com_google_protobuf//upb/json",
66    )
67
68    native.bind(
69        name = "upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
70        actual = "@com_google_protobuf//upb:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
71    )
72
73    native.bind(
74        name = "libssl",
75        actual = "@boringssl//:ssl",
76    )
77
78    native.bind(
79        name = "libcrypto",
80        actual = "@boringssl//:crypto",
81    )
82
83    native.bind(
84        name = "madler_zlib",
85        actual = "@zlib//:zlib",
86    )
87
88    native.bind(
89        name = "protobuf",
90        actual = "@com_google_protobuf//:protobuf",
91    )
92
93    native.bind(
94        name = "protobuf_clib",
95        actual = "@com_google_protobuf//:protoc_lib",
96    )
97
98    native.bind(
99        name = "protobuf_headers",
100        actual = "@com_google_protobuf//:protobuf_headers",
101    )
102
103    native.bind(
104        name = "protocol_compiler",
105        actual = "@com_google_protobuf//:protoc",
106    )
107
108    native.bind(
109        name = "cares",
110        actual = "@com_github_cares_cares//:ares",
111    )
112
113    native.bind(
114        name = "gtest",
115        actual = "@com_google_googletest//:gtest",
116    )
117
118    native.bind(
119        name = "fuzztest",
120        actual = "@com_google_fuzztest//fuzztest",
121    )
122
123    native.bind(
124        name = "fuzztest_main",
125        actual = "@com_google_fuzztest//fuzztest:fuzztest_gtest_main",
126    )
127
128    native.bind(
129        name = "benchmark",
130        actual = "@com_github_google_benchmark//:benchmark",
131    )
132
133    native.bind(
134        name = "re2",
135        actual = "@com_googlesource_code_re2//:re2",
136    )
137
138    native.bind(
139        name = "grpc_cpp_plugin",
140        actual = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
141    )
142
143    native.bind(
144        name = "grpc++_codegen_proto",
145        actual = "@com_github_grpc_grpc//:grpc++_codegen_proto",
146    )
147
148    native.bind(
149        name = "opencensus-context",
150        actual = "@io_opencensus_cpp//opencensus/context:context",
151    )
152
153    native.bind(
154        name = "opencensus-trace",
155        actual = "@io_opencensus_cpp//opencensus/trace:trace",
156    )
157
158    native.bind(
159        name = "opencensus-trace-context_util",
160        actual = "@io_opencensus_cpp//opencensus/trace:context_util",
161    )
162
163    native.bind(
164        name = "opencensus-trace-propagation",
165        actual = "@io_opencensus_cpp//opencensus/trace:grpc_trace_bin",
166    )
167
168    native.bind(
169        name = "opencensus-trace-span_context",
170        actual = "@io_opencensus_cpp//opencensus/trace:span_context",
171    )
172
173    native.bind(
174        name = "opencensus-stats",
175        actual = "@io_opencensus_cpp//opencensus/stats:stats",
176    )
177
178    native.bind(
179        name = "opencensus-stats-test",
180        actual = "@io_opencensus_cpp//opencensus/stats:test_utils",
181    )
182
183    native.bind(
184        name = "opencensus-with-tag-map",
185        actual = "@io_opencensus_cpp//opencensus/tags:with_tag_map",
186    )
187
188    native.bind(
189        name = "opencensus-tags",
190        actual = "@io_opencensus_cpp//opencensus/tags:tags",
191    )
192
193    native.bind(
194        name = "opencensus-tags-context_util",
195        actual = "@io_opencensus_cpp//opencensus/tags:context_util",
196    )
197
198    native.bind(
199        name = "opencensus-trace-stackdriver_exporter",
200        actual = "@io_opencensus_cpp//opencensus/exporters/trace/stackdriver:stackdriver_exporter",
201    )
202
203    native.bind(
204        name = "opencensus-stats-stackdriver_exporter",
205        actual = "@io_opencensus_cpp//opencensus/exporters/stats/stackdriver:stackdriver_exporter",
206    )
207
208    native.bind(
209        name = "googleapis_trace_grpc_service",
210        actual = "@com_google_googleapis//google/devtools/cloudtrace/v2:cloudtrace_cc_grpc",
211    )
212
213    native.bind(
214        name = "googleapis_monitoring_grpc_service",
215        actual = "@com_google_googleapis//google/monitoring/v3:monitoring_cc_grpc",
216    )
217
218    native.bind(
219        name = "googleapis_logging_grpc_service",
220        actual = "@com_google_googleapis//google/logging/v2:logging_cc_grpc",
221    )
222
223    native.bind(
224        name = "googleapis_logging_cc_proto",
225        actual = "@com_google_googleapis//google/logging/v2:logging_cc_proto",
226    )
227
228    if "platforms" not in native.existing_rules():
229        http_archive(
230            name = "platforms",
231            sha256 = "8150406605389ececb6da07cbcb509d5637a3ab9a24bc69b1101531367d89d74",
232            urls = [
233                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
234                "https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
235            ],
236        )
237
238    if "boringssl" not in native.existing_rules():
239        http_archive(
240            name = "boringssl",
241            # Use github mirror instead of https://boringssl.googlesource.com/boringssl
242            # to obtain a boringssl archive with consistent sha256
243            sha256 = "06ba43ff1825c8a9a45dae7f85e532153a531707f6a3e56be1e892fd2d3b75f6",
244            strip_prefix = "boringssl-e14d29f68c2d1b02e06f10c83b9b8ea4d061f8df",
245            urls = [
246                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/e14d29f68c2d1b02e06f10c83b9b8ea4d061f8df.tar.gz",
247                "https://github.com/google/boringssl/archive/e14d29f68c2d1b02e06f10c83b9b8ea4d061f8df.tar.gz",
248            ],
249        )
250
251    if "zlib" not in native.existing_rules():
252        http_archive(
253            name = "zlib",
254            build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD",
255            sha256 = "18337cdb32562003c39d9f7322b9a166ad4abfb2b909566428e11f96d2385586",
256            strip_prefix = "zlib-09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851",
257            urls = [
258                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851.tar.gz",
259                "https://github.com/madler/zlib/archive/09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851.tar.gz",
260            ],
261        )
262
263    if "com_google_protobuf" not in native.existing_rules():
264        http_archive(
265            name = "com_google_protobuf",
266            sha256 = "387478260190c540388839a3449c635a69708d92fc38ea6e2364b1196db90ea5",
267            strip_prefix = "protobuf-2434ef2adf0c74149b9d547ac5fb545a1ff8b6b5",
268            urls = [
269                # https://github.com/protocolbuffers/protobuf/commits/v26.1
270                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/2434ef2adf0c74149b9d547ac5fb545a1ff8b6b5.tar.gz",
271                "https://github.com/protocolbuffers/protobuf/archive/2434ef2adf0c74149b9d547ac5fb545a1ff8b6b5.tar.gz",
272            ],
273            patches = [
274                "@com_github_grpc_grpc//third_party:protobuf.patch",
275            ],
276            patch_args = ["-p1"],
277        )
278
279    if "com_google_googletest" not in native.existing_rules():
280        http_archive(
281            name = "com_google_googletest",
282            sha256 = "31bf78bd91b96dd5e24fab3bb1d7f3f7453ccbaceec9afb86d6e4816a15ab109",
283            strip_prefix = "googletest-2dd1c131950043a8ad5ab0d2dda0e0970596586a",
284            urls = [
285                # 2023-10-09
286                "https://github.com/google/googletest/archive/2dd1c131950043a8ad5ab0d2dda0e0970596586a.tar.gz",
287            ],
288        )
289
290    if "com_google_fuzztest" not in native.existing_rules():
291        # when updating this remember to run:
292        # bazel run @com_google_fuzztest//bazel:setup_configs > tools/fuzztest.bazelrc
293        http_archive(
294            name = "com_google_fuzztest",
295            sha256 = "cdf8d8cd3cdc77280a7c59b310edf234e489a96b6e727cb271e7dfbeb9bcca8d",
296            strip_prefix = "fuzztest-4ecaeb5084a061a862af8f86789ee184cd3d3f18",
297            urls = [
298                # 2023-05-16
299                "https://github.com/google/fuzztest/archive/4ecaeb5084a061a862af8f86789ee184cd3d3f18.tar.gz",
300            ],
301        )
302
303    if "rules_cc" not in native.existing_rules():
304        http_archive(
305            name = "rules_cc",
306            sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf",
307            strip_prefix = "rules_cc-0.0.9",
308            urls = [
309                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz",
310                "https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz",
311            ],
312        )
313
314    if "com_github_google_benchmark" not in native.existing_rules():
315        http_archive(
316            name = "com_github_google_benchmark",
317            sha256 = "8e7b955f04bc6984e4f14074d0d191474f76a6c8e849e04a9dced49bc975f2d4",
318            strip_prefix = "benchmark-344117638c8ff7e239044fd0fa7085839fc03021",
319            urls = [
320                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/benchmark/archive/344117638c8ff7e239044fd0fa7085839fc03021.tar.gz",
321                "https://github.com/google/benchmark/archive/344117638c8ff7e239044fd0fa7085839fc03021.tar.gz",
322            ],
323        )
324
325    if "com_googlesource_code_re2" not in native.existing_rules():
326        http_archive(
327            name = "com_googlesource_code_re2",
328            sha256 = "1ae8ccfdb1066a731bba6ee0881baad5efd2cd661acd9569b689f2586e1a50e9",
329            strip_prefix = "re2-2022-04-01",
330            urls = [
331                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/re2/archive/2022-04-01.tar.gz",
332                "https://github.com/google/re2/archive/2022-04-01.tar.gz",
333            ],
334        )
335
336    if "com_github_cares_cares" not in native.existing_rules():
337        http_archive(
338            name = "com_github_cares_cares",
339            build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD",
340            sha256 = "bf26e5b25e259911914a85ae847b6d723488adb5af4f8bdeb9d0871a318476e3",
341            strip_prefix = "c-ares-6360e96b5cf8e5980c887ce58ef727e53d77243a",
342            urls = [
343                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/c-ares/c-ares/archive/6360e96b5cf8e5980c887ce58ef727e53d77243a.tar.gz",
344                "https://github.com/c-ares/c-ares/archive/6360e96b5cf8e5980c887ce58ef727e53d77243a.tar.gz",
345            ],
346        )
347
348    if "com_google_absl" not in native.existing_rules():
349        http_archive(
350            name = "com_google_absl",
351            sha256 = "338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440",
352            strip_prefix = "abseil-cpp-20240116.0",
353            urls = [
354                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/20240116.0.tar.gz",
355                "https://github.com/abseil/abseil-cpp/archive/20240116.0.tar.gz",
356            ],
357        )
358
359    if "bazel_toolchains" not in native.existing_rules():
360        # list of releases is at https://github.com/bazelbuild/bazel-toolchains/releases
361        http_archive(
362            name = "bazel_toolchains",
363            sha256 = "179ec02f809e86abf56356d8898c8bd74069f1bd7c56044050c2cd3d79d0e024",
364            strip_prefix = "bazel-toolchains-4.1.0",
365            urls = [
366                "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
367                "https://github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
368            ],
369        )
370
371    if "bazel_skylib" not in native.existing_rules():
372        http_archive(
373            name = "bazel_skylib",
374            urls = [
375                "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
376                "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
377            ],
378            sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
379        )
380
381    if "bazel_compdb" not in native.existing_rules():
382        http_archive(
383            name = "bazel_compdb",
384            sha256 = "bcecfd622c4ef272fd4ba42726a52e140b961c4eac23025f18b346c968a8cfb4",
385            strip_prefix = "bazel-compilation-database-0.4.5",
386            urls = [
387                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/grailbio/bazel-compilation-database/archive/0.4.5.tar.gz",
388                "https://github.com/grailbio/bazel-compilation-database/archive/0.4.5.tar.gz",
389            ],
390        )
391
392    if "io_opencensus_cpp" not in native.existing_rules():
393        http_archive(
394            name = "io_opencensus_cpp",
395            sha256 = "46b3b5812c150a21bacf860c2f76fc42b89773ed77ee954c32adeb8593aa2a8e",
396            strip_prefix = "opencensus-cpp-5501a1a255805e0be83a41348bb5f2630d5ed6b3",
397            urls = [
398                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-cpp/archive/5501a1a255805e0be83a41348bb5f2630d5ed6b3.tar.gz",
399                "https://github.com/census-instrumentation/opencensus-cpp/archive/5501a1a255805e0be83a41348bb5f2630d5ed6b3.tar.gz",
400            ],
401        )
402
403    if "envoy_api" not in native.existing_rules():
404        http_archive(
405            name = "envoy_api",
406            sha256 = "ddd3beedda1178a79e0d988f76f362002aced09749452515853f106e22bd2249",
407            strip_prefix = "data-plane-api-78f198cf96ecdc7120ef640406770aa01af775c4",
408            urls = [
409                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/data-plane-api/archive/78f198cf96ecdc7120ef640406770aa01af775c4.tar.gz",
410                "https://github.com/envoyproxy/data-plane-api/archive/78f198cf96ecdc7120ef640406770aa01af775c4.tar.gz",
411            ],
412        )
413
414    if "io_bazel_rules_go" not in native.existing_rules():
415        http_archive(
416            name = "io_bazel_rules_go",
417            sha256 = "69de5c704a05ff37862f7e0f5534d4f479418afc21806c887db544a316f3cb6b",
418            urls = [
419                "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.27.0/rules_go-v0.27.0.tar.gz",
420                "https://github.com/bazelbuild/rules_go/releases/download/v0.27.0/rules_go-v0.27.0.tar.gz",
421            ],
422        )
423
424    if "build_bazel_rules_apple" not in native.existing_rules():
425        http_archive(
426            name = "build_bazel_rules_apple",
427            sha256 = "34c41bfb59cdaea29ac2df5a2fa79e5add609c71bb303b2ebb10985f93fa20e7",
428            urls = [
429                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_apple/releases/download/3.1.1/rules_apple.3.1.1.tar.gz",
430                "https://github.com/bazelbuild/rules_apple/releases/download/3.1.1/rules_apple.3.1.1.tar.gz",
431            ],
432        )
433
434    if "build_bazel_apple_support" not in native.existing_rules():
435        http_archive(
436            name = "build_bazel_apple_support",
437            sha256 = "cf4d63f39c7ba9059f70e995bf5fe1019267d3f77379c2028561a5d7645ef67c",
438            urls = [
439                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/apple_support/releases/download/1.11.1/apple_support.1.11.1.tar.gz",
440                "https://github.com/bazelbuild/apple_support/releases/download/1.11.1/apple_support.1.11.1.tar.gz",
441            ],
442        )
443
444    if "com_google_googleapis" not in native.existing_rules():
445        http_archive(
446            name = "com_google_googleapis",
447            sha256 = "5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0",
448            strip_prefix = "googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92",
449            build_file = Label("//bazel:googleapis.BUILD"),
450            urls = [
451                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz",
452                "https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz",
453            ],
454        )
455
456    if "bazel_gazelle" not in native.existing_rules():
457        http_archive(
458            name = "bazel_gazelle",
459            sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
460            urls = [
461                "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
462                "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
463            ],
464        )
465
466    if "opencensus_proto" not in native.existing_rules():
467        http_archive(
468            name = "opencensus_proto",
469            sha256 = "b7e13f0b4259e80c3070b583c2f39e53153085a6918718b1c710caf7037572b0",
470            strip_prefix = "opencensus-proto-0.3.0/src",
471            urls = [
472                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz",
473                "https://github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz",
474            ],
475        )
476
477    if "com_envoyproxy_protoc_gen_validate" not in native.existing_rules():
478        http_archive(
479            name = "com_envoyproxy_protoc_gen_validate",
480            strip_prefix = "protoc-gen-validate-4694024279bdac52b77e22dc87808bd0fd732b69",
481            sha256 = "1e490b98005664d149b379a9529a6aa05932b8a11b76b4cd86f3d22d76346f47",
482            urls = [
483                "https://github.com/envoyproxy/protoc-gen-validate/archive/4694024279bdac52b77e22dc87808bd0fd732b69.tar.gz",
484            ],
485            patches = ["@com_github_grpc_grpc//third_party:protoc-gen-validate.patch"],
486            patch_args = ["-p1"],
487        )
488
489    if "com_github_cncf_xds" not in native.existing_rules():
490        http_archive(
491            name = "com_github_cncf_xds",
492            sha256 = "dc305e20c9fa80822322271b50aa2ffa917bf4fd3973bcec52bfc28dc32c5927",
493            strip_prefix = "xds-3a472e524827f72d1ad621c4983dd5af54c46776",
494            urls = [
495                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/3a472e524827f72d1ad621c4983dd5af54c46776.tar.gz",
496                "https://github.com/cncf/xds/archive/3a472e524827f72d1ad621c4983dd5af54c46776.tar.gz",
497            ],
498        )
499
500    # TODO(stanleycheung): remove this when prometheus-cpp AND
501    #   opentelemetry-cpp cut a new release
502    # This override is needed because this fix
503    #   https://github.com/jupp0r/prometheus-cpp/pull/626
504    #   has not been included in the latest prometheus-cpp release yet.
505    # We also need opentelemetry-cpp to update their dependency on
506    #   prometheus-cpp after that fix is released.
507    # Without the fix, we cannot build the prometheus exporter with bazel 6
508    if "com_github_jupp0r_prometheus_cpp" not in native.existing_rules():
509        http_archive(
510            name = "com_github_jupp0r_prometheus_cpp",
511            strip_prefix = "prometheus-cpp-b1234816facfdda29845c46696a02998a4af115a",
512            urls = [
513                "https://github.com/jupp0r/prometheus-cpp/archive/b123481.zip",
514            ],
515        )
516
517    if "io_opentelemetry_cpp" not in native.existing_rules():
518        http_archive(
519            name = "io_opentelemetry_cpp",
520            sha256 = "ed681d20a684b7d485a49288e7cfb2d182bf882e5c112c5f2fa3f9e9da2278fc",
521            strip_prefix = "opentelemetry-cpp-4bd64c9a336fd438d6c4c9dad2e6b61b0585311f",
522            urls = [
523                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/open-telemetry/opentelemetry-cpp/archive/4bd64c9a336fd438d6c4c9dad2e6b61b0585311f.tar.gz",
524                "https://github.com/open-telemetry/opentelemetry-cpp/archive/4bd64c9a336fd438d6c4c9dad2e6b61b0585311f.tar.gz",
525            ],
526        )
527
528    if "google_cloud_cpp" not in native.existing_rules():
529        http_archive(
530            name = "google_cloud_cpp",
531            sha256 = "7ca7f583b60d2aa1274411fed3b9fb3887119b2e84244bb3fc69ea1db819e4e5",
532            strip_prefix = "google-cloud-cpp-2.16.0",
533            urls = [
534                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz",
535                "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz",
536            ],
537        )
538
539    grpc_python_deps()
540
541# TODO: move some dependencies from "grpc_deps" here?
542# buildifier: disable=unnamed-macro
543def grpc_test_only_deps():
544    """Internal, not intended for use by packages that are consuming grpc.
545
546    Loads dependencies that are only needed to run grpc library's tests.
547    """
548    native.bind(
549        name = "twisted",
550        actual = "@com_github_twisted_twisted//:twisted",
551    )
552
553    native.bind(
554        name = "yaml",
555        actual = "@com_github_yaml_pyyaml//:yaml",
556    )
557
558    if "com_github_twisted_twisted" not in native.existing_rules():
559        http_archive(
560            name = "com_github_twisted_twisted",
561            sha256 = "ca17699d0d62eafc5c28daf2c7d0a18e62ae77b4137300b6c7d7868b39b06139",
562            strip_prefix = "twisted-twisted-17.5.0",
563            urls = [
564                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/twisted/twisted/archive/twisted-17.5.0.zip",
565                "https://github.com/twisted/twisted/archive/twisted-17.5.0.zip",
566            ],
567            build_file = "@com_github_grpc_grpc//third_party:twisted.BUILD",
568        )
569
570    if "com_github_yaml_pyyaml" not in native.existing_rules():
571        http_archive(
572            name = "com_github_yaml_pyyaml",
573            sha256 = "e34d97db6d846f5e2ad51417fd646e7ce6a3a70726ccea2a857e0580a7155f39",
574            strip_prefix = "pyyaml-6.0.1",
575            urls = [
576                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/6.0.1.zip",
577                "https://github.com/yaml/pyyaml/archive/6.0.1.zip",
578            ],
579            build_file = "@com_github_grpc_grpc//third_party:yaml.BUILD",
580        )
581
582    if "com_github_twisted_incremental" not in native.existing_rules():
583        http_archive(
584            name = "com_github_twisted_incremental",
585            sha256 = "f0ca93359ee70243ff7fbf2d904a6291810bd88cb80ed4aca6fa77f318a41a36",
586            strip_prefix = "incremental-incremental-17.5.0",
587            urls = [
588                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/twisted/incremental/archive/incremental-17.5.0.zip",
589                "https://github.com/twisted/incremental/archive/incremental-17.5.0.zip",
590            ],
591            build_file = "@com_github_grpc_grpc//third_party:incremental.BUILD",
592        )
593
594    if "com_github_zopefoundation_zope_interface" not in native.existing_rules():
595        http_archive(
596            name = "com_github_zopefoundation_zope_interface",
597            sha256 = "e9579fc6149294339897be3aa9ecd8a29217c0b013fe6f44fcdae00e3204198a",
598            strip_prefix = "zope.interface-4.4.3",
599            urls = [
600                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/zopefoundation/zope.interface/archive/4.4.3.zip",
601                "https://github.com/zopefoundation/zope.interface/archive/4.4.3.zip",
602            ],
603            build_file = "@com_github_grpc_grpc//third_party:zope_interface.BUILD",
604        )
605
606    if "com_github_twisted_constantly" not in native.existing_rules():
607        http_archive(
608            name = "com_github_twisted_constantly",
609            sha256 = "2702cd322161a579d2c0dbf94af4e57712eedc7bd7bbbdc554a230544f7d346c",
610            strip_prefix = "constantly-15.1.0",
611            urls = [
612                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/twisted/constantly/archive/15.1.0.zip",
613                "https://github.com/twisted/constantly/archive/15.1.0.zip",
614            ],
615            build_file = "@com_github_grpc_grpc//third_party:constantly.BUILD",
616        )
617
618    if "com_google_libprotobuf_mutator" not in native.existing_rules():
619        http_archive(
620            name = "com_google_libprotobuf_mutator",
621            sha256 = "9c8f800aed088cdf89adc3eaaa66b56b4da7da041f26338aa71a2ab43d860d46",
622            urls = [
623                "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/libprotobuf-mutator/archive/1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d.tar.gz",
624                "https://github.com/google/libprotobuf-mutator/archive/1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d.tar.gz",
625            ],
626            strip_prefix = "libprotobuf-mutator-1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d",
627            build_file = "@com_github_grpc_grpc//third_party:libprotobuf_mutator.BUILD",
628        )
629