Skip to content

Commit cadbaa5

Browse files
katrecopybara-github
authored andcommitted
Apply buildifier to MODULE.bazel.
Also add a note about how to update the lockfile. Closes #19796. PiperOrigin-RevId: 573850818 Change-Id: Iee09ccad949b692359f1280ee42cf6752e9bd5ac
1 parent bc1df91 commit cadbaa5

File tree

7 files changed

+112
-92
lines changed

7 files changed

+112
-92
lines changed

MODULE.bazel

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Bazel build and test dependencies."""
22

3+
# NOTE: When editing this file, also update the lockfile.
4+
# bazel mod deps --lockfile_mode=update
5+
36
module(
47
name = "bazel",
58
version = "7.0.0-pre",
@@ -174,34 +177,44 @@ maven.install(
174177
],
175178
# Don't forget to change this to back to True before submitting your change.
176179
fail_if_repin_required = True,
177-
strict_visibility = True,
178180
lock_file = "//:maven_install.json",
179181
repositories = [
180182
"https://repo1.maven.org/maven2",
181183
],
184+
strict_visibility = True,
182185
)
186+
183187
# Test only maven dependencies
184-
[maven.artifact(artifact = artifact, group = group, version = version, testonly = True)
185-
for group, artifact, version in [coord.split(":") for coord in [
186-
"com.google.guava:guava-testlib:31.1-jre",
187-
"com.google.jimfs:jimfs:1.2",
188-
"com.google.testing.compile:compile-testing:0.18",
189-
"com.google.testparameterinjector:test-parameter-injector:1.0",
190-
"com.google.truth:truth:1.1.3",
191-
"com.google.truth.extensions:truth-java8-extension:1.1.3",
192-
"com.google.truth.extensions:truth-liteproto-extension:1.1.3",
193-
"com.google.truth.extensions:truth-proto-extension:1.1.3",
194-
"org.mockito:mockito-core:5.4.0",
195-
]]]
188+
[
189+
maven.artifact(
190+
testonly = True,
191+
artifact = artifact,
192+
group = group,
193+
version = version,
194+
)
195+
for group, artifact, version in [coord.split(":") for coord in [
196+
"com.google.guava:guava-testlib:31.1-jre",
197+
"com.google.jimfs:jimfs:1.2",
198+
"com.google.testing.compile:compile-testing:0.18",
199+
"com.google.testparameterinjector:test-parameter-injector:1.0",
200+
"com.google.truth:truth:1.1.3",
201+
"com.google.truth.extensions:truth-java8-extension:1.1.3",
202+
"com.google.truth.extensions:truth-liteproto-extension:1.1.3",
203+
"com.google.truth.extensions:truth-proto-extension:1.1.3",
204+
"org.mockito:mockito-core:5.4.0",
205+
]]
206+
]
207+
196208
use_repo(maven, "maven", "unpinned_maven")
197209

198210
java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains")
199-
use_repo(java_toolchains,
211+
use_repo(
212+
java_toolchains,
200213
"local_jdk",
201214
# The following are required for visibility from TEST_REPOS in distdir_deps.bzl
202215
"remote_java_tools",
203-
"remote_java_tools_darwin_x86_64",
204216
"remote_java_tools_darwin_arm64",
217+
"remote_java_tools_darwin_x86_64",
205218
"remote_java_tools_linux",
206219
"remote_java_tools_windows",
207220
"remotejdk11_linux",
@@ -246,8 +259,8 @@ use_repo(pip, "bazel_pip_dev_deps")
246259
bazel_build_deps = use_extension("//:extensions.bzl", "bazel_build_deps")
247260
use_repo(
248261
bazel_build_deps,
249-
"bootstrap_repo_cache",
250262
"bazel_tools_repo_cache",
263+
"bootstrap_repo_cache",
251264
"debian_cc_deps",
252265
"openjdk_linux_aarch64_vanilla",
253266
"openjdk_linux_ppc64le_vanilla",
@@ -270,9 +283,9 @@ use_repo(cc_configure, "local_config_cc")
270283
bazel_test_deps = use_extension("//:extensions.bzl", "bazel_test_deps")
271284
use_repo(
272285
bazel_test_deps,
286+
"bazelci_rules",
273287
"local_bazel_source_list",
274288
"local_config_winsdk",
275-
"bazelci_rules",
276289
)
277290

278291
bazel_rbe_deps = use_extension("//:rbe_extension.bzl", "bazel_rbe_deps")

0 commit comments

Comments
 (0)