-
Notifications
You must be signed in to change notification settings - Fork 345
Expand file tree
/
Copy pathMODULE.bazel
More file actions
204 lines (191 loc) · 7.75 KB
/
MODULE.bazel
File metadata and controls
204 lines (191 loc) · 7.75 KB
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_java", version = "9.6.1")
bazel_dep(name = "rules_python", version = "1.9.0")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "protobuf", version = "34.0.bcr.1")
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "rules_pkg", version = "1.2.0")
bazel_dep(name = "rules_jvm_external", version = "6.10")
# required for aspect tests
bazel_dep(name = "rules_shell", version = "0.7.1")
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(name = "abseil-cpp", version = "20250814.2")
# import clwb test projects for aspect tests
local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "local_repository")
local_repository(
name = "clwb_virtual_includes_project",
path = "clwb/tests/projects/virtual_includes",
)
local_repository(
name = "clwb_virtual_includes_external",
path = "clwb/tests/projects/virtual_includes/lib/external",
)
# custom rules_bazel_integration_test version, patches are required until we write our own version of these rules :c
bazel_dep(name = "rules_bazel_integration_test", version = "0.37.1")
single_version_override(
module_name = "rules_bazel_integration_test",
patch_strip = 1,
patches = ["//third_party/bazel/patches:rules_bazel_integration_test.patch"],
)
# custom rules kotlin version, patches are required
bazel_dep(name = "rules_kotlin", version = "2.3.20")
single_version_override(
module_name = "rules_kotlin",
patch_strip = 1,
patches = ["//third_party/kotlin/patches:strip_stdlib.patch"],
)
register_toolchains("//third_party/kotlin:toolchain")
# configure python cor rules_python
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
configure_coverage_tool = True,
python_version = "3.12",
)
use_repo(python, "python_3_12", "python_versions")
# configure bazel binaries for rules_bazel_integration_test
bazel_binaries = use_extension("@rules_bazel_integration_test//:extensions.bzl", "bazel_binaries")
bazel_binaries.download(version = "7.7.1")
bazel_binaries.download(version = "8.6.0")
bazel_binaries.download(version = "9.0.1")
bazel_binaries.download(version = "last_green")
use_repo(
bazel_binaries,
"bazel_binaries",
"bazel_binaries_bazelisk",
"build_bazel_bazel_7_7_1",
"build_bazel_bazel_8_6_0",
"build_bazel_bazel_9_0_1",
"build_bazel_bazel_last_green",
)
# configure maven for rules_java_external
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
name = "maven",
artifacts = [
"junit:junit:4.13.2",
"org.opentest4j:opentest4j:1.3.0",
"org.mockito:mockito-core:5.22.0",
"org.objenesis:objenesis:3.5",
"net.bytebuddy:byte-buddy:1.18.7",
"net.bytebuddy:byte-buddy-agent:1.18.7",
"com.google.flogger:flogger:0.9",
"com.google.flogger:flogger-system-backend:0.9",
"com.googlecode.java-diff-utils:diffutils:1.3.0",
# Usually, we'd get this from the JetBrains SDK, but the bundled one not aware of Bazel platforms,
# so it fails on certain setups.
"net.java.dev.jna:jna:5.18.1",
"com.google.auto.value:auto-value-annotations:1.11.1",
"com.google.auto.value:auto-value:1.11.1",
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.code.gson:gson:2.13.2",
"com.google.errorprone:error_prone_annotations:2.48.0",
"com.google.guava:guava:33.5.0-jre", # changed to jre
"com.google.truth:truth:1.4.5",
"com.google.j2objc:j2objc-annotations:3.1",
"com.google.guava:failureaccess:1.0.3",
"org.hamcrest:hamcrest-core:3.0",
"org.jetbrains:annotations:26.1.0",
"org.jetbrains.pty4j:pty4j:0.13.12",
"org.opentest4j:opentest4j:1.3.0",
# Only required for the maintenance script, otherwise use the stdlib for the sdk
"org.jetbrains.kotlin:kotlin-stdlib:2.2.21",
"org.jetbrains.kotlinx:kotlinx-serialization-json:1.10.0",
],
fail_if_repin_required = True,
generate_compat_repositories = True,
known_contributing_modules = [
"",
"bazel_worker_java",
"protobuf",
],
lock_file = "//:maven_install.json",
repositories = [
"https://cache-redirector.jetbrains.com/maven-central",
"https://cache-redirector.jetbrains.com/intellij-dependencies",
],
)
use_repo(
maven,
"com_google_guava_failureaccess",
"com_google_guava_guava",
"com_google_j2objc_j2objc_annotations",
"maven",
"org_opentest4j_opentest4j",
"unpinned_maven",
auto_value = "com_google_auto_value_auto_value",
auto_value_annotations = "com_google_auto_value_auto_value_annotations",
bytebuddy = "net_bytebuddy_byte_buddy",
bytebuddy_agent = "net_bytebuddy_byte_buddy_agent", # Can it be `bytebuddy-agent`? (not a legal identifier)
diffutils = "com_googlecode_java_diff_utils_diffutils",
error_prone_annotations = "com_google_errorprone_error_prone_annotations",
flogger = "com_google_flogger_flogger",
flogger_system_backend = "com_google_flogger_flogger_system_backend",
gson = "com_google_code_gson_gson",
hamcrest = "org_hamcrest_hamcrest_core",
jetbrains_annotations = "org_jetbrains_annotations",
jna = "net_java_dev_jna_jna",
jsr305_annotations = "com_google_code_findbugs_jsr305",
junit = "junit_junit",
mockito = "org_mockito_mockito_core",
objenesis = "org_objenesis_objenesis",
ptylib = "org_jetbrains_pty4j_pty4j",
truth = "com_google_truth_truth",
)
# install all required intellij sdks and plugins
intellij_platform = use_extension("//intellij_platform_sdk:extension.bzl", "intellij_platform")
intellij_platform.sdk(
name = "clion",
build_file = "//intellij_platform_sdk:BUILD.clion252",
sha256 = "4265a463d895a3c673822e58e1eae59041edfca255fc91a4a82ae4298180bb43",
version = "2025.2.6",
)
intellij_platform.sdk(
name = "clion",
build_file = "//intellij_platform_sdk:BUILD.clion253",
sha256 = "f25b4a30b7c921ea9b7babad76bcd0d784062af1a0f08b1bf47d615246ab7bb6",
version = "2025.3.3",
)
intellij_platform.sdk(
name = "clion",
alias = "clion_2026_1",
build_file = "//intellij_platform_sdk:BUILD.clion261",
sha256 = "4e1a694e99709e6f698aab31c4f9d0531dd05bfa763644e5ee8d163447fe2505",
version = "261.22158.190-EAP-SNAPSHOT",
)
intellij_platform.plugin(
name = "PythonCore",
alias = "python_2025_2",
build_file = "//intellij_platform_sdk:BUILD.python",
sha256 = "24224d3a67aad697e615151766f434c6c9746f99989aa423482926086ac2e96b",
version = "252.28539.13",
)
intellij_platform.plugin(
name = "PythonCore",
alias = "python_2025_3",
build_file = "//intellij_platform_sdk:BUILD.python",
sha256 = "2d537031f4e5e2db5c9ccfa7703781518a829b293c0133a8690f6700092dd9f2",
version = "253.32098.37",
)
intellij_platform.plugin(
name = "PythonCore",
alias = "python_2026_1",
build_file = "//intellij_platform_sdk:BUILD.python",
sha256 = "7443dfbb718efcf00d7bc790e58af2c8d9fdc5a911ce44c80764a38915226f62",
version = "261.22158.182",
)
use_repo(intellij_platform, "clion_2025_2", "clion_2025_3", "clion_2026_1", "python_2025_2", "python_2025_3", "python_2026_1")
# build tools deploy jars for the tools required by the plugin
bazel_build_jars = use_repo_rule("//third_party/bazel/jars:extension.bzl", "bazel_build_jars")
bazel_build_jars(
name = "bazel_jars",
jars = [
"//src/tools/execlog:parser_deploy.jar",
"//src/main/java/net/starlark/java/cmd:starlark_deploy.jar",
],
patches = [
"//third_party/bazel/jars:starlark_repl.patch",
"//third_party/bazel/jars:execlog_parser.patch",
],
sha256 = "728eb778d882e247097f78f0626835ea984d54523053753a56b9bc18e46e23cb",
tag = "9.0.1",
)