Skip to content

Commit 3a809c9

Browse files
authored
Merge pull request #223 from salesforce/plaird/root_license
Add root level license via REPO.bazel
2 parents 4a86186 + 23b0fb0 commit 3a809c9

File tree

4 files changed

+31
-7
lines changed

4 files changed

+31
-7
lines changed

BUILD

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@
55
# For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
#
77

8+
load("@rules_license//rules:license.bzl", "license")
9+
810
exports_files([
911
"LICENSE.txt",
1012
])
13+
14+
# Using a package wide default ensure that all targets are associated with the
15+
# license.
16+
package(
17+
default_applicable_licenses = [":license"],
18+
default_visibility = ["//visibility:public"],
19+
)
20+
21+
license(
22+
name = "license",
23+
copyright_notice = "Copyright (c) 2017-2024, Salesforce",
24+
license_kinds = [
25+
"@rules_license//licenses/spdx:Apache-2.0",
26+
],
27+
license_text = "//:LICENSE.txt",
28+
package_name = "@rules_spring",
29+
package_url = "https://github.com/salesforce/rules_spring",
30+
package_version = "2.4.2",
31+
visibility = ["//visibility:public"],
32+
)

MODULE.bazel

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module(
77

88
bazel_dep(name = "rules_python", version = "0.40.0")
99

10+
# For Dupe Class checking support
1011
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
1112
python.toolchain(
1213
# This takes priority over captive python from //tools/python_interpreter unless extra toolchains are specified e.g.
@@ -15,11 +16,5 @@ python.toolchain(
1516
python_version = "3.11",
1617
)
1718

19+
# For License support
1820
bazel_dep(name = "rules_license", version = "1.0.0")
19-
# Thank you Chuck Grindel
20-
# Bug fix for https://github.com/bazelbuild/rules_license/pull/161#issuecomment-2525346894
21-
git_override(
22-
module_name = "rules_license",
23-
remote = "https://github.com/cgrindel/rules_license.git",
24-
commit="ed5bb2515c7e57ef48e361cc4977b54a25002d71",
25-
)

MODULE.bazel.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

REPO.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
repo(
2+
default_package_metadata = ["//:license"],
3+
)

0 commit comments

Comments
 (0)