summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2023-10-16 15:04:48 -0700
committerMatthias Männich <maennich@google.com>2024-01-24 11:10:11 +0000
commitbf05b22f7adda9193c08de150628cfd9a7af5c0b (patch)
tree3865686a68421ca1f5e131f33c115606cb62f997
parent645199add118a8f93a2b33baf5bb28bb8187de2a (diff)
downloadbuild-bf05b22f7adda9193c08de150628cfd9a7af5c0b.tar.gz
kleaf: workspace.bzl: Expand import_external_repositories
Now that Roboleaf will stop using external.bzl, there's no benefit to keep a common definition. Hence, just expand the macro in workspace.bzl directly. Bug: 293260835 Change-Id: If39846a6003d937471b70bb466621755d1165cbc Merged-In: If39846a6003d937471b70bb466621755d1165cbc
-rw-r--r--kleaf/workspace.bzl23
1 files changed, 17 insertions, 6 deletions
diff --git a/kleaf/workspace.bzl b/kleaf/workspace.bzl
index 96a397f..6486e5f 100644
--- a/kleaf/workspace.bzl
+++ b/kleaf/workspace.bzl
@@ -16,7 +16,7 @@
Defines repositories in a Kleaf workspace.
"""
-load("//build/bazel_common_rules/workspace:external.bzl", "import_external_repositories")
+load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load(
"//build/kernel/kleaf:constants.bzl",
"CI_TARGET_MAPPING",
@@ -61,11 +61,22 @@ WARNING: define_kleaf_workspace() should be called with common_kernel_package={}
repr(common_kernel_package),
))
- import_external_repositories(
- # keep sorted
- bazel_skylib = True,
- io_abseil_py = True,
- io_bazel_stardoc = True,
+ maybe(
+ repo_rule = native.local_repository,
+ name = "bazel_skylib",
+ path = "external/bazel-skylib",
+ )
+
+ maybe(
+ repo_rule = native.local_repository,
+ name = "io_abseil_py",
+ path = "external/python/absl-py",
+ )
+
+ maybe(
+ repo_rule = native.local_repository,
+ name = "io_bazel_stardoc",
+ path = "external/stardoc",
)
# The prebuilt NDK does not support Bazel.