forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MODULE.bazel
152 lines (126 loc) · 5.09 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
"""Bazel build and test dependencies."""
module(
name = "bazel",
version = "7.0.0-pre",
repo_name = "io_bazel",
)
bazel_dep(name = "rules_license", version = "0.0.7")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
bazel_dep(name = "grpc", version = "1.48.1.bcr.1", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "platforms", version = "0.0.7")
bazel_dep(name = "rules_pkg", version = "0.7.0")
bazel_dep(name = "stardoc", version = "0.5.3", repo_name = "io_bazel_skydoc")
bazel_dep(name = "zstd-jni", version = "1.5.2-3.bcr.1")
bazel_dep(name = "blake3", version = "1.3.3")
bazel_dep(name = "zlib", version = "1.2.13")
bazel_dep(name = "rules_cc", version = "0.0.8")
bazel_dep(name = "rules_java", version = "6.3.0")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
bazel_dep(name = "rules_jvm_external", version = "5.2")
bazel_dep(name = "rules_python", version = "0.24.0")
bazel_dep(name = "rules_testing", version = "0.0.4")
# TODO(pcloudy): Add remoteapis and googleapis as Bazel modules in the BCR.
bazel_dep(name = "remoteapis", version = "")
bazel_dep(name = "googleapis", version = "")
single_version_override(
module_name = "rules_jvm_external",
patch_strip = 1,
patches = ["//third_party:rules_jvm_external_5.2.patch"],
)
local_path_override(
module_name = "remoteapis",
path = "./third_party/remoteapis",
)
local_path_override(
module_name = "googleapis",
path = "./third_party/googleapis",
)
# =========================================
# Java dependencies
# =========================================
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
# We don't yet specify the maven coordinates in the MODULE.bazel to avoid duplicating information.
# Always respect the maven_install.json file generated by rules_jvm_external from the WORKSPACE file.
# TODO(pcloudy): We should add maven coordinates here when we enable Bzlmod in the default build for Bazel.
lock_file = "//:maven_install.json",
repositories = [
"https://repo1.maven.org/maven2",
],
)
use_repo(maven, "maven")
java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains")
use_repo(java_toolchains, "local_jdk")
# =========================================
# Other Bazel internal dependencies
# - embedded JDKs
# - repos for Debian build
# =========================================
bazel_internal_deps = use_extension("//:extensions.bzl", "bazel_internal_deps")
use_repo(
bazel_internal_deps,
"debian_cc_deps",
"openjdk_linux_aarch64_vanilla",
"openjdk_linux_ppc64le_vanilla",
"openjdk_linux_s390x_vanilla",
"openjdk_linux_vanilla",
"openjdk_macos_aarch64_vanilla",
"openjdk_macos_x86_64_vanilla",
"openjdk_win_arm64_vanilla",
"openjdk_win_vanilla",
)
# =========================================
# Register platforms & toolchains
# =========================================
register_execution_platforms("//:default_host_platform")
register_toolchains("@bazel_tools//tools/python:autodetecting_toolchain")
register_toolchains("@local_config_winsdk//:all")
register_toolchains("//src/main/res:empty_rc_toolchain")
# =========================================
# Python dependencies
# =========================================
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(python_version = "3.8")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "bazel_pip_dev_deps",
python_version = "3.8",
requirements_lock = "//:requirements.txt",
)
use_repo(pip, "bazel_pip_dev_deps")
# =========================================
# Other dev dependencies
# =========================================
bazel_dep(name = "googletest", version = "1.12.1", repo_name = "com_google_googletest")
bazel_dev_deps = use_extension("//:extensions.bzl", "bazel_dev_deps")
use_repo(
bazel_dev_deps,
"local_bazel_source_list",
"local_config_winsdk",
"bazelci_rules",
)
bazel_rbe_deps = use_extension("//:rbe_extension.bzl", "bazel_rbe_deps")
use_repo(bazel_rbe_deps, "rbe_ubuntu1804_java11")
# =========================================
# Android tools Java dependencies
# =========================================
maven_android = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven_android.install(
name = "maven_android",
# We don't yet specify the maven coordinates in the MODULE.bazel to avoid duplicating information.
# Always respect the maven_install.json file generated by rules_jvm_external from the WORKSPACE file.
# TODO(pcloudy): We should add maven coordinates here when we enable Bzlmod in the default build for Bazel.
lock_file = "//src/tools/android:maven_android_install.json",
repositories = [
"https://dl.google.com/android/maven2",
"https://repo1.maven.org/maven2",
],
)
use_repo(maven_android, "maven_android")
bazel_android_deps = use_extension("//:extensions.bzl", "bazel_android_deps")
use_repo(
bazel_android_deps,
"android_gmaven_r8",
"desugar_jdk_libs",
)