blob: 47b99a3b013f38c991b487f40b43c67302aa8a50 [file] [log] [blame]
Kristina Chodorow93fbc3e2016-04-27 17:03:28 +00001workspace(name = "io_bazel")
2
David Chenb78bbd52016-03-16 13:17:57 +00003# Protobuf expects an //external:python_headers label which would contain the
4# Python headers if fast Python protos is enabled. Since we are not using fast
5# Python protos, bind python_headers to a dummy target.
6bind(
7 name = "python_headers",
8 actual = "//:dummy",
9)
10
Alpha Lama1a79cb2016-05-15 19:13:52 +000011# Protobuf code generation for GRPC requires three external labels:
12# //external:grpc-java_plugin
13# //external:grpc-jar
14# //external:guava
15bind(
16 name = "grpc-java-plugin",
17 actual = "//third_party/grpc:grpc-java-plugin",
18)
19
20bind(
21 name = "grpc-jar",
22 actual = "//third_party/grpc:grpc-jar",
23)
24
25bind(
26 name = "guava",
27 actual = "//third_party:guava",
28)
29
Jakob Buchgraber6e12e652017-05-02 11:53:15 +020030# Used by //third_party/protobuf:protobuf_python
31bind(
32 name = "six",
33 actual = "//third_party/py/six",
34)
35
Googler5b90b162017-08-31 16:29:34 +020036http_archive(
37 name = "bazel_j2objc",
38 url = "https://github.com/google/j2objc/releases/download/2.0.3/j2objc-2.0.3.zip",
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",
42)
43
Damien Martin-Guillerez0baff0f2017-08-22 17:40:37 +020044# For src/test/shell/bazel:test_srcs
45load("//src/test/shell/bazel:list_source_repository.bzl", "list_source_repository")
46list_source_repository(name = "local_bazel_source_list")
47
Adam Michael9b7330f2017-03-23 18:40:51 +000048# To run the Android integration tests in //src/test/shell/bazel/android:all or
49# build the Android sample app in //examples/android/java/bazel:hello_world
50#
51# 1. Install an Android SDK and NDK from https://developer.android.com
52# 2. Set the $ANDROID_HOME and $ANDROID_NDK_HOME environment variables
53# 3. Uncomment the two lines below
54#
55# android_sdk_repository(name = "androidsdk")
56# android_ndk_repository(name = "androidndk")
Cal Peyser2152bc12016-04-22 17:08:59 +000057
Adam Michael8a136d82016-11-16 23:04:46 +000058# In order to run //src/test/shell/bazel:maven_skylark_test, follow the
59# instructions above for the Android integration tests and uncomment the
60# following lines:
61# load("//tools/build_defs/repo:maven_rules.bzl", "maven_dependency_plugin")
62# maven_dependency_plugin()
63
Cal Peyser2152bc12016-04-22 17:08:59 +000064# This allows rules written in skylark to locate apple build tools.
philwo915fa8f2017-05-09 12:17:12 -040065bind(
66 name = "xcrunwrapper",
67 actual = "@bazel_tools//tools/objc:xcrunwrapper",
68)
Carmi Grushkobfaff292016-08-17 18:37:55 +000069
Jakob Buchgraber8ff0d0d2017-04-14 21:16:19 +020070new_local_repository(
Carmi Grushko0fd73d62017-02-17 06:49:40 +000071 name = "com_google_protobuf",
Vladimir Moskva285791a2017-09-01 15:03:05 +020072 build_file = "./third_party/protobuf/3.4.0/BUILD",
73 path = "./third_party/protobuf/3.4.0/",
Carmi Grushko0fd73d62017-02-17 06:49:40 +000074)
75
76new_local_repository(
kmbf6b8d5e2017-10-12 01:21:26 +020077 name = "com_google_protobuf_cc",
78 build_file = "./third_party/protobuf/3.4.0/BUILD",
79 path = "./third_party/protobuf/3.4.0/",
80)
81
82new_local_repository(
Carmi Grushkof1aa34c2016-11-29 01:04:35 +000083 name = "com_google_protobuf_java",
Vladimir Moskva285791a2017-09-01 15:03:05 +020084 build_file = "./third_party/protobuf/3.4.0/com_google_protobuf_java.BUILD",
85 path = "./third_party/protobuf/3.4.0/",
Carmi Grushkof1aa34c2016-11-29 01:04:35 +000086)
Philipp Wollermann95048272017-03-17 15:11:58 +000087
Jakob Buchgraber166f28c2017-05-30 16:41:18 +020088new_local_repository(
89 name = "googleapis",
90 path = "./third_party/googleapis/",
91 build_file = "./third_party/googleapis/BUILD",
92)
93
kmbbfd89d62018-04-11 14:26:56 -070094http_archive(
95 name = "desugar_jdk_libs",
kmb50646762018-04-17 04:09:08 -070096 url = "https://github.com/google/desugar_jdk_libs/archive/f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip",
kmbbfd89d62018-04-11 14:26:56 -070097 # Computed using "shasum -a 256 <zip>"
kmb50646762018-04-17 04:09:08 -070098 sha256 = "c80f3f3d442d8a6ca7adc83f90ecd638c3864087fdd6787ffac070b6f1cc8f9b",
99 strip_prefix = "desugar_jdk_libs-f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd",
kmbbfd89d62018-04-11 14:26:56 -0700100)
101
Klaus Aehlig3c9cd822018-05-24 03:35:42 -0700102load("//:distdir.bzl", "distdir_tar")
103distdir_tar(
104 name = "additional_distfiles",
105 dirname = "derived/distdir",
106 archives = ["f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip"],
107 urls = {
108 "f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip" :
109 ["https://github.com/google/desugar_jdk_libs/archive/f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip"],
110 },
111 sha256 = {
112 "f5e6d80c6b4ec6b0a46603f72b015d45cf3c11cd.zip" :
113 "c80f3f3d442d8a6ca7adc83f90ecd638c3864087fdd6787ffac070b6f1cc8f9b",
114 },
115)
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",
cushon72141a12018-06-11 08:30:15 -0700120 sha256 = "45f2dfbee93b91b1468cf81d843fc6d9a47fef1f831c0b7ceff4f1eb6e6851c8",
philwo915fa8f2017-05-09 12:17:12 -0400121 urls = [
cushon72141a12018-06-11 08:30:15 -0700122 "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64.tar.gz",
123 "https://bazel-mirror.storage.googleapis.com/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64.tar.gz",
124 "https://cdn.azul.com/zulu/bin/zulu9.0.7.1-jdk9.0.7-linux_x64.tar.gz",
philwo915fa8f2017-05-09 12:17:12 -0400125 ],
Philipp Wollermann95048272017-03-17 15:11:58 +0000126)
127
128http_file(
129 name = "openjdk_macos",
cushon72141a12018-06-11 08:30:15 -0700130 sha256 = "5a5b3225b86d3fdb51e9add5335f43cc19c6b2d9b8b5558e72b52d7b2ce9162e",
philwo915fa8f2017-05-09 12:17:12 -0400131 urls = [
cushon72141a12018-06-11 08:30:15 -0700132 "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-macosx_x64.tar.gz",
133 "https://bazel-mirror.storage.googleapis.com/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-macosx_x64.tar.gz",
134 "https://cdn.azul.com/zulu/bin/zulu9.0.7.1-jdk9.0.7-macosx_x64.tar.gz",
philwo915fa8f2017-05-09 12:17:12 -0400135 ],
Philipp Wollermann95048272017-03-17 15:11:58 +0000136)
137
138http_file(
139 name = "openjdk_win",
cushon72141a12018-06-11 08:30:15 -0700140 sha256 = "75f76c53c6a1f12b1a571b86bd9708ab75adf582d689dddc94fdd77dcc0f3f5c",
philwo915fa8f2017-05-09 12:17:12 -0400141 urls = [
cushon72141a12018-06-11 08:30:15 -0700142 "https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-win_x64.zip",
143 "https://bazel-mirror.storage.googleapis.com/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-win_x64.zip",
144 "https://cdn.azul.com/zulu/bin/zulu9.0.7.1-jdk9.0.7-win_x64.zip",
philwo915fa8f2017-05-09 12:17:12 -0400145 ],
Philipp Wollermann95048272017-03-17 15:11:58 +0000146)
Googler5f36bf82017-07-12 20:43:08 +0200147
148http_archive(
buchgrd34f3062018-05-22 06:19:10 -0700149 name = "bazel_toolchains",
150 urls = [
151 "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/09c850dbb8e785ded3d23a7003e9a0168fe1fb2f.tar.gz",
152 "https://github.com/bazelbuild/bazel-toolchains/archive/09c850dbb8e785ded3d23a7003e9a0168fe1fb2f.tar.gz",
153 ],
154 strip_prefix = "bazel-toolchains-09c850dbb8e785ded3d23a7003e9a0168fe1fb2f",
155 sha256 = "08e521cf2d0998e3d27a16c2e2542ebf4d3857b3ddadcfd145d128140754d7bd",
Googler5f36bf82017-07-12 20:43:08 +0200156)
ccalvarin1cbe62a2017-08-14 21:09:07 +0200157
ccalvarin73839762018-03-23 15:35:00 -0700158# We're pinning to a commit because this project does not have a recent release.
159# Nothing special about this commit, though.
ccalvarin8e9f4a82018-03-23 08:19:37 -0700160http_archive(
161 name = "com_google_googletest",
162 urls = [
163 "https://github.com/google/googletest/archive/dfa853b63d17c787914b663b50c2095a0c5b706e.tar.gz",
164 ],
165 strip_prefix = "googletest-dfa853b63d17c787914b663b50c2095a0c5b706e",
166 sha256 = "313a16fba8f0be8ee20ba9883e044556044cbd1ae6cea532473d163a843ef991",
167)
168
Xin Gaoc439ae12017-11-07 19:05:31 +0100169# For src/test/shell/bazel:bazel_sandboxing_test
170http_file(
171 name = 'mount_path_toolchain',
172 url = 'https://asci-toolchain.appspot.com.storage.googleapis.com/toolchain-testing/mount_path_toolchain.tar.gz',
Klaus Aehlig6ed275b2018-06-12 05:36:53 -0700173 sha256 = "dd8088d3543a86fd91a9ccde6e40102aff6eaf3d048aa73cc18eff05cc2053d5",
Xin Gaoc439ae12017-11-07 19:05:31 +0100174)