Kristina Chodorow | 93fbc3e | 2016-04-27 17:03:28 +0000 | [diff] [blame] | 1 | workspace(name = "io_bazel") |
philwo | 75edd78 | 2019-01-29 05:02:44 -0800 | [diff] [blame] | 2 | |
Googler | fbb5843 | 2023-05-05 15:36:26 -0700 | [diff] [blame] | 3 | load("//tools/build_defs/repo:http.bzl", "http_archive") |
Googler | d51c75f | 2023-06-01 06:10:45 -0700 | [diff] [blame] | 4 | load("//:distdir.bzl", "dist_http_archive", "dist_http_jar", "distdir_tar") |
Tony Aiuto | 3b2d310 | 2021-01-07 03:40:14 -0800 | [diff] [blame] | 5 | load("//:distdir_deps.bzl", "DIST_DEPS") |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 6 | load("//:repositories.bzl", "embedded_jdk_repositories") |
Googler | d51c75f | 2023-06-01 06:10:45 -0700 | [diff] [blame] | 7 | load("//tools/jdk:jdk_build_file.bzl", "JDK_BUILD_TEMPLATE") |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 8 | |
| 9 | # These can be used as values for the patch_cmds and patch_cmds_win attributes |
| 10 | # of http_archive, in order to export the WORKSPACE file from the BUILD or |
| 11 | # BUILD.bazel file. This is useful for cases like //src:test_repos, where we |
| 12 | # have to be able to trigger a fetch of a repo by depending on it, but we don't |
| 13 | # actually want to build anything (so we can't depend on a target inside that |
| 14 | # repo). |
| 15 | EXPORT_WORKSPACE_IN_BUILD_FILE = [ |
| 16 | "test -f BUILD && chmod u+w BUILD || true", |
| 17 | "echo >> BUILD", |
| 18 | "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD", |
| 19 | ] |
| 20 | |
| 21 | EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE = [ |
| 22 | "test -f BUILD.bazel && chmod u+w BUILD.bazel || true", |
| 23 | "echo >> BUILD.bazel", |
| 24 | "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel", |
| 25 | ] |
| 26 | |
Fabian Meumertzheim | 883b6ee | 2023-04-25 11:13:57 -0700 | [diff] [blame] | 27 | EXPORT_WORKSPACE_BAZEL_IN_BUILD_FILE = [ |
| 28 | "test -f BUILD && chmod u+w BUILD || true", |
| 29 | "echo >> BUILD", |
| 30 | "echo 'exports_files([\"WORKSPACE.bazel\"], visibility = [\"//visibility:public\"])' >> BUILD", |
| 31 | ] |
| 32 | |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 33 | EXPORT_WORKSPACE_IN_BUILD_FILE_WIN = [ |
| 34 | "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force", |
| 35 | ] |
| 36 | |
| 37 | EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN = [ |
| 38 | "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force", |
| 39 | ] |
Kristina Chodorow | 93fbc3e | 2016-04-27 17:03:28 +0000 | [diff] [blame] | 40 | |
Fabian Meumertzheim | 883b6ee | 2023-04-25 11:13:57 -0700 | [diff] [blame] | 41 | EXPORT_WORKSPACE_BAZEL_IN_BUILD_FILE_WIN = [ |
| 42 | "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE.bazel`\"], visibility = [`\"//visibility:public`\"])`n\" -Force", |
| 43 | ] |
| 44 | |
David Chen | b78bbd5 | 2016-03-16 13:17:57 +0000 | [diff] [blame] | 45 | # Protobuf expects an //external:python_headers label which would contain the |
| 46 | # Python headers if fast Python protos is enabled. Since we are not using fast |
| 47 | # Python protos, bind python_headers to a dummy target. |
| 48 | bind( |
| 49 | name = "python_headers", |
| 50 | actual = "//:dummy", |
| 51 | ) |
| 52 | |
Alpha Lam | a1a79cb | 2016-05-15 19:13:52 +0000 | [diff] [blame] | 53 | # Protobuf code generation for GRPC requires three external labels: |
| 54 | # //external:grpc-java_plugin |
| 55 | # //external:grpc-jar |
| 56 | # //external:guava |
| 57 | bind( |
| 58 | name = "grpc-java-plugin", |
Vasilios Pantazopoulos | 5179d03 | 2022-04-08 07:55:27 -0700 | [diff] [blame] | 59 | actual = "//third_party/grpc-java:grpc-java-plugin", |
Alpha Lam | a1a79cb | 2016-05-15 19:13:52 +0000 | [diff] [blame] | 60 | ) |
| 61 | |
| 62 | bind( |
| 63 | name = "grpc-jar", |
Vasilios Pantazopoulos | 5179d03 | 2022-04-08 07:55:27 -0700 | [diff] [blame] | 64 | actual = "//third_party/grpc-java:grpc-jar", |
Alpha Lam | a1a79cb | 2016-05-15 19:13:52 +0000 | [diff] [blame] | 65 | ) |
| 66 | |
| 67 | bind( |
| 68 | name = "guava", |
| 69 | actual = "//third_party:guava", |
| 70 | ) |
| 71 | |
Tony Aiuto | 881fc80 | 2022-05-25 06:30:17 -0700 | [diff] [blame] | 72 | # We must control the version of rules_license we use, so we load ours before |
| 73 | # any other repo can bring it in through their deps. |
| 74 | dist_http_archive( |
| 75 | name = "rules_license", |
| 76 | ) |
| 77 | |
Damien Martin-Guillerez | 0baff0f | 2017-08-22 17:40:37 +0200 | [diff] [blame] | 78 | # For src/test/shell/bazel:test_srcs |
| 79 | load("//src/test/shell/bazel:list_source_repository.bzl", "list_source_repository") |
cushon | b664623 | 2018-09-07 01:44:10 -0700 | [diff] [blame] | 80 | |
Damien Martin-Guillerez | 0baff0f | 2017-08-22 17:40:37 +0200 | [diff] [blame] | 81 | list_source_repository(name = "local_bazel_source_list") |
| 82 | |
Adam Michael | 9b7330f | 2017-03-23 18:40:51 +0000 | [diff] [blame] | 83 | # To run the Android integration tests in //src/test/shell/bazel/android:all or |
| 84 | # build the Android sample app in //examples/android/java/bazel:hello_world |
| 85 | # |
| 86 | # 1. Install an Android SDK and NDK from https://developer.android.com |
| 87 | # 2. Set the $ANDROID_HOME and $ANDROID_NDK_HOME environment variables |
| 88 | # 3. Uncomment the two lines below |
| 89 | # |
| 90 | # android_sdk_repository(name = "androidsdk") |
| 91 | # android_ndk_repository(name = "androidndk") |
Cal Peyser | 2152bc1 | 2016-04-22 17:08:59 +0000 | [diff] [blame] | 92 | |
Benjamin Peterson | 19b2e2f | 2023-02-27 04:05:25 -0800 | [diff] [blame] | 93 | # In order to run //src/test/shell/bazel:maven_starlark_test, follow the |
Adam Michael | 8a136d8 | 2016-11-16 23:04:46 +0000 | [diff] [blame] | 94 | # instructions above for the Android integration tests and uncomment the |
| 95 | # following lines: |
| 96 | # load("//tools/build_defs/repo:maven_rules.bzl", "maven_dependency_plugin") |
| 97 | # maven_dependency_plugin() |
| 98 | |
gregce | ca48e9a | 2020-04-14 08:54:38 -0700 | [diff] [blame] | 99 | # This allows rules written in Starlark to locate apple build tools. |
philwo | 915fa8f | 2017-05-09 12:17:12 -0400 | [diff] [blame] | 100 | bind( |
| 101 | name = "xcrunwrapper", |
| 102 | actual = "@bazel_tools//tools/objc:xcrunwrapper", |
| 103 | ) |
Carmi Grushko | bfaff29 | 2016-08-17 18:37:55 +0000 | [diff] [blame] | 104 | |
Tony Aiuto | e973aef | 2021-01-11 00:32:51 -0800 | [diff] [blame] | 105 | dist_http_archive( |
Carmi Grushko | 0fd73d6 | 2017-02-17 06:49:40 +0000 | [diff] [blame] | 106 | name = "com_google_protobuf", |
Ivo List | e9929af | 2023-01-12 08:18:00 -0800 | [diff] [blame] | 107 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 108 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
Carmi Grushko | 0fd73d6 | 2017-02-17 06:49:40 +0000 | [diff] [blame] | 109 | ) |
| 110 | |
John Cater | 2f83892 | 2018-11-12 08:19:03 -0800 | [diff] [blame] | 111 | local_repository( |
Jakob Buchgraber | 166f28c | 2017-05-30 16:41:18 +0200 | [diff] [blame] | 112 | name = "googleapis", |
cushon | b664623 | 2018-09-07 01:44:10 -0700 | [diff] [blame] | 113 | path = "./third_party/googleapis/", |
Jakob Buchgraber | 166f28c | 2017-05-30 16:41:18 +0200 | [diff] [blame] | 114 | ) |
| 115 | |
John Cater | 2f83892 | 2018-11-12 08:19:03 -0800 | [diff] [blame] | 116 | local_repository( |
Ola Rozenfeld | 930119a | 2018-08-10 11:04:44 -0700 | [diff] [blame] | 117 | name = "remoteapis", |
cushon | b664623 | 2018-09-07 01:44:10 -0700 | [diff] [blame] | 118 | path = "./third_party/remoteapis/", |
Ola Rozenfeld | 930119a | 2018-08-10 11:04:44 -0700 | [diff] [blame] | 119 | ) |
| 120 | |
menny | f431b0c | 2021-01-13 09:18:29 -0800 | [diff] [blame] | 121 | dist_http_archive( |
kmb | bfd89d6 | 2018-04-11 14:26:56 -0700 | [diff] [blame] | 122 | name = "desugar_jdk_libs", |
kmb | bfd89d6 | 2018-04-11 14:26:56 -0700 | [diff] [blame] | 123 | ) |
| 124 | |
Klaus Aehlig | 3c9cd82 | 2018-05-24 03:35:42 -0700 | [diff] [blame] | 125 | distdir_tar( |
| 126 | name = "additional_distfiles", |
Yannic Bonenberger | ff44969 | 2019-07-25 05:55:49 -0700 | [diff] [blame] | 127 | # Keep in sync with the archives fetched as part of building bazel. |
cparsons | 871cd6f | 2018-08-16 09:10:38 -0700 | [diff] [blame] | 128 | archives = [ |
Googler | d96072a | 2023-02-08 13:00:18 -0800 | [diff] [blame] | 129 | "android_tools_pkg-0.28.0.tar", |
tedx | ae24714 | 2022-04-21 16:53:51 -0700 | [diff] [blame] | 130 | # for android_gmaven_r8 |
Googler | c89ca0d | 2023-03-29 07:37:30 -0700 | [diff] [blame] | 131 | "r8-8.0.40.jar", |
cparsons | 871cd6f | 2018-08-16 09:10:38 -0700 | [diff] [blame] | 132 | ], |
cushon | b664623 | 2018-09-07 01:44:10 -0700 | [diff] [blame] | 133 | dirname = "derived/distdir", |
Tony Aiuto | e973aef | 2021-01-11 00:32:51 -0800 | [diff] [blame] | 134 | dist_deps = {dep: attrs for dep, attrs in DIST_DEPS.items() if "additional_distfiles" in attrs["used_in"]}, |
Klaus Aehlig | 3c9cd82 | 2018-05-24 03:35:42 -0700 | [diff] [blame] | 135 | sha256 = { |
Googler | d96072a | 2023-02-08 13:00:18 -0800 | [diff] [blame] | 136 | "android_tools_pkg-0.28.0.tar": "db3b02421ae974e0b33573f3e4f658d5f89cc9a0b42baae0ba2ac08e25c0720a", |
Googler | c89ca0d | 2023-03-29 07:37:30 -0700 | [diff] [blame] | 137 | "r8-8.0.40.jar": "ab1379835c7d3e5f21f80347c3c81e2f762e0b9b02748ae5232c3afa14adf702", |
cushon | b664623 | 2018-09-07 01:44:10 -0700 | [diff] [blame] | 138 | }, |
| 139 | urls = { |
Googler | d96072a | 2023-02-08 13:00:18 -0800 | [diff] [blame] | 140 | "android_tools_pkg-0.28.0.tar": [ |
| 141 | "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.28.0.tar", |
Jingwen Chen | 186929e | 2019-04-02 10:38:30 -0700 | [diff] [blame] | 142 | ], |
Googler | c89ca0d | 2023-03-29 07:37:30 -0700 | [diff] [blame] | 143 | "r8-8.0.40.jar": [ |
| 144 | "https://maven.google.com/com/android/tools/r8/8.0.40/r8-8.0.40.jar", |
tedx | ae24714 | 2022-04-21 16:53:51 -0700 | [diff] [blame] | 145 | ], |
cushon | b664623 | 2018-09-07 01:44:10 -0700 | [diff] [blame] | 146 | }, |
Klaus Aehlig | 3c9cd82 | 2018-05-24 03:35:42 -0700 | [diff] [blame] | 147 | ) |
| 148 | |
Googler | 3c84aa8 | 2023-04-11 09:40:31 -0700 | [diff] [blame] | 149 | embedded_jdk_repositories() |
Niyas Sait | 0ba4caa | 2022-02-02 10:29:06 -0800 | [diff] [blame] | 150 | |
Tony Aiuto | e973aef | 2021-01-11 00:32:51 -0800 | [diff] [blame] | 151 | dist_http_archive( |
Chi Wang | 26b94ff | 2021-09-28 23:42:26 -0700 | [diff] [blame] | 152 | name = "bazelci_rules", |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 153 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 154 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
Googler | 5f36bf8 | 2017-07-12 20:43:08 +0200 | [diff] [blame] | 155 | ) |
ccalvarin | 1cbe62a | 2017-08-14 21:09:07 +0200 | [diff] [blame] | 156 | |
Chi Wang | 26b94ff | 2021-09-28 23:42:26 -0700 | [diff] [blame] | 157 | load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig") |
Jakob Buchgraber | 60df905 | 2019-07-11 06:08:00 -0700 | [diff] [blame] | 158 | |
Chi Wang | 26b94ff | 2021-09-28 23:42:26 -0700 | [diff] [blame] | 159 | rbe_preconfig( |
Chi Wang | 26b94ff | 2021-09-28 23:42:26 -0700 | [diff] [blame] | 160 | name = "rbe_ubuntu1804_java11", |
| 161 | toolchain = "ubuntu1804-bazel-java11", |
| 162 | ) |
Googler | de0612a | 2019-03-07 06:06:55 -0800 | [diff] [blame] | 163 | |
ccalvarin | 8e9f4a8 | 2018-03-23 08:19:37 -0700 | [diff] [blame] | 164 | http_archive( |
| 165 | name = "com_google_googletest", |
Googler | ae53298 | 2022-08-11 08:20:13 -0700 | [diff] [blame] | 166 | sha256 = "81964fe578e9bd7c94dfdb09c8e4d6e6759e19967e397dbea48d1c10e45d0df2", |
| 167 | strip_prefix = "googletest-release-1.12.1", |
ccalvarin | 8e9f4a8 | 2018-03-23 08:19:37 -0700 | [diff] [blame] | 168 | urls = [ |
Googler | ae53298 | 2022-08-11 08:20:13 -0700 | [diff] [blame] | 169 | "https://mirror.bazel.build/github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz", |
| 170 | "https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz", |
ccalvarin | 8e9f4a8 | 2018-03-23 08:19:37 -0700 | [diff] [blame] | 171 | ], |
ccalvarin | 8e9f4a8 | 2018-03-23 08:19:37 -0700 | [diff] [blame] | 172 | ) |
| 173 | |
Tony Aiuto | 2b7ec5c | 2021-01-11 07:50:26 -0800 | [diff] [blame] | 174 | dist_http_archive( |
cparsons | 871cd6f | 2018-08-16 09:10:38 -0700 | [diff] [blame] | 175 | name = "bazel_skylib", |
Yannic Bonenberger | 5e571d2 | 2020-02-13 07:29:58 -0800 | [diff] [blame] | 176 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 177 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
cparsons | a5be661 | 2018-08-27 13:21:21 -0700 | [diff] [blame] | 178 | ) |
Klaus Aehlig | acafe5a | 2018-10-24 03:16:42 -0700 | [diff] [blame] | 179 | |
Alessandro Patti | 6da8086 | 2021-11-11 22:49:37 -0800 | [diff] [blame] | 180 | dist_http_archive( |
Ivo List | 78729c0 | 2023-03-03 08:27:25 -0800 | [diff] [blame] | 181 | name = "rules_python", |
| 182 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 183 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 184 | ) |
| 185 | |
| 186 | load("@rules_python//python:repositories.bzl", "py_repositories") |
| 187 | |
| 188 | py_repositories() |
| 189 | |
| 190 | dist_http_archive( |
Alessandro Patti | 6da8086 | 2021-11-11 22:49:37 -0800 | [diff] [blame] | 191 | name = "zstd-jni", |
Liam Miller-Cushon | c81e175 | 2022-01-13 17:52:18 -0800 | [diff] [blame] | 192 | build_file = "//third_party:zstd-jni/zstd-jni.BUILD", |
Alessandro Patti | 6da8086 | 2021-11-11 22:49:37 -0800 | [diff] [blame] | 193 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 194 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
Son Luong Ngoc | 50b9a63 | 2022-10-14 06:14:26 -0700 | [diff] [blame] | 195 | strip_prefix = "zstd-jni-1.5.2-3", |
Alessandro Patti | 6da8086 | 2021-11-11 22:49:37 -0800 | [diff] [blame] | 196 | ) |
| 197 | |
ajurkowski | 433dc60 | 2021-03-12 10:22:39 -0800 | [diff] [blame] | 198 | http_archive( |
| 199 | name = "org_snakeyaml", |
ajurkowski | 433dc60 | 2021-03-12 10:22:39 -0800 | [diff] [blame] | 200 | build_file_content = """ |
| 201 | java_library( |
| 202 | name = "snakeyaml", |
ajurkowski | 433dc60 | 2021-03-12 10:22:39 -0800 | [diff] [blame] | 203 | srcs = glob(["src/main/**/*.java"]), |
fweikert | 69895ba | 2022-07-13 04:56:04 -0700 | [diff] [blame] | 204 | visibility = [ |
Googler | 98f3511 | 2022-07-13 07:00:41 -0700 | [diff] [blame] | 205 | "@io_bazel//src/main/java/com/google/devtools/build/docgen/release:__pkg__", |
fweikert | 69895ba | 2022-07-13 04:56:04 -0700 | [diff] [blame] | 206 | "@com_google_testparameterinjector//:__pkg__", |
| 207 | ], |
ajurkowski | 433dc60 | 2021-03-12 10:22:39 -0800 | [diff] [blame] | 208 | ) |
| 209 | """, |
cushon | c1d1df0 | 2021-04-07 11:07:00 -0700 | [diff] [blame] | 210 | sha256 = "fd0e0cc6c5974fc8f08be3a15fb4a59954c7dd958b5b68186a803de6420b6e40", |
| 211 | strip_prefix = "asomov-snakeyaml-b28f0b4d87c6", |
ajurkowski | 239a8e7 | 2021-03-23 10:22:49 -0700 | [diff] [blame] | 212 | urls = ["https://mirror.bazel.build/bitbucket.org/asomov/snakeyaml/get/snakeyaml-1.28.tar.gz"], |
ajurkowski | 433dc60 | 2021-03-12 10:22:39 -0800 | [diff] [blame] | 213 | ) |
| 214 | |
ajurkowski | 433dc60 | 2021-03-12 10:22:39 -0800 | [diff] [blame] | 215 | http_archive( |
| 216 | name = "com_google_testparameterinjector", |
ajurkowski | 433dc60 | 2021-03-12 10:22:39 -0800 | [diff] [blame] | 217 | build_file_content = """ |
| 218 | java_library( |
| 219 | name = "testparameterinjector", |
| 220 | testonly = True, |
| 221 | srcs = glob(["src/main/**/*.java"]), |
| 222 | deps = [ |
| 223 | "@org_snakeyaml//:snakeyaml", |
| 224 | "@//third_party:auto_value", |
| 225 | "@//third_party:guava", |
| 226 | "@//third_party:junit4", |
| 227 | "@//third_party/protobuf:protobuf_java", |
| 228 | ], |
ajurkowski | a3353d2 | 2021-03-15 12:38:48 -0700 | [diff] [blame] | 229 | visibility = ["//visibility:public"], |
ajurkowski | 433dc60 | 2021-03-12 10:22:39 -0800 | [diff] [blame] | 230 | ) |
| 231 | """, |
cushon | c1d1df0 | 2021-04-07 11:07:00 -0700 | [diff] [blame] | 232 | sha256 = "562a0e87eb413a7dcad29ebc8d578f6f97503473943585b051c1398a58189b06", |
| 233 | strip_prefix = "TestParameterInjector-1.0", |
ajurkowski | 433dc60 | 2021-03-12 10:22:39 -0800 | [diff] [blame] | 234 | urls = [ |
| 235 | "https://mirror.bazel.build/github.com/google/TestParameterInjector/archive/v1.0.tar.gz", |
| 236 | "https://github.com/google/TestParameterInjector/archive/v1.0.tar.gz", |
| 237 | ], |
| 238 | ) |
| 239 | |
Googler | d51c75f | 2023-06-01 06:10:45 -0700 | [diff] [blame] | 240 | # Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. |
Tony Aiuto | 3b2d310 | 2021-01-07 03:40:14 -0800 | [diff] [blame] | 241 | dist_http_archive( |
oquenchil | 9606887 | 2019-07-08 07:01:39 -0700 | [diff] [blame] | 242 | name = "rules_cc", |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 243 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 244 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
oquenchil | 9606887 | 2019-07-08 07:01:39 -0700 | [diff] [blame] | 245 | ) |
| 246 | |
Tony Aiuto | b15a8b4 | 2021-01-08 07:42:57 -0800 | [diff] [blame] | 247 | dist_http_archive( |
iirina | b815b79 | 2019-07-17 05:47:01 -0700 | [diff] [blame] | 248 | name = "rules_java", |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 249 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 250 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
iirina | b815b79 | 2019-07-17 05:47:01 -0700 | [diff] [blame] | 251 | ) |
| 252 | |
Tony Aiuto | 320bc94 | 2021-01-14 07:43:21 -0800 | [diff] [blame] | 253 | dist_http_archive( |
Yannic Bonenberger | ff44969 | 2019-07-25 05:55:49 -0700 | [diff] [blame] | 254 | name = "rules_proto", |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 255 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 256 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
Yannic Bonenberger | ff44969 | 2019-07-25 05:55:49 -0700 | [diff] [blame] | 257 | ) |
| 258 | |
Googler | d51c75f | 2023-06-01 06:10:45 -0700 | [diff] [blame] | 259 | # For testing, have an distdir_tar with all the archives implicit in every |
| 260 | # WORKSPACE, to that they don't have to be refetched for every test |
| 261 | # calling `bazel sync`. |
| 262 | distdir_tar( |
| 263 | name = "test_WORKSPACE_files", |
| 264 | archives = [ |
| 265 | "android_tools_pkg-0.28.0.tar", |
| 266 | ], |
| 267 | dirname = "test_WORKSPACE/distdir", |
| 268 | dist_deps = {dep: attrs for dep, attrs in DIST_DEPS.items() if "test_WORKSPACE_files" in attrs["used_in"]}, |
| 269 | sha256 = { |
| 270 | "android_tools_pkg-0.28.0.tar": "db3b02421ae974e0b33573f3e4f658d5f89cc9a0b42baae0ba2ac08e25c0720a", |
| 271 | }, |
| 272 | urls = { |
| 273 | "android_tools_pkg-0.28.0.tar": [ |
| 274 | "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.28.0.tar", |
| 275 | ], |
| 276 | }, |
| 277 | ) |
| 278 | |
Tony Aiuto | 2b7ec5c | 2021-01-11 07:50:26 -0800 | [diff] [blame] | 279 | dist_http_archive( |
| 280 | name = "io_bazel_skydoc", |
| 281 | ) |
| 282 | |
Tony Aiuto | e973aef | 2021-01-11 00:32:51 -0800 | [diff] [blame] | 283 | dist_http_archive( |
hlopko | aaf6457 | 2019-06-14 02:33:56 -0700 | [diff] [blame] | 284 | name = "platforms", |
hlopko | aaf6457 | 2019-06-14 02:33:56 -0700 | [diff] [blame] | 285 | ) |
| 286 | |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 287 | # This must be kept in sync with src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_remote_tools.WORKSPACE |
Ted Xie | e7d50fc | 2022-11-15 11:55:05 -0800 | [diff] [blame] | 288 | # and tools/android/android_extensions.bzl |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 289 | http_archive( |
| 290 | name = "android_tools_for_testing", |
| 291 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 292 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
Googler | d96072a | 2023-02-08 13:00:18 -0800 | [diff] [blame] | 293 | sha256 = "db3b02421ae974e0b33573f3e4f658d5f89cc9a0b42baae0ba2ac08e25c0720a", # DO_NOT_REMOVE_THIS_ANDROID_TOOLS_UPDATE_MARKER |
| 294 | url = "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.28.0.tar", |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 295 | ) |
| 296 | |
Googler | fbb5843 | 2023-05-05 15:36:26 -0700 | [diff] [blame] | 297 | # This is here to override the android_gmaven_r8 rule from |
| 298 | # src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_remote_tools.WORKSPACE |
| 299 | # so that tests like src/test/java/com/google/devtools/build/android/r8:AllTests |
| 300 | # use the most recent version of R8 rather than the one might be referenced in a released |
| 301 | # version of bazel that might have an outdated android_remote_tools.WORKSPACE relative to the tests. |
| 302 | dist_http_jar( |
| 303 | name = "android_gmaven_r8", |
tedx | ae24714 | 2022-04-21 16:53:51 -0700 | [diff] [blame] | 304 | ) |
| 305 | |
aiuto | bbeb1da | 2021-01-15 06:50:56 -0800 | [diff] [blame] | 306 | dist_http_archive( |
| 307 | name = "remote_coverage_tools", |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 308 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 309 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
philwo | 17506af | 2020-01-28 04:20:39 -0800 | [diff] [blame] | 310 | ) |
| 311 | |
Googler | d51c75f | 2023-06-01 06:10:45 -0700 | [diff] [blame] | 312 | dist_http_archive( |
| 313 | name = "remotejdk11_linux_for_testing", |
| 314 | build_file_content = JDK_BUILD_TEMPLATE.format(RUNTIME_VERSION = 11), |
| 315 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 316 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 317 | ) |
| 318 | |
| 319 | dist_http_archive( |
| 320 | name = "remotejdk11_linux_aarch64_for_testing", |
| 321 | build_file_content = JDK_BUILD_TEMPLATE.format(RUNTIME_VERSION = 11), |
| 322 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 323 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 324 | ) |
| 325 | |
| 326 | dist_http_archive( |
| 327 | name = "remotejdk11_linux_ppc64le_for_testing", |
| 328 | build_file_content = JDK_BUILD_TEMPLATE.format(RUNTIME_VERSION = 11), |
| 329 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 330 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 331 | ) |
| 332 | |
| 333 | dist_http_archive( |
| 334 | name = "remotejdk11_linux_s390x_for_testing", |
| 335 | build_file_content = JDK_BUILD_TEMPLATE.format(RUNTIME_VERSION = 11), |
| 336 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 337 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 338 | ) |
| 339 | |
| 340 | dist_http_archive( |
| 341 | name = "remotejdk11_macos_for_testing", |
| 342 | build_file_content = JDK_BUILD_TEMPLATE.format(RUNTIME_VERSION = 11), |
| 343 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 344 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 345 | ) |
| 346 | |
| 347 | dist_http_archive( |
| 348 | name = "remotejdk11_macos_aarch64_for_testing", |
| 349 | build_file_content = JDK_BUILD_TEMPLATE.format(RUNTIME_VERSION = 11), |
| 350 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 351 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 352 | ) |
| 353 | |
| 354 | dist_http_archive( |
| 355 | name = "remotejdk11_win_for_testing", |
| 356 | build_file_content = JDK_BUILD_TEMPLATE.format(RUNTIME_VERSION = 11), |
| 357 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 358 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 359 | ) |
| 360 | |
| 361 | dist_http_archive( |
| 362 | name = "remotejdk11_win_arm64_for_testing", |
| 363 | build_file_content = JDK_BUILD_TEMPLATE.format(RUNTIME_VERSION = 11), |
| 364 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 365 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 366 | ) |
| 367 | |
| 368 | [ |
| 369 | dist_http_archive( |
| 370 | name = "remotejdk%s_%s_for_testing" % (version, os), |
| 371 | build_file_content = JDK_BUILD_TEMPLATE.format(RUNTIME_VERSION = version), |
| 372 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE, |
| 373 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_BAZEL_FILE_WIN, |
| 374 | ) |
| 375 | for version in ("17", "20") |
| 376 | for os in ("linux", "macos", "macos_aarch64", "win") + (("linux_s390x", "win_arm64") if version != "20" else ()) |
| 377 | ] |
| 378 | |
| 379 | # Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. |
| 380 | dist_http_archive( |
| 381 | name = "remote_java_tools_for_testing", |
| 382 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 383 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 384 | ) |
| 385 | |
| 386 | # Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. |
| 387 | dist_http_archive( |
| 388 | name = "remote_java_tools_linux_for_testing", |
| 389 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 390 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 391 | ) |
| 392 | |
| 393 | # Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. |
| 394 | dist_http_archive( |
| 395 | name = "remote_java_tools_windows_for_testing", |
| 396 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 397 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 398 | ) |
| 399 | |
| 400 | # Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. |
| 401 | dist_http_archive( |
| 402 | name = "remote_java_tools_darwin_x86_64_for_testing", |
| 403 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 404 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 405 | ) |
| 406 | |
| 407 | # Used in src/main/java/com/google/devtools/build/lib/bazel/rules/java/jdk.WORKSPACE. |
| 408 | dist_http_archive( |
| 409 | name = "remote_java_tools_darwin_arm64_for_testing", |
| 410 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 411 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 412 | ) |
| 413 | |
| 414 | # Used in src/test/shell/bazel/testdata/jdk_http_archives. |
| 415 | dist_http_archive( |
| 416 | name = "remote_java_tools_test", |
| 417 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 418 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 419 | ) |
| 420 | |
| 421 | # Used in src/test/shell/bazel/testdata/jdk_http_archives. |
| 422 | dist_http_archive( |
| 423 | name = "remote_java_tools_test_linux", |
| 424 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 425 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 426 | ) |
| 427 | |
| 428 | # Used in src/test/shell/bazel/testdata/jdk_http_archives. |
| 429 | dist_http_archive( |
| 430 | name = "remote_java_tools_test_windows", |
| 431 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 432 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 433 | ) |
| 434 | |
| 435 | # Used in src/test/shell/bazel/testdata/jdk_http_archives. |
| 436 | dist_http_archive( |
| 437 | name = "remote_java_tools_test_darwin_x86_64", |
| 438 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 439 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 440 | ) |
| 441 | |
| 442 | # Used in src/test/shell/bazel/testdata/jdk_http_archives. |
| 443 | dist_http_archive( |
| 444 | name = "remote_java_tools_test_darwin_arm64", |
| 445 | patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, |
| 446 | patch_cmds_win = EXPORT_WORKSPACE_IN_BUILD_FILE_WIN, |
| 447 | ) |
| 448 | |
| 449 | dist_http_archive( |
| 450 | name = "openjdk11_linux_archive", |
| 451 | build_file_content = """ |
| 452 | java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) |
| 453 | exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) |
| 454 | """, |
| 455 | ) |
| 456 | |
| 457 | # This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. |
| 458 | dist_http_archive( |
| 459 | name = "openjdk11_linux_s390x_archive", |
| 460 | build_file_content = """ |
| 461 | java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) |
| 462 | exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) |
| 463 | """, |
| 464 | ) |
| 465 | |
| 466 | # This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. |
| 467 | dist_http_archive( |
| 468 | name = "openjdk11_darwin_archive", |
| 469 | build_file_content = """ |
| 470 | java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) |
| 471 | exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) |
| 472 | """, |
| 473 | ) |
| 474 | |
| 475 | # This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. |
| 476 | dist_http_archive( |
| 477 | name = "openjdk11_darwin_aarch64_archive", |
| 478 | build_file_content = """ |
| 479 | java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) |
| 480 | exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) |
| 481 | """, |
| 482 | ) |
| 483 | |
| 484 | # This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. |
| 485 | dist_http_archive( |
| 486 | name = "openjdk11_windows_archive", |
| 487 | build_file_content = """ |
| 488 | java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) |
| 489 | exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) |
| 490 | """, |
| 491 | ) |
| 492 | |
| 493 | # This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. |
| 494 | dist_http_archive( |
| 495 | name = "openjdk11_windows_arm64_archive", |
| 496 | build_file_content = """ |
| 497 | java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) |
| 498 | exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) |
| 499 | """, |
| 500 | ) |
| 501 | |
| 502 | # This must be kept in sync with src/test/shell/bazel/testdata/jdk_http_archives. |
| 503 | [ |
| 504 | dist_http_archive( |
| 505 | name = "openjdk%s_%s_archive" % (version, os), |
| 506 | build_file_content = """ |
| 507 | java_runtime(name = 'runtime', srcs = glob(['**']), visibility = ['//visibility:public']) |
| 508 | exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) |
| 509 | """, |
| 510 | ) |
| 511 | for version in ("17", "20") |
| 512 | for os in ("linux", "darwin", "darwin_aarch64", "windows") + (("linux_s390x", "windows_arm64") if version != "20" else ()) |
| 513 | ] |
Liam Miller-Cushon | a7f1c71 | 2022-03-29 11:57:55 -0700 | [diff] [blame] | 514 | |
wyv | 8062ca4 | 2020-05-25 00:21:00 -0700 | [diff] [blame] | 515 | load("@io_bazel_skydoc//:setup.bzl", "stardoc_repositories") |
iirina | f5c33426 | 2019-03-19 02:44:59 -0700 | [diff] [blame] | 516 | |
wyv | 8062ca4 | 2020-05-25 00:21:00 -0700 | [diff] [blame] | 517 | stardoc_repositories() |
Klaus Aehlig | 6f52fca | 2019-03-18 03:43:40 -0700 | [diff] [blame] | 518 | |
Keith Smiley | 7fcbeec | 2019-04-23 17:06:02 -0700 | [diff] [blame] | 519 | register_execution_platforms("//:default_host_platform") # buildozer: disable=positional-args |
Tony Aiuto | ed8a5ec | 2019-07-17 08:33:48 -0700 | [diff] [blame] | 520 | |
| 521 | # Tools for building deb, rpm and tar files. |
Tony Aiuto | 1c9e7ca | 2021-01-05 08:01:21 -0800 | [diff] [blame] | 522 | dist_http_archive( |
Tony Aiuto | ed8a5ec | 2019-07-17 08:33:48 -0700 | [diff] [blame] | 523 | name = "rules_pkg", |
Tony Aiuto | ed8a5ec | 2019-07-17 08:33:48 -0700 | [diff] [blame] | 524 | ) |
iirina | d26a3c1 | 2019-07-19 04:39:33 -0700 | [diff] [blame] | 525 | |
Tony Aiuto | ed8a5ec | 2019-07-17 08:33:48 -0700 | [diff] [blame] | 526 | load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies") |
iirina | d26a3c1 | 2019-07-19 04:39:33 -0700 | [diff] [blame] | 527 | |
Tony Aiuto | ed8a5ec | 2019-07-17 08:33:48 -0700 | [diff] [blame] | 528 | rules_pkg_dependencies() |
Laszlo Csomor | 3e02318 | 2019-08-01 05:05:09 -0700 | [diff] [blame] | 529 | |
| 530 | # Toolchains for Resource Compilation (.rc files on Windows). |
| 531 | load("//src/main/res:winsdk_configure.bzl", "winsdk_configure") |
| 532 | |
| 533 | winsdk_configure(name = "local_config_winsdk") |
| 534 | |
| 535 | load("@local_config_winsdk//:toolchains.bzl", "register_local_rc_exe_toolchains") |
| 536 | |
| 537 | register_local_rc_exe_toolchains() |
| 538 | |
| 539 | register_toolchains("//src/main/res:empty_rc_toolchain") |
Yun Peng | 01609b8 | 2020-05-04 11:12:33 -0700 | [diff] [blame] | 540 | |
Tony Aiuto | e973aef | 2021-01-11 00:32:51 -0800 | [diff] [blame] | 541 | dist_http_archive( |
Yun Peng | e2f11d7 | 2020-06-03 09:16:35 -0700 | [diff] [blame] | 542 | name = "com_github_grpc_grpc", |
Yun Peng | e2f11d7 | 2020-06-03 09:16:35 -0700 | [diff] [blame] | 543 | ) |
| 544 | |
Yun Peng | b47aa71 | 2022-04-05 04:21:29 -0700 | [diff] [blame] | 545 | # Override the abseil-cpp version defined in grpc_deps(), which doesn't work on latest macOS |
| 546 | # Fixes https://github.com/bazelbuild/bazel/issues/15168 |
| 547 | dist_http_archive( |
| 548 | name = "com_google_absl", |
| 549 | ) |
| 550 | |
Ara Nguyen | e58785c | 2022-07-25 13:39:13 -0700 | [diff] [blame] | 551 | # for patching the "com_github_cncf_udpa" deps loaded by grpc_deps |
| 552 | dist_http_archive( |
| 553 | name = "com_envoyproxy_protoc_gen_validate", |
| 554 | ) |
| 555 | |
| 556 | dist_http_archive( |
| 557 | name = "com_github_cncf_udpa", |
| 558 | ) |
| 559 | |
| 560 | dist_http_archive( |
| 561 | name = "com_google_googleapis", |
| 562 | ) |
| 563 | |
| 564 | dist_http_archive( |
| 565 | name = "upb", |
| 566 | ) |
| 567 | |
| 568 | dist_http_archive( |
| 569 | name = "bazel_gazelle", |
| 570 | ) |
| 571 | |
Yun Peng | 3d7937e | 2023-01-10 06:43:02 -0800 | [diff] [blame] | 572 | dist_http_archive( |
| 573 | name = "rules_jvm_external", |
| 574 | ) |
| 575 | |
Fabian Meumertzheim | 883b6ee | 2023-04-25 11:13:57 -0700 | [diff] [blame] | 576 | dist_http_archive( |
| 577 | name = "rules_testing", |
| 578 | patch_cmds = EXPORT_WORKSPACE_BAZEL_IN_BUILD_FILE, |
| 579 | patch_cmds_win = EXPORT_WORKSPACE_BAZEL_IN_BUILD_FILE_WIN, |
| 580 | ) |
| 581 | |
Yun Peng | e2f11d7 | 2020-06-03 09:16:35 -0700 | [diff] [blame] | 582 | # Projects using gRPC as an external dependency must call both grpc_deps() and |
| 583 | # grpc_extra_deps(). |
| 584 | load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") |
Ivo List | 4c6c999 | 2020-09-23 09:25:05 -0700 | [diff] [blame] | 585 | |
Yun Peng | e2f11d7 | 2020-06-03 09:16:35 -0700 | [diff] [blame] | 586 | grpc_deps() |
| 587 | |
| 588 | load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") |
Ivo List | 4c6c999 | 2020-09-23 09:25:05 -0700 | [diff] [blame] | 589 | |
Yun Peng | e2f11d7 | 2020-06-03 09:16:35 -0700 | [diff] [blame] | 590 | grpc_extra_deps() |
| 591 | |
Yun Peng | 01609b8 | 2020-05-04 11:12:33 -0700 | [diff] [blame] | 592 | load("//tools/distributions/debian:deps.bzl", "debian_deps") |
Ivo List | 4c6c999 | 2020-09-23 09:25:05 -0700 | [diff] [blame] | 593 | |
Yun Peng | 01609b8 | 2020-05-04 11:12:33 -0700 | [diff] [blame] | 594 | debian_deps() |
Andrzej Guszak | 0f9a592 | 2020-06-25 05:47:21 -0700 | [diff] [blame] | 595 | |
| 596 | load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") |
Ivo List | 4c6c999 | 2020-09-23 09:25:05 -0700 | [diff] [blame] | 597 | |
Andrzej Guszak | 0f9a592 | 2020-06-25 05:47:21 -0700 | [diff] [blame] | 598 | bazel_skylib_workspace() |
Yun Peng | 3d7937e | 2023-01-10 06:43:02 -0800 | [diff] [blame] | 599 | |
| 600 | load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps") |
| 601 | |
| 602 | rules_jvm_external_deps() |
| 603 | |
| 604 | load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup") |
| 605 | |
| 606 | rules_jvm_external_setup() |
| 607 | |
| 608 | load("@rules_jvm_external//:defs.bzl", "maven_install") |
Googler | ecdb17d | 2023-02-23 08:07:16 -0800 | [diff] [blame] | 609 | load("@rules_jvm_external//:specs.bzl", "maven") |
Yun Peng | 3d7937e | 2023-01-10 06:43:02 -0800 | [diff] [blame] | 610 | |
| 611 | maven_install( |
| 612 | artifacts = [ |
Henry Sudhof | 5105e15 | 2023-04-27 14:44:44 -0700 | [diff] [blame] | 613 | "com.beust:jcommander:1.82", |
Yun Peng | c749f80 | 2023-02-21 06:08:30 -0800 | [diff] [blame] | 614 | "com.github.ben-manes.caffeine:caffeine:3.0.5", |
| 615 | "com.github.kevinstern:software-and-algorithms:1.0", |
salma-samy | c8f940b | 2023-01-30 08:49:57 -0800 | [diff] [blame] | 616 | "com.github.stephenc.jcip:jcip-annotations:1.0-1", |
Yun Peng | c749f80 | 2023-02-21 06:08:30 -0800 | [diff] [blame] | 617 | "com.google.api-client:google-api-client-gson:1.35.2", |
| 618 | "com.google.api-client:google-api-client:1.35.2", |
| 619 | "com.google.auth:google-auth-library-credentials:1.6.0", |
| 620 | "com.google.auth:google-auth-library-oauth2-http:1.6.0", |
| 621 | "com.google.auto.service:auto-service-annotations:1.0.1", |
| 622 | "com.google.auto.service:auto-service:1.0", |
| 623 | "com.google.auto.value:auto-value-annotations:1.9", |
| 624 | "com.google.auto.value:auto-value:1.8.2", |
| 625 | "com.google.auto:auto-common:1.2.1", |
| 626 | "com.google.code.findbugs:jsr305:3.0.2", |
| 627 | "com.google.code.gson:gson:2.9.0", |
| 628 | "com.google.code.java-allocation-instrumenter:java-allocation-instrumenter:3.3.0", |
Benjamin Peterson | 4b9505f | 2023-05-17 01:08:46 -0700 | [diff] [blame] | 629 | "com.google.errorprone:error_prone_annotation:2.19.0", |
| 630 | "com.google.errorprone:error_prone_annotations:2.19.0", |
| 631 | "com.google.errorprone:error_prone_check_api:2.19.0", |
| 632 | "com.google.errorprone:error_prone_core:2.19.0", |
| 633 | "com.google.errorprone:error_prone_type_annotations:2.19.0", |
Yun Peng | c749f80 | 2023-02-21 06:08:30 -0800 | [diff] [blame] | 634 | "com.google.flogger:flogger-system-backend:0.5.1", |
| 635 | "com.google.flogger:flogger:0.5.1", |
| 636 | "com.google.flogger:google-extensions:0.5.1", |
| 637 | "com.google.guava:failureaccess:1.0.1", |
| 638 | "com.google.guava:guava:31.1-jre", |
| 639 | "com.google.http-client:google-http-client-gson:1.42.0", |
| 640 | "com.google.http-client:google-http-client:1.42.0", |
| 641 | "com.google.j2objc:j2objc-annotations:1.3", |
salma-samy | c8f940b | 2023-01-30 08:49:57 -0800 | [diff] [blame] | 642 | "com.ryanharter.auto.value:auto-value-gson-extension:1.3.1", |
| 643 | "com.ryanharter.auto.value:auto-value-gson-runtime:1.3.1", |
| 644 | "com.ryanharter.auto.value:auto-value-gson-factory:1.3.1", |
Yun Peng | c749f80 | 2023-02-21 06:08:30 -0800 | [diff] [blame] | 645 | "com.squareup:javapoet:1.12.0", |
| 646 | "commons-collections:commons-collections:3.2.2", |
| 647 | "commons-lang:commons-lang:2.6", |
| 648 | "io.github.java-diff-utils:java-diff-utils:4.0", |
David Ostrovsky | e715e34 | 2023-04-28 20:32:48 -0700 | [diff] [blame] | 649 | "io.grpc:grpc-api:1.48.1", |
| 650 | "io.grpc:grpc-auth:1.48.1", |
| 651 | "io.grpc:grpc-context:1.48.1", |
| 652 | "io.grpc:grpc-core:1.48.1", |
| 653 | "io.grpc:grpc-netty:1.48.1", |
| 654 | "io.grpc:grpc-protobuf-lite:1.48.1", |
| 655 | "io.grpc:grpc-protobuf:1.48.1", |
| 656 | "io.grpc:grpc-stub:1.48.1", |
Zheng Wei Tan | ff1dc3b | 2023-05-26 07:18:26 -0700 | [diff] [blame] | 657 | "io.netty:netty-buffer:4.1.93.Final", |
| 658 | "io.netty:netty-codec-http2:4.1.93.Final", |
| 659 | "io.netty:netty-codec-http:4.1.93.Final", |
| 660 | "io.netty:netty-codec:4.1.93.Final", |
| 661 | "io.netty:netty-common:4.1.93.Final", |
| 662 | "io.netty:netty-handler-proxy:4.1.93.Final", |
| 663 | "io.netty:netty-handler:4.1.93.Final", |
| 664 | "io.netty:netty-resolver-dns:4.1.93.Final", |
| 665 | "io.netty:netty-resolver:4.1.93.Final", |
Yun Peng | c749f80 | 2023-02-21 06:08:30 -0800 | [diff] [blame] | 666 | "io.netty:netty-tcnative-boringssl-static:jar:linux-aarch_64:2.0.56.Final", |
| 667 | "io.netty:netty-tcnative-boringssl-static:jar:linux-x86_64:2.0.56.Final", |
| 668 | "io.netty:netty-tcnative-boringssl-static:jar:osx-aarch_64:2.0.56.Final", |
| 669 | "io.netty:netty-tcnative-boringssl-static:jar:osx-x86_64:2.0.56.Final", |
| 670 | "io.netty:netty-tcnative-boringssl-static:jar:windows-x86_64:2.0.56.Final", |
| 671 | "io.netty:netty-tcnative-classes:2.0.56.Final", |
Zheng Wei Tan | ff1dc3b | 2023-05-26 07:18:26 -0700 | [diff] [blame] | 672 | "io.netty:netty-transport-classes-epoll:4.1.93.Final", |
| 673 | "io.netty:netty-transport-classes-kqueue:4.1.93.Final", |
| 674 | "io.netty:netty-transport-native-epoll:jar:linux-aarch_64:4.1.93.Final", |
| 675 | "io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.93.Final", |
| 676 | "io.netty:netty-transport-native-kqueue:jar:osx-aarch_64:4.1.93.Final", |
| 677 | "io.netty:netty-transport-native-kqueue:jar:osx-x86_64:4.1.93.Final", |
| 678 | "io.netty:netty-transport-native-unix-common:4.1.93.Final", |
| 679 | "io.netty:netty-transport-native-unix-common:jar:linux-aarch_64:4.1.93.Final", |
| 680 | "io.netty:netty-transport-native-unix-common:jar:linux-x86_64:4.1.93.Final", |
| 681 | "io.netty:netty-transport-native-unix-common:jar:osx-aarch_64:4.1.93.Final", |
| 682 | "io.netty:netty-transport-native-unix-common:jar:osx-x86_64:4.1.93.Final", |
| 683 | "io.netty:netty-transport-sctp:4.1.93.Final", |
| 684 | "io.netty:netty-transport:4.1.93.Final", |
Yun Peng | c749f80 | 2023-02-21 06:08:30 -0800 | [diff] [blame] | 685 | "io.reactivex.rxjava3:rxjava:3.1.2", |
| 686 | "javax.activation:javax.activation-api:1.2.0", |
| 687 | "javax.annotation:javax.annotation-api:1.3.2", |
Yun Peng | 51434e4 | 2023-03-13 10:16:03 -0700 | [diff] [blame] | 688 | "javax.inject:javax.inject:1", |
Yun Peng | 6cbe0f1 | 2023-03-22 10:30:54 -0700 | [diff] [blame] | 689 | "net.bytebuddy:byte-buddy-agent:1.11.13", |
| 690 | "net.bytebuddy:byte-buddy:1.11.13", |
Yun Peng | c749f80 | 2023-02-21 06:08:30 -0800 | [diff] [blame] | 691 | "org.apache.commons:commons-compress:1.19", |
| 692 | "org.apache.commons:commons-pool2:2.8.0", |
| 693 | "org.apache.tomcat:tomcat-annotations-api:8.0.5", |
| 694 | "org.apache.velocity:velocity:1.7", |
| 695 | "org.checkerframework:checker-qual:3.19.0", |
| 696 | "org.ow2.asm:asm-analysis:9.2", |
| 697 | "org.ow2.asm:asm-commons:9.2", |
| 698 | "org.ow2.asm:asm-tree:9.2", |
| 699 | "org.ow2.asm:asm-util:9.2", |
| 700 | "org.ow2.asm:asm:9.2", |
| 701 | "org.pcollections:pcollections:3.1.4", |
| 702 | "org.threeten:threeten-extra:1.5.0", |
| 703 | "org.tukaani:xz:1.9", |
Tiago Quelhas | 5cbb153 | 2023-04-17 03:20:34 -0700 | [diff] [blame] | 704 | "tools.profiler:async-profiler:2.9", |
Yun Peng | 6cbe0f1 | 2023-03-22 10:30:54 -0700 | [diff] [blame] | 705 | # The following jars are for testing. |
| 706 | # junit is not test only due to //src/java_tools/junitrunner/java/com/google/testing/junit/junit4:runner, |
| 707 | # and hamcrest is a dependency of junit. |
| 708 | "junit:junit:4.13.2", |
| 709 | "org.hamcrest:hamcrest-core:1.3", |
Tiago Quelhas | 5cbb153 | 2023-04-17 03:20:34 -0700 | [diff] [blame] | 710 | maven.artifact( |
| 711 | "com.google.guava", |
| 712 | "guava-testlib", |
| 713 | "31.1-jre", |
| 714 | testonly = True, |
| 715 | ), |
| 716 | maven.artifact( |
| 717 | "com.google.jimfs", |
| 718 | "jimfs", |
| 719 | "1.2", |
| 720 | testonly = True, |
| 721 | ), |
| 722 | maven.artifact( |
| 723 | "com.google.testing.compile", |
| 724 | "compile-testing", |
| 725 | "0.18", |
| 726 | testonly = True, |
| 727 | ), |
| 728 | maven.artifact( |
| 729 | "com.google.truth", |
| 730 | "truth", |
| 731 | "1.1.3", |
| 732 | testonly = True, |
| 733 | ), |
| 734 | maven.artifact( |
| 735 | "com.google.truth.extensions", |
| 736 | "truth-java8-extension", |
| 737 | "1.1.3", |
| 738 | testonly = True, |
| 739 | ), |
| 740 | maven.artifact( |
| 741 | "com.google.truth.extensions", |
| 742 | "truth-liteproto-extension", |
| 743 | "1.1.3", |
| 744 | testonly = True, |
| 745 | ), |
| 746 | maven.artifact( |
| 747 | "com.google.truth.extensions", |
| 748 | "truth-proto-extension", |
| 749 | "1.1.3", |
| 750 | testonly = True, |
| 751 | ), |
| 752 | maven.artifact( |
| 753 | "org.mockito", |
| 754 | "mockito-core", |
| 755 | "3.12.4", |
| 756 | testonly = True, |
| 757 | ), |
Yun Peng | 3d7937e | 2023-01-10 06:43:02 -0800 | [diff] [blame] | 758 | ], |
Yun Peng | c749f80 | 2023-02-21 06:08:30 -0800 | [diff] [blame] | 759 | excluded_artifacts = [ |
| 760 | # org.apache.httpcomponents and org.eclipse.jgit:org.eclipse.jgit |
| 761 | # require java.security.jgss module to be embedded in the Bazel binary. |
| 762 | "org.apache.httpcomponents:httpclient", |
| 763 | "org.apache.httpcomponents:httpcore", |
| 764 | "org.eclipse.jgit:org.eclipse.jgit", |
| 765 | # We build protobuf Java library from source, exclude protobuf jars to be safe. |
| 766 | "com.google.protobuf:protobuf-java", |
| 767 | "com.google.protobuf:protobuf-javalite", |
| 768 | ], |
Henry Sudhof | 5105e15 | 2023-04-27 14:44:44 -0700 | [diff] [blame] | 769 | fail_if_repin_required = False, |
Ivo List | 78729c0 | 2023-03-03 08:27:25 -0800 | [diff] [blame] | 770 | maven_install_json = "//:maven_install.json", |
Yun Peng | 3d7937e | 2023-01-10 06:43:02 -0800 | [diff] [blame] | 771 | repositories = [ |
Yun Peng | 3d7937e | 2023-01-10 06:43:02 -0800 | [diff] [blame] | 772 | "https://repo1.maven.org/maven2", |
| 773 | ], |
Yun Peng | c749f80 | 2023-02-21 06:08:30 -0800 | [diff] [blame] | 774 | strict_visibility = True, |
Yun Peng | 3d7937e | 2023-01-10 06:43:02 -0800 | [diff] [blame] | 775 | ) |
| 776 | |
| 777 | load("@maven//:defs.bzl", "pinned_maven_install") |
salma-samy | c8f940b | 2023-01-30 08:49:57 -0800 | [diff] [blame] | 778 | |
Yun Peng | 3d7937e | 2023-01-10 06:43:02 -0800 | [diff] [blame] | 779 | pinned_maven_install() |
Romain Jobredeaux | aaf94c6 | 2023-01-13 06:32:40 -0800 | [diff] [blame] | 780 | |
Romain Jobredeaux | aaf94c6 | 2023-01-13 06:32:40 -0800 | [diff] [blame] | 781 | maven_install( |
salma-samy | c8f940b | 2023-01-30 08:49:57 -0800 | [diff] [blame] | 782 | name = "maven_android", |
Romain Jobredeaux | aaf94c6 | 2023-01-13 06:32:40 -0800 | [diff] [blame] | 783 | artifacts = [ |
Yun Peng | 51434e4 | 2023-03-13 10:16:03 -0700 | [diff] [blame] | 784 | "androidx.databinding:databinding-compiler:3.4.0-alpha10", |
salma-samy | c8f940b | 2023-01-30 08:49:57 -0800 | [diff] [blame] | 785 | "com.android.tools.build:builder:7.1.3", |
| 786 | "com.android.tools.build:manifest-merger:30.1.3", |
| 787 | "com.android.tools:sdk-common:30.1.3", |
| 788 | "com.android.tools:annotations:30.1.3", |
| 789 | "com.android.tools.layoutlib:layoutlib-api:30.1.3", |
| 790 | "com.android.tools:common:30.1.3", |
| 791 | "com.android.tools:repository:30.1.3", |
Romain Jobredeaux | aaf94c6 | 2023-01-13 06:32:40 -0800 | [diff] [blame] | 792 | ], |
Yun Peng | 51434e4 | 2023-03-13 10:16:03 -0700 | [diff] [blame] | 793 | fail_if_repin_required = True, |
salma-samy | c8f940b | 2023-01-30 08:49:57 -0800 | [diff] [blame] | 794 | maven_install_json = "//src/tools/android:maven_android_install.json", |
Romain Jobredeaux | aaf94c6 | 2023-01-13 06:32:40 -0800 | [diff] [blame] | 795 | repositories = [ |
| 796 | "https://dl.google.com/android/maven2", |
| 797 | "https://repo1.maven.org/maven2", |
| 798 | ], |
Romain Jobredeaux | aaf94c6 | 2023-01-13 06:32:40 -0800 | [diff] [blame] | 799 | ) |
| 800 | |
| 801 | load("@maven_android//:defs.bzl", pinned_maven_install_android = "pinned_maven_install") |
Romain Jobredeaux | aaf94c6 | 2023-01-13 06:32:40 -0800 | [diff] [blame] | 802 | |
salma-samy | c8f940b | 2023-01-30 08:49:57 -0800 | [diff] [blame] | 803 | pinned_maven_install_android() |