blob: f475fd03047d6383ce3df684f5b0ea9ff4088fb3 [file] [log] [blame]
Kristina Chodorow93fbc3e2016-04-27 17:03:28 +00001workspace(name = "io_bazel")
Klaus Aehliga55714c2018-10-23 02:16:02 -07002load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
Kristina Chodorow93fbc3e2016-04-27 17:03:28 +00003
David Chenb78bbd52016-03-16 13:17:57 +00004# Protobuf expects an //external:python_headers label which would contain the
5# Python headers if fast Python protos is enabled. Since we are not using fast
6# Python protos, bind python_headers to a dummy target.
7bind(
8 name = "python_headers",
9 actual = "//:dummy",
10)
11
Alpha Lama1a79cb2016-05-15 19:13:52 +000012# Protobuf code generation for GRPC requires three external labels:
13# //external:grpc-java_plugin
14# //external:grpc-jar
15# //external:guava
16bind(
17 name = "grpc-java-plugin",
18 actual = "//third_party/grpc:grpc-java-plugin",
19)
20
21bind(
22 name = "grpc-jar",
23 actual = "//third_party/grpc:grpc-jar",
24)
25
26bind(
27 name = "guava",
28 actual = "//third_party:guava",
29)
30
Jakob Buchgraber6e12e652017-05-02 11:53:15 +020031# Used by //third_party/protobuf:protobuf_python
32bind(
33 name = "six",
34 actual = "//third_party/py/six",
35)
36
Googler5b90b162017-08-31 16:29:34 +020037http_archive(
38 name = "bazel_j2objc",
Laszlo Csomor0f3f7882018-03-13 06:56:12 -070039 # Computed using "shasum -a 256 j2objc-2.0.3.zip"
40 sha256 = "a36bac432d0dbd8c98249e484b2b69dd5720afa4abb58711a3c3def1c0bfa21d",
Googler5b90b162017-08-31 16:29:34 +020041 strip_prefix = "j2objc-2.0.3",
cushonb6646232018-09-07 01:44:10 -070042 url = "https://github.com/google/j2objc/releases/download/2.0.3/j2objc-2.0.3.zip",
Googler5b90b162017-08-31 16:29:34 +020043)
44
Damien Martin-Guillerez0baff0f2017-08-22 17:40:37 +020045# For src/test/shell/bazel:test_srcs
46load("//src/test/shell/bazel:list_source_repository.bzl", "list_source_repository")
cushonb6646232018-09-07 01:44:10 -070047
Damien Martin-Guillerez0baff0f2017-08-22 17:40:37 +020048list_source_repository(name = "local_bazel_source_list")
49
Adam Michael9b7330f2017-03-23 18:40:51 +000050# To run the Android integration tests in //src/test/shell/bazel/android:all or
51# build the Android sample app in //examples/android/java/bazel:hello_world
52#
53# 1. Install an Android SDK and NDK from https://developer.android.com
54# 2. Set the $ANDROID_HOME and $ANDROID_NDK_HOME environment variables
55# 3. Uncomment the two lines below
56#
57# android_sdk_repository(name = "androidsdk")
58# android_ndk_repository(name = "androidndk")
Cal Peyser2152bc12016-04-22 17:08:59 +000059
Adam Michael8a136d82016-11-16 23:04:46 +000060# In order to run //src/test/shell/bazel:maven_skylark_test, follow the
61# instructions above for the Android integration tests and uncomment the
62# following lines:
63# load("//tools/build_defs/repo:maven_rules.bzl", "maven_dependency_plugin")
64# maven_dependency_plugin()
65
Cal Peyser2152bc12016-04-22 17:08:59 +000066# This allows rules written in skylark to locate apple build tools.
philwo915fa8f2017-05-09 12:17:12 -040067bind(
68 name = "xcrunwrapper",
69 actual = "@bazel_tools//tools/objc:xcrunwrapper",
70)
Carmi Grushkobfaff292016-08-17 18:37:55 +000071
Jakob Buchgraber8ff0d0d2017-04-14 21:16:19 +020072new_local_repository(
Carmi Grushko0fd73d62017-02-17 06:49:40 +000073 name = "com_google_protobuf",
hlopkoead10022018-09-05 05:37:23 -070074 build_file = "./third_party/protobuf/3.6.1/BUILD",
75 path = "./third_party/protobuf/3.6.1/",
Carmi Grushko0fd73d62017-02-17 06:49:40 +000076)
77
78new_local_repository(
Jakob Buchgraber166f28c2017-05-30 16:41:18 +020079 name = "googleapis",
Jakob Buchgraber166f28c2017-05-30 16:41:18 +020080 build_file = "./third_party/googleapis/BUILD",
cushonb6646232018-09-07 01:44:10 -070081 path = "./third_party/googleapis/",
Jakob Buchgraber166f28c2017-05-30 16:41:18 +020082)
83
Ola Rozenfeld930119a2018-08-10 11:04:44 -070084new_local_repository(
85 name = "remoteapis",
Ola Rozenfeld930119a2018-08-10 11:04:44 -070086 build_file = "./third_party/remoteapis/BUILD.bazel",
cushonb6646232018-09-07 01:44:10 -070087 path = "./third_party/remoteapis/",
Ola Rozenfeld930119a2018-08-10 11:04:44 -070088)
89
kmbbfd89d62018-04-11 14:26:56 -070090http_archive(
91 name = "desugar_jdk_libs",
kmbbfd89d62018-04-11 14:26:56 -070092 # Computed using "shasum -a 256 <zip>"
kmbb6da3b12018-07-03 12:36:21 -070093 sha256 = "43b8fcc56a180e178d498f375fbeb95e8b65b9bf6c2da91ae3ae0332521a1a12",
94 strip_prefix = "desugar_jdk_libs-fd937f4180c1b557805219af4482f1a27eb0ff2b",
cushonb6646232018-09-07 01:44:10 -070095 url = "https://github.com/google/desugar_jdk_libs/archive/fd937f4180c1b557805219af4482f1a27eb0ff2b.zip",
kmbbfd89d62018-04-11 14:26:56 -070096)
97
Klaus Aehlig3c9cd822018-05-24 03:35:42 -070098load("//:distdir.bzl", "distdir_tar")
cushonb6646232018-09-07 01:44:10 -070099
Klaus Aehlig3c9cd822018-05-24 03:35:42 -0700100distdir_tar(
101 name = "additional_distfiles",
cparsons871cd6f2018-08-16 09:10:38 -0700102 archives = [
103 "fd937f4180c1b557805219af4482f1a27eb0ff2b.zip",
cushonb6646232018-09-07 01:44:10 -0700104 "7490380c6bbf9a5a060df78dc2222e7de6ffae5c.tar.gz",
cparsons871cd6f2018-08-16 09:10:38 -0700105 ],
cushonb6646232018-09-07 01:44:10 -0700106 dirname = "derived/distdir",
Klaus Aehlig3c9cd822018-05-24 03:35:42 -0700107 sha256 = {
cushonb6646232018-09-07 01:44:10 -0700108 "fd937f4180c1b557805219af4482f1a27eb0ff2b.zip": "43b8fcc56a180e178d498f375fbeb95e8b65b9bf6c2da91ae3ae0332521a1a12",
109 "7490380c6bbf9a5a060df78dc2222e7de6ffae5c.tar.gz": "3528fc6012a78da6291c00854373ea43f7f8b6c4046320be5f0884f5b3385b14",
110 },
111 urls = {
112 "fd937f4180c1b557805219af4482f1a27eb0ff2b.zip": ["https://github.com/google/desugar_jdk_libs/archive/fd937f4180c1b557805219af4482f1a27eb0ff2b.zip"],
113 "7490380c6bbf9a5a060df78dc2222e7de6ffae5c.tar.gz": ["https://github.com/bazelbuild/bazel-skylib/archive/7490380c6bbf9a5a060df78dc2222e7de6ffae5c.tar.gz"],
114 },
Klaus Aehlig3c9cd822018-05-24 03:35:42 -0700115)
116
Philipp Wollermann95048272017-03-17 15:11:58 +0000117# OpenJDK distributions used to create a version of Bazel bundled with the OpenJDK.
118http_file(
119 name = "openjdk_linux",
lberki7eb9ea12018-09-07 04:01:48 -0700120 sha256 = "f27cb933de4f9e7fe9a703486cf44c84bc8e9f138be0c270c9e5716a32367e87",
philwo915fa8f2017-05-09 12:17:12 -0400121 urls = [
lberki7eb9ea12018-09-07 04:01:48 -0700122 "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz",
philwo915fa8f2017-05-09 12:17:12 -0400123 ],
Klaus Aehliga55714c2018-10-23 02:16:02 -0700124 downloaded_file_path="zulu-linux.tar.gz",
Philipp Wollermann95048272017-03-17 15:11:58 +0000125)
126
philwo54c25722018-10-02 05:41:00 -0700127# Used by CI to test Bazel on platforms without an installed system JDK.
128# TODO(twerth): Migrate to @remotejdk when https://github.com/bazelbuild/bazel/pull/6216 is merged.
Klaus Aehliga55714c2018-10-23 02:16:02 -0700129http_archive(
philwo54c25722018-10-02 05:41:00 -0700130 name = "openjdk_linux_archive",
131 sha256 = "f27cb933de4f9e7fe9a703486cf44c84bc8e9f138be0c270c9e5716a32367e87",
132 urls = [
133 "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz",
134 ],
135 strip_prefix = "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules",
136 build_file_content = "java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public'])",
137)
138
Philipp Wollermann95048272017-03-17 15:11:58 +0000139http_file(
140 name = "openjdk_macos",
lberki7eb9ea12018-09-07 04:01:48 -0700141 sha256 = "404e7058ff91f956612f47705efbee8e175a38b505fb1b52d8c1ea98718683de",
philwo915fa8f2017-05-09 12:17:12 -0400142 urls = [
lberki7eb9ea12018-09-07 04:01:48 -0700143 "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz",
philwo915fa8f2017-05-09 12:17:12 -0400144 ],
Klaus Aehliga55714c2018-10-23 02:16:02 -0700145 downloaded_file_path="zulu-macos.tar.gz",
Philipp Wollermann95048272017-03-17 15:11:58 +0000146)
147
148http_file(
149 name = "openjdk_win",
lberki7eb9ea12018-09-07 04:01:48 -0700150 sha256 = "e738829017f107e7a7cd5069db979398ec3c3f03ef56122f89ba38e7374f63ed",
philwo915fa8f2017-05-09 12:17:12 -0400151 urls = [
lberki7eb9ea12018-09-07 04:01:48 -0700152 "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip",
philwo915fa8f2017-05-09 12:17:12 -0400153 ],
Klaus Aehliga55714c2018-10-23 02:16:02 -0700154 downloaded_file_path="zulu-win.zip",
Philipp Wollermann95048272017-03-17 15:11:58 +0000155)
Googler5f36bf82017-07-12 20:43:08 +0200156
Arielle Albonfa7e49f2018-07-31 00:57:54 -0700157# The source-code for this OpenJDK can be found at:
lberki7eb9ea12018-09-07 04:01:48 -0700158# https://openjdk.linaro.org/releases/jdk9-src-1708.tar.xz
Arielle Albonfa7e49f2018-07-31 00:57:54 -0700159http_file(
160 name = "openjdk_linux_aarch64",
lberki7eb9ea12018-09-07 04:01:48 -0700161 sha256 = "72e7843902b0395e2d30e1e9ad2a5f05f36a4bc62529828bcbc698d54aec6022",
Arielle Albonfa7e49f2018-07-31 00:57:54 -0700162 urls = [
163 # When you update this, also update the link to the source-code above.
philwo6ebc71f2018-10-23 11:57:09 -0700164 "https://mirror.bazel.build/openjdk.linaro.org/releases/jdk9-server-release-1708.tar.xz",
lberki7eb9ea12018-09-07 04:01:48 -0700165 "http://openjdk.linaro.org/releases/jdk9-server-release-1708.tar.xz",
Arielle Albonfa7e49f2018-07-31 00:57:54 -0700166 ],
167)
168
Googler5f36bf82017-07-12 20:43:08 +0200169http_archive(
philwob495eaf2018-08-28 04:00:46 -0700170 name = "bazel_toolchains",
cushonb6646232018-09-07 01:44:10 -0700171 sha256 = "cefb6ccf86ca592baaa029bcef04148593c0efe8f734542f10293ea58f170715",
172 strip_prefix = "bazel-toolchains-cdea5b8675914d0a354d89f108de5d28e54e0edc",
philwob495eaf2018-08-28 04:00:46 -0700173 urls = [
174 "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/cdea5b8675914d0a354d89f108de5d28e54e0edc.tar.gz",
175 "https://github.com/bazelbuild/bazel-toolchains/archive/cdea5b8675914d0a354d89f108de5d28e54e0edc.tar.gz",
176 ],
Googler5f36bf82017-07-12 20:43:08 +0200177)
ccalvarin1cbe62a2017-08-14 21:09:07 +0200178
ccalvarin73839762018-03-23 15:35:00 -0700179# We're pinning to a commit because this project does not have a recent release.
180# Nothing special about this commit, though.
ccalvarin8e9f4a82018-03-23 08:19:37 -0700181http_archive(
182 name = "com_google_googletest",
Loo Rong Jiee94aa222018-10-15 01:27:08 -0700183 sha256 = "0fb00ff413f6b9b80ccee44a374ca7a18af7315aea72a43c62f2acd1ca74e9b5",
184 strip_prefix = "googletest-f13bbe2992d188e834339abe6f715b2b2f840a77",
ccalvarin8e9f4a82018-03-23 08:19:37 -0700185 urls = [
Loo Rong Jiee94aa222018-10-15 01:27:08 -0700186 "https://github.com/google/googletest/archive/f13bbe2992d188e834339abe6f715b2b2f840a77.tar.gz",
ccalvarin8e9f4a82018-03-23 08:19:37 -0700187 ],
ccalvarin8e9f4a82018-03-23 08:19:37 -0700188)
189
Xin Gaoc439ae12017-11-07 19:05:31 +0100190# For src/test/shell/bazel:bazel_sandboxing_test
191http_file(
cushonb6646232018-09-07 01:44:10 -0700192 name = "mount_path_toolchain",
193 sha256 = "dd8088d3543a86fd91a9ccde6e40102aff6eaf3d048aa73cc18eff05cc2053d5",
Klaus Aehliga55714c2018-10-23 02:16:02 -0700194 urls = ["https://asci-toolchain.appspot.com.storage.googleapis.com/toolchain-testing/mount_path_toolchain.tar.gz"],
195 downloaded_file_path="mount_path_toolchain.tar.gz",
Xin Gaoc439ae12017-11-07 19:05:31 +0100196)
cparsons871cd6f2018-08-16 09:10:38 -0700197
198http_archive(
199 name = "bazel_skylib",
cushonb6646232018-09-07 01:44:10 -0700200 sha256 = "3528fc6012a78da6291c00854373ea43f7f8b6c4046320be5f0884f5b3385b14",
201 strip_prefix = "bazel-skylib-7490380c6bbf9a5a060df78dc2222e7de6ffae5c",
cparsons871cd6f2018-08-16 09:10:38 -0700202 urls = [
203 "https://github.com/bazelbuild/bazel-skylib/archive/7490380c6bbf9a5a060df78dc2222e7de6ffae5c.tar.gz",
204 ],
cparsons871cd6f2018-08-16 09:10:38 -0700205)
cparsonsa5be6612018-08-27 13:21:21 -0700206
207http_archive(
208 name = "skydoc",
cushonb6646232018-09-07 01:44:10 -0700209 sha256 = "cfbfcc107f5c9853dc5b2b81f1fe90fc326bd1c61f76c9aac2b4201dff75b91d",
210 strip_prefix = "skydoc-d34c44c3f4102eb94beaf2636c6cf532f0ec1ee8",
cparsonsa5be6612018-08-27 13:21:21 -0700211 urls = [
212 "https://github.com/bazelbuild/skydoc/archive/d34c44c3f4102eb94beaf2636c6cf532f0ec1ee8.tar.gz",
213 ],
cparsonsa5be6612018-08-27 13:21:21 -0700214)
Klaus Aehligacafe5a2018-10-24 03:16:42 -0700215
216# For testing, have an distdir_tar with all the archives implicit in every
217# WORKSPACE, to that they don't have to be refetched for every test
218# calling `bazel sync`.
219distdir_tar(
220 name = "jdk_WORKSPACE_files",
221 archives = [
222 "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz",
223 "zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz",
224 "zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip",
225 "jdk9-server-release-1708.tar.xz",
226 "zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz",
227 "zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz",
228 "zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip",
229 "jdk10-server-release-1804.tar.xz",
230 ],
231 dirname = "jdk_WORKSPACE/distdir",
232 sha256 = {
233 "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz" : "f27cb933de4f9e7fe9a703486cf44c84bc8e9f138be0c270c9e5716a32367e87",
234 "zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz" : "404e7058ff91f956612f47705efbee8e175a38b505fb1b52d8c1ea98718683de",
235 "zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip" : "e738829017f107e7a7cd5069db979398ec3c3f03ef56122f89ba38e7374f63ed",
236 "jdk9-server-release-1708.tar.xz" : "72e7843902b0395e2d30e1e9ad2a5f05f36a4bc62529828bcbc698d54aec6022",
237 "zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz" : "57fad3602e74c79587901d6966d3b54ef32cb811829a2552163185d5064fe9b5",
238 "zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz" : "e669c9a897413d855b550b4e39d79614392e6fb96f494e8ef99a34297d9d85d3",
239 "zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip" : "c39e7700a8d41794d60985df5a20352435196e78ecbc6a2b30df7be8637bffd5",
240 "jdk10-server-release-1804.tar.xz" : "b7098b7aaf6ee1ffd4a2d0371a0be26c5a5c87f6aebbe46fe9a92c90583a84be",
241 },
242 urls = {
243 "zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz" : ["https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz"],
244 "zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz" : ["https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-macosx_x64-allmodules.tar.gz"],
245 "zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip" : ["https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-win_x64-allmodules.zip"],
246 "jdk9-server-release-1708.tar.xz" : ["https://mirror.bazel.build/openjdk.linaro.org/releases/jdk9-server-release-1708.tar.xz"],
247 "zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz" : ["https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-linux_x64-allmodules.tar.gz"],
248 "zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz" : ["https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz"],
249 "zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip" : ["https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip" ],
250 "jdk10-server-release-1804.tar.xz" : ["https://mirror.bazel.build/openjdk.linaro.org/releases/jdk10-server-release-1804.tar.xz"],
251 },
252)