diff options
author | Tony Aiuto <aiuto@google.com> | 2022-12-07 16:52:06 -0500 |
---|---|---|
committer | Tony Aiuto <aiuto@google.com> | 2022-12-07 16:52:06 -0500 |
commit | 0176b8dc7b2e7586fee71d6ab5e5729cca7067be (patch) | |
tree | a3c5e22630434bd462c3e3fc7d7fce6f34bed1b7 | |
parent | 3fbc687756043fb58a407c2ea8c944bc2fe1d922 (diff) | |
download | bazelbuild-platforms-0176b8dc7b2e7586fee71d6ab5e5729cca7067be.tar.gz |
Add rules_license style declaration.
- Done for both WORKSPACE and bzlmod styles
- The dependency is different because rules_license is not
up to date in the BCR. I'll correct that at the next
rules_license release.
-rw-r--r-- | BUILD | 15 | ||||
-rw-r--r-- | MODULE.bazel | 4 | ||||
-rw-r--r-- | WORKSPACE | 8 | ||||
-rw-r--r-- | WORKSPACE.bzlmod | 4 |
4 files changed, 28 insertions, 3 deletions
@@ -1,6 +1,17 @@ -package(default_visibility = ["//visibility:public"]) +load("@rules_license//rules:license.bzl", "license") -licenses(["notice"]) +package( + default_applicable_licenses = [":license"], + default_visibility = ["//visibility:public"], +) + +license( + name = "license", + license_kinds = [ + "@rules_license//licenses/spdx:Apache-2.0" + ], + license_text = "LICENSE", +) exports_files(["LICENSE"]) diff --git a/MODULE.bazel b/MODULE.bazel index e4f4cfd..34badd4 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -1,5 +1,7 @@ module( name = "platforms", - version = "0.0.6", # keep in sync with version.bzl + version = "0.0.8", # keep in sync with version.bzl compatibility_level = 1, ) + +bazel_dep(name = "rules_license", version = "0.0.3") @@ -1 +1,9 @@ workspace(name = "platforms") + +http_archive( + name = "rules_license", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.3/rules_license-0.0.3.tar.gz", + ], + # sha256 = "4865059254da674e3d18ab242e21c17f7e3e8c6b1f1421fffa4c5070f82e98b5", +) diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod new file mode 100644 index 0000000..59c0af4 --- /dev/null +++ b/WORKSPACE.bzlmod @@ -0,0 +1,4 @@ +# Include dependencies which are only needed for development here. +# +# Even if this is empty, you need it with bzlmod enable to prevent +# bzlmod from bringing in WORKSPACE too. |