14
14
#
15
15
################################################################################
16
16
#
17
+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
18
+
19
+ ABSEIL_COMMIT = "99477fa9f1e89a7d8253c8aeee331864710d080c"
20
+ ABSEIL_SHA256 = "495e8e1c481018126b2a84bfe36e273907ce282b135e7d161e138e463d295f3d"
21
+
17
22
def absl_repositories (bind = True ):
18
- native . git_repository (
23
+ http_archive (
19
24
name = "com_google_absl" ,
20
- commit = "99477fa9f1e89a7d8253c8aeee331864710d080c" ,
21
- remote = "https://github.com/abseil/abseil-cpp" ,
25
+ strip_prefix = "abseil-cpp-" + ABSEIL_COMMIT ,
26
+ url = "https://github.com/abseil/abseil-cpp/archive/" + ABSEIL_COMMIT + ".tar.gz" ,
27
+ sha256 = ABSEIL_SHA256 ,
22
28
)
23
29
30
+ PROTOBUF_COMMIT = "106ffc04be1abf3ff3399f54ccf149815b287dd9" # v3.5.1
31
+ PROTOBUF_SHA256 = "ebc5f911ae580234da9cbcff03b841395bd97861efc82f67a165c5c3d366f2c6"
32
+
24
33
def protobuf_repositories (bind = True ):
25
- native . git_repository (
34
+ http_archive (
26
35
name = "protobuf_git" ,
27
- commit = "106ffc04be1abf3ff3399f54ccf149815b287dd9" , # v3.5.1
28
- remote = "https://github.com/google/protobuf.git" ,
36
+ strip_prefix = "protobuf-" + PROTOBUF_COMMIT ,
37
+ url = "https://github.com/google/protobuf/archive/" + PROTOBUF_COMMIT + ".tar.gz" ,
38
+ sha256 = PROTOBUF_SHA256 ,
29
39
)
30
40
31
41
if bind :
@@ -59,6 +69,8 @@ def protobuf_repositories(bind=True):
59
69
actual = "@protobuf_git//:protoc_lib" ,
60
70
)
61
71
72
+ GOOGLETEST_COMMIT = "43863938377a9ea1399c0596269e0890b5c5515a"
73
+ GOOGLETEST_SHA256 = "7c8ece456ad588c30160429498e108e2df6f42a30888b3ec0abf5d9792d9d3a0"
62
74
63
75
def googletest_repositories (bind = True ):
64
76
BUILD = """
@@ -122,11 +134,12 @@ cc_library(
122
134
visibility = ["//visibility:public"],
123
135
)
124
136
"""
125
- native . new_git_repository (
137
+ http_archive (
126
138
name = "googletest_git" ,
139
+ strip_prefix = "googletest-" + GOOGLETEST_COMMIT ,
127
140
build_file_content = BUILD ,
128
- commit = "43863938377a9ea1399c0596269e0890b5c5515a " ,
129
- remote = "https://github.com/google/googletest.git" ,
141
+ url = "https://github.com/google/googletest/archive/" + GOOGLETEST_COMMIT + ".tar.gz " ,
142
+ sha256 = GOOGLETEST_SHA256 ,
130
143
)
131
144
132
145
if bind :
@@ -145,6 +158,9 @@ cc_library(
145
158
actual = "@googletest_git//:googletest_prod" ,
146
159
)
147
160
161
+ GOOGLEAPIS_COMMIT = "5c6df0cd18c6a429eab739fb711c27f6e1393366" # May 14, 2017
162
+ GOOGLEAPIS_SHA256 = "c6ce26246232c0f3e78d3a30f087444ec01c8ee64b34d058bfcd4f0f4a387a0b"
163
+
148
164
def googleapis_repositories (protobuf_repo = "@protobuf_git//" , bind = True ):
149
165
BUILD = """
150
166
# Copyright 2016 Google Inc. All Rights Reserved.
@@ -242,11 +258,12 @@ cc_proto_library(
242
258
)
243
259
""" .format (protobuf_repo )
244
260
245
- native . new_git_repository (
261
+ http_archive (
246
262
name = "googleapis_git" ,
247
- commit = "5c6df0cd18c6a429eab739fb711c27f6e1393366" , # May 14, 2017
248
- remote = "https://github.com/googleapis/googleapis.git " ,
263
+ strip_prefix = "googleapis-" + GOOGLEAPIS_COMMIT ,
264
+ url = "https://github.com/googleapis/googleapis/archive/" + GOOGLEAPIS_COMMIT + ".tar.gz " ,
249
265
build_file_content = BUILD ,
266
+ sha256 = GOOGLEAPIS_SHA256 ,
250
267
)
251
268
252
269
if bind :
0 commit comments