Skip to content

Add root level license via REPO.bazel #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"],
)