blob: c5d010119e71f73bcbb0ccad214961ed091c2c32 [file] [log] [blame]
Austin Schuh272c6132020-11-14 16:37:52 -08001diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl
2index 4096720569..ea411b577d 100644
3--- a/bazel/grpc_deps.bzl
4+++ b/bazel/grpc_deps.bzl
5@@ -1,5 +1,10 @@
6 """Load dependencies needed to compile and test the grpc library as a 3rd-party consumer."""
7
8+# native.http_archive has been deprecated in newer bazel version. In order to work with
9+# grpc 1.15.1, the version flatbuffers is currently replying on. We need to apply this patch
10+# when importing the grpc dependency.
11+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
12+
13 def grpc_deps():
14 """Loads dependencies need to compile and test the grpc library."""
15
16@@ -99,14 +104,14 @@ def grpc_deps():
17 )
18
19 if "boringssl" not in native.existing_rules():
20- native.http_archive(
21+ http_archive(
22 name = "boringssl",
23 # on the chromium-stable-with-bazel branch
24 url = "https://boringssl.googlesource.com/boringssl/+archive/dcd3e6e6ecddf059adb48fca45bc7346a108bdd9.tar.gz",
25 )
26
27 if "com_github_madler_zlib" not in native.existing_rules():
28- native.new_http_archive(
29+ http_archive(
30 name = "com_github_madler_zlib",
31 build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD",
32 strip_prefix = "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f",
33@@ -114,14 +119,14 @@ def grpc_deps():
34 )
35
36 if "com_google_protobuf" not in native.existing_rules():
37- native.http_archive(
38+ http_archive(
39 name = "com_google_protobuf",
40 strip_prefix = "protobuf-48cb18e5c419ddd23d9badcfe4e9df7bde1979b2",
41 url = "https://github.com/google/protobuf/archive/48cb18e5c419ddd23d9badcfe4e9df7bde1979b2.tar.gz",
42 )
43
44 if "com_github_nanopb_nanopb" not in native.existing_rules():
45- native.new_http_archive(
46+ http_archive(
47 name = "com_github_nanopb_nanopb",
48 build_file = "@com_github_grpc_grpc//third_party:nanopb.BUILD",
49 strip_prefix = "nanopb-f8ac463766281625ad710900479130c7fcb4d63b",
50@@ -129,7 +134,7 @@ def grpc_deps():
51 )
52
53 if "com_github_google_googletest" not in native.existing_rules():
54- native.new_http_archive(
55+ http_archive(
56 name = "com_github_google_googletest",
57 build_file = "@com_github_grpc_grpc//third_party:gtest.BUILD",
58 strip_prefix = "googletest-ec44c6c1675c25b9827aacd08c02433cccde7780",
59@@ -137,14 +142,14 @@ def grpc_deps():
60 )
61
62 if "com_github_gflags_gflags" not in native.existing_rules():
63- native.http_archive(
64+ http_archive(
65 name = "com_github_gflags_gflags",
66 strip_prefix = "gflags-30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e",
67 url = "https://github.com/gflags/gflags/archive/30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e.tar.gz",
68 )
69
70 if "com_github_google_benchmark" not in native.existing_rules():
71- native.new_http_archive(
72+ http_archive(
73 name = "com_github_google_benchmark",
74 build_file = "@com_github_grpc_grpc//third_party:benchmark.BUILD",
75 strip_prefix = "benchmark-9913418d323e64a0111ca0da81388260c2bbe1e9",
76@@ -152,7 +157,7 @@ def grpc_deps():
77 )
78
79 if "com_github_cares_cares" not in native.existing_rules():
80- native.new_http_archive(
81+ http_archive(
82 name = "com_github_cares_cares",
83 build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD",
84 strip_prefix = "c-ares-3be1924221e1326df520f8498d704a5c4c8d0cce",
85@@ -160,14 +165,14 @@ def grpc_deps():
86 )
87
88 if "com_google_absl" not in native.existing_rules():
89- native.http_archive(
90+ http_archive(
91 name = "com_google_absl",
92 strip_prefix = "abseil-cpp-cd95e71df6eaf8f2a282b1da556c2cf1c9b09207",
93 url = "https://github.com/abseil/abseil-cpp/archive/cd95e71df6eaf8f2a282b1da556c2cf1c9b09207.tar.gz",
94 )
95
96 if "com_github_bazelbuild_bazeltoolchains" not in native.existing_rules():
97- native.http_archive(
98+ http_archive(
99 name = "com_github_bazelbuild_bazeltoolchains",
100 strip_prefix = "bazel-toolchains-cdea5b8675914d0a354d89f108de5d28e54e0edc",
101 urls = [
102@@ -178,7 +183,7 @@ def grpc_deps():
103 )
104
105 if "io_opencensus_cpp" not in native.existing_rules():
106- native.http_archive(
107+ http_archive(
108 name = "io_opencensus_cpp",
109 strip_prefix = "opencensus-cpp-fdf0f308b1631bb4a942e32ba5d22536a6170274",
110 url = "https://github.com/census-instrumentation/opencensus-cpp/archive/fdf0f308b1631bb4a942e32ba5d22536a6170274.tar.gz",
111@@ -200,7 +205,7 @@ def grpc_test_only_deps():
112 )
113
114 if "com_github_twisted_twisted" not in native.existing_rules():
115- native.new_http_archive(
116+ http_archive(
117 name = "com_github_twisted_twisted",
118 strip_prefix = "twisted-twisted-17.5.0",
119 url = "https://github.com/twisted/twisted/archive/twisted-17.5.0.zip",
120@@ -208,7 +213,7 @@ def grpc_test_only_deps():
121 )
122
123 if "com_github_yaml_pyyaml" not in native.existing_rules():
124- native.new_http_archive(
125+ http_archive(
126 name = "com_github_yaml_pyyaml",
127 strip_prefix = "pyyaml-3.12",
128 url = "https://github.com/yaml/pyyaml/archive/3.12.zip",
129@@ -216,7 +221,7 @@ def grpc_test_only_deps():
130 )
131
132 if "com_github_twisted_incremental" not in native.existing_rules():
133- native.new_http_archive(
134+ http_archive(
135 name = "com_github_twisted_incremental",
136 strip_prefix = "incremental-incremental-17.5.0",
137 url = "https://github.com/twisted/incremental/archive/incremental-17.5.0.zip",
138@@ -224,7 +229,7 @@ def grpc_test_only_deps():
139 )
140
141 if "com_github_zopefoundation_zope_interface" not in native.existing_rules():
142- native.new_http_archive(
143+ http_archive(
144 name = "com_github_zopefoundation_zope_interface",
145 strip_prefix = "zope.interface-4.4.3",
146 url = "https://github.com/zopefoundation/zope.interface/archive/4.4.3.zip",
147@@ -232,7 +237,7 @@ def grpc_test_only_deps():
148 )
149
150 if "com_github_twisted_constantly" not in native.existing_rules():
151- native.new_http_archive(
152+ http_archive(
153 name = "com_github_twisted_constantly",
154 strip_prefix = "constantly-15.1.0",
155 url = "https://github.com/twisted/constantly/archive/15.1.0.zip",