diff options
author | Tony Aiuto <aiuto@google.com> | 2023-02-27 15:33:12 -0500 |
---|---|---|
committer | Tony Aiuto <aiuto@google.com> | 2023-02-27 15:33:12 -0500 |
commit | 7de72c96421484ad4d7c068fa58a68d57ea33fa1 (patch) | |
tree | 2aab214566e0c086577edbf21450ca09975f78fd | |
parent | 95f66cf97ece85cfadbb4b63e6afa8cf0735a9e0 (diff) | |
download | bazelbuild-rules_license-7de72c96421484ad4d7c068fa58a68d57ea33fa1.tar.gz |
Make rules/private a distinct package.
That allows for better visibility control.
-rw-r--r-- | distro/BUILD | 1 | ||||
-rw-r--r-- | doc_build/BUILD | 1 | ||||
-rw-r--r-- | examples/policy_checker/license_policy_check.bzl | 2 | ||||
-rw-r--r-- | rules/compliance.bzl | 2 | ||||
-rw-r--r-- | rules/gather_licenses_info.bzl | 2 | ||||
-rw-r--r-- | rules/gather_metadata.bzl | 2 | ||||
-rw-r--r-- | rules/licenses_core.bzl | 2 | ||||
-rw-r--r-- | rules/private/BUILD | 35 | ||||
-rw-r--r-- | rules/sbom.bzl | 2 |
9 files changed, 43 insertions, 6 deletions
diff --git a/distro/BUILD b/distro/BUILD index a79d54b..693d1ac 100644 --- a/distro/BUILD +++ b/distro/BUILD @@ -37,6 +37,7 @@ pkg_tar( "//licenses/generic:standard_package", "//licenses/spdx:standard_package", "//rules:standard_package", + "//rules/private:standard_package", "//tools:standard_package", ], extension = "tar.gz", diff --git a/doc_build/BUILD b/doc_build/BUILD index 5aadfde..87386f1 100644 --- a/doc_build/BUILD +++ b/doc_build/BUILD @@ -89,6 +89,7 @@ bzl_library( srcs = [ "//:version.bzl", "//rules:standard_package", + "//rules/private:standard_package", # "@bazel_skylib//lib:paths", ], visibility = ["//visibility:public"], diff --git a/examples/policy_checker/license_policy_check.bzl b/examples/policy_checker/license_policy_check.bzl index b91c96f..bb35eee 100644 --- a/examples/policy_checker/license_policy_check.bzl +++ b/examples/policy_checker/license_policy_check.bzl @@ -23,7 +23,7 @@ load( "gather_licenses_info", ) load("@rules_license//rules:providers.bzl", "LicenseInfo") -load("@rules_license//rules:private/gathering_providers.bzl", "TransitiveLicensesInfo") +load("@rules_license//rules/private:gathering_providers.bzl", "TransitiveLicensesInfo") # This is a crude example of the kind of thing which can be done. def _license_policy_check_impl(ctx): diff --git a/rules/compliance.bzl b/rules/compliance.bzl index 2127869..2fb04ab 100644 --- a/rules/compliance.bzl +++ b/rules/compliance.bzl @@ -20,7 +20,7 @@ load( "write_licenses_info", ) load( - "@rules_license//rules:private/gathering_providers.bzl", + "@rules_license//rules/private:gathering_providers.bzl", "TransitiveLicensesInfo", ) diff --git a/rules/gather_licenses_info.bzl b/rules/gather_licenses_info.bzl index 894d20d..9dd1cbc 100644 --- a/rules/gather_licenses_info.bzl +++ b/rules/gather_licenses_info.bzl @@ -20,7 +20,7 @@ load( "should_traverse", ) load( - "@rules_license//rules:private/gathering_providers.bzl", + "@rules_license//rules/private:gathering_providers.bzl", "TransitiveLicensesInfo", ) diff --git a/rules/gather_metadata.bzl b/rules/gather_metadata.bzl index 609af72..162ea97 100644 --- a/rules/gather_metadata.bzl +++ b/rules/gather_metadata.bzl @@ -25,7 +25,7 @@ load( "PackageInfo", ) load( - "@rules_license//rules:private/gathering_providers.bzl", + "@rules_license//rules/private:gathering_providers.bzl", "TransitiveMetadataInfo", ) diff --git a/rules/licenses_core.bzl b/rules/licenses_core.bzl index 46b835c..9bb37cb 100644 --- a/rules/licenses_core.bzl +++ b/rules/licenses_core.bzl @@ -20,7 +20,7 @@ load( "LicenseInfo", ) load( - "@rules_license//rules:private/gathering_providers.bzl", + "@rules_license//rules/private:gathering_providers.bzl", "LicensedTargetInfo", "TransitiveLicensesInfo", ) diff --git a/rules/private/BUILD b/rules/private/BUILD new file mode 100644 index 0000000..452e623 --- /dev/null +++ b/rules/private/BUILD @@ -0,0 +1,35 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Rules for making license declarations.""" + +package( + default_applicable_licenses = ["//:license"], + default_visibility = ["//visibility:public"], +) + +licenses(["notice"]) + +filegroup( + name = "standard_package", + srcs = glob(["**"]), +) + +# Do not create a bzl_library(). That would create a dependency loop back +# to bazel-skylib. We export the .bzl files to the documentation maker. +exports_files( + glob([ + "*.bzl", + ]), + visibility = ["//doc_build:__pkg__"], +) diff --git a/rules/sbom.bzl b/rules/sbom.bzl index 721999d..73c1861 100644 --- a/rules/sbom.bzl +++ b/rules/sbom.bzl @@ -20,7 +20,7 @@ load( "write_metadata_info", ) load( - "@rules_license//rules:private/gathering_providers.bzl", + "@rules_license//rules/private:gathering_providers.bzl", "TransitiveLicensesInfo", ) |