Skip to content

Commit

Permalink
Apply buildifier to MODULE.bazel.
Browse files Browse the repository at this point in the history
Also add a note about how to update the lockfile.

Closes bazelbuild#19796.

PiperOrigin-RevId: 573850818
Change-Id: Iee09ccad949b692359f1280ee42cf6752e9bd5ac
  • Loading branch information
katre authored and copybara-github committed Oct 16, 2023
1 parent bc1df91 commit cadbaa5
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 92 deletions.
47 changes: 30 additions & 17 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""Bazel build and test dependencies."""

# NOTE: When editing this file, also update the lockfile.
# bazel mod deps --lockfile_mode=update

module(
name = "bazel",
version = "7.0.0-pre",
Expand Down Expand Up @@ -174,34 +177,44 @@ maven.install(
],
# Don't forget to change this to back to True before submitting your change.
fail_if_repin_required = True,
strict_visibility = True,
lock_file = "//:maven_install.json",
repositories = [
"https://repo1.maven.org/maven2",
],
strict_visibility = True,
)

# Test only maven dependencies
[maven.artifact(artifact = artifact, group = group, version = version, testonly = True)
for group, artifact, version in [coord.split(":") for coord in [
"com.google.guava:guava-testlib:31.1-jre",
"com.google.jimfs:jimfs:1.2",
"com.google.testing.compile:compile-testing:0.18",
"com.google.testparameterinjector:test-parameter-injector:1.0",
"com.google.truth:truth:1.1.3",
"com.google.truth.extensions:truth-java8-extension:1.1.3",
"com.google.truth.extensions:truth-liteproto-extension:1.1.3",
"com.google.truth.extensions:truth-proto-extension:1.1.3",
"org.mockito:mockito-core:5.4.0",
]]]
[
maven.artifact(
testonly = True,
artifact = artifact,
group = group,
version = version,
)
for group, artifact, version in [coord.split(":") for coord in [
"com.google.guava:guava-testlib:31.1-jre",
"com.google.jimfs:jimfs:1.2",
"com.google.testing.compile:compile-testing:0.18",
"com.google.testparameterinjector:test-parameter-injector:1.0",
"com.google.truth:truth:1.1.3",
"com.google.truth.extensions:truth-java8-extension:1.1.3",
"com.google.truth.extensions:truth-liteproto-extension:1.1.3",
"com.google.truth.extensions:truth-proto-extension:1.1.3",
"org.mockito:mockito-core:5.4.0",
]]
]

use_repo(maven, "maven", "unpinned_maven")

java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains")
use_repo(java_toolchains,
use_repo(
java_toolchains,
"local_jdk",
# The following are required for visibility from TEST_REPOS in distdir_deps.bzl
"remote_java_tools",
"remote_java_tools_darwin_x86_64",
"remote_java_tools_darwin_arm64",
"remote_java_tools_darwin_x86_64",
"remote_java_tools_linux",
"remote_java_tools_windows",
"remotejdk11_linux",
Expand Down Expand Up @@ -246,8 +259,8 @@ use_repo(pip, "bazel_pip_dev_deps")
bazel_build_deps = use_extension("//:extensions.bzl", "bazel_build_deps")
use_repo(
bazel_build_deps,
"bootstrap_repo_cache",
"bazel_tools_repo_cache",
"bootstrap_repo_cache",
"debian_cc_deps",
"openjdk_linux_aarch64_vanilla",
"openjdk_linux_ppc64le_vanilla",
Expand All @@ -270,9 +283,9 @@ use_repo(cc_configure, "local_config_cc")
bazel_test_deps = use_extension("//:extensions.bzl", "bazel_test_deps")
use_repo(
bazel_test_deps,
"bazelci_rules",
"local_bazel_source_list",
"local_config_winsdk",
"bazelci_rules",
)

bazel_rbe_deps = use_extension("//:rbe_extension.bzl", "bazel_rbe_deps")
Expand Down
Loading

0 comments on commit cadbaa5

Please sign in to comment.