Skip to content

Commit

Permalink
Merge pull request #223 from salesforce/plaird/root_license
Browse files Browse the repository at this point in the history
Add root level license via REPO.bazel
  • Loading branch information
plaird authored Dec 8, 2024
2 parents 4a86186 + 23b0fb0 commit 3a809c9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
22 changes: 22 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@
# For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
#

load("@rules_license//rules:license.bzl", "license")

exports_files([
"LICENSE.txt",
])

# Using a package wide default ensure that all targets are associated with the
# license.
package(
default_applicable_licenses = [":license"],
default_visibility = ["//visibility:public"],
)

license(
name = "license",
copyright_notice = "Copyright (c) 2017-2024, Salesforce",
license_kinds = [
"@rules_license//licenses/spdx:Apache-2.0",
],
license_text = "//:LICENSE.txt",
package_name = "@rules_spring",
package_url = "https://github.com/salesforce/rules_spring",
package_version = "2.4.2",
visibility = ["//visibility:public"],
)
9 changes: 2 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module(

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

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

# For License support
bazel_dep(name = "rules_license", version = "1.0.0")
# Thank you Chuck Grindel
# Bug fix for https://github.com/bazelbuild/rules_license/pull/161#issuecomment-2525346894
git_override(
module_name = "rules_license",
remote = "https://github.com/cgrindel/rules_license.git",
commit="ed5bb2515c7e57ef48e361cc4977b54a25002d71",
)
4 changes: 4 additions & 0 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions REPO.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
repo(
default_package_metadata = ["//:license"],
)

0 comments on commit 3a809c9

Please sign in to comment.