xref: /aosp_15_r20/external/bazel-skylib/BUILD (revision bcb5dc7965af6ee42bf2f21341a2ec00233a8c8a)
1load("@rules_license//rules:license.bzl", "license")
2load("//:bzl_library.bzl", "bzl_library")
3
4package(
5    default_applicable_licenses = ["//:license"],
6    default_visibility = ["//visibility:public"],
7)
8
9license(
10    name = "license",
11    package_name = "bazelbuild/bazel_skylib",
12    license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"],
13)
14
15licenses(["notice"])
16
17# buildifier: disable=skylark-comment
18# gazelle:exclude skylark_library.bzl
19
20exports_files([
21    "LICENSE",
22    "MODULE.bazel",
23    "WORKSPACE",
24])
25
26filegroup(
27    name = "test_deps",
28    testonly = True,
29    srcs = [
30        "BUILD",
31        "//lib:test_deps",
32        "//rules:test_deps",
33        "//toolchains/unittest:test_deps",
34    ] + glob(["*.bzl"]),
35)
36
37bzl_library(
38    name = "lib",
39    srcs = ["lib.bzl"],
40    deprecation = (
41        "lib.bzl will go away in the future, please directly depend on the" +
42        " module(s) needed as it is more efficient."
43    ),
44    deps = [
45        "//lib:collections",
46        "//lib:dicts",
47        "//lib:new_sets",
48        "//lib:partial",
49        "//lib:paths",
50        "//lib:selects",
51        "//lib:sets",
52        "//lib:shell",
53        "//lib:structs",
54        "//lib:types",
55        "//lib:unittest",
56        "//lib:versions",
57    ],
58)
59
60bzl_library(
61    name = "bzl_library",
62    srcs = ["bzl_library.bzl"],
63)
64
65bzl_library(
66    name = "version",
67    srcs = ["version.bzl"],
68)
69
70bzl_library(
71    name = "workspace",
72    srcs = ["workspace.bzl"],
73)
74
75# The files needed for distribution.
76# TODO(aiuto): We should strip this from the release, but there is no
77# capability now to generate BUILD.foo from BUILD and have it appear in the
78# tarball as BUILD.
79filegroup(
80    name = "distribution",
81    srcs = [
82        "BUILD",
83        "CODEOWNERS",
84        "CONTRIBUTORS",
85        "LICENSE",
86        "WORKSPACE.bzlmod",
87        "//lib:distribution",
88        "//rules:distribution",
89        "//rules/directory:distribution",
90        "//rules/directory/private:distribution",
91        "//rules/private:distribution",
92        "//toolchains/unittest:distribution",
93    ] + glob(["*.bzl"]),
94)
95