From 8beffe0964bf281f850fb37f1736bd60d19260cd Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Fri, 16 Aug 2024 12:07:35 +0200 Subject: [PATCH] bazel: Attach license metadata to the main repo --- BUILD.bazel | 8 ++++++++ MODULE.bazel | 1 + REPO.bazel | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 REPO.bazel diff --git a/BUILD.bazel b/BUILD.bazel index d83edca2a..69df06a33 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,7 +1,15 @@ load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test") +load("@rules_license//rules:license.bzl", "license") load("@rules_pkg//:pkg.bzl", "pkg_tar") load("//bazel:compat.bzl", "SKIP_ON_WINDOWS") +license( + name = "license", + copyright_notice = "Copyright 2024 Code Intelligence GmbH", + license_text = "LICENSE", + visibility = ["//visibility:public"], +) + exports_files(["LICENSE"]) pkg_tar( diff --git a/MODULE.bazel b/MODULE.bazel index 1b092ba96..2bd6ee89e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -22,6 +22,7 @@ bazel_dep(name = "rules_java", version = "7.7.0") bazel_dep(name = "rules_jni", version = "0.9.1") bazel_dep(name = "rules_jvm_external", version = "6.2") bazel_dep(name = "rules_kotlin", version = "1.9.5") +bazel_dep(name = "rules_license", version = "0.0.8") bazel_dep(name = "rules_pkg", version = "0.9.1") bazel_dep(name = "toolchains_llvm", version = "0.10.3") diff --git a/REPO.bazel b/REPO.bazel new file mode 100644 index 000000000..dba66ecb9 --- /dev/null +++ b/REPO.bazel @@ -0,0 +1,3 @@ +# Applies to all packages in the Jazzer main repository, but not to external repositories. +# Override on a per-package basis via `package(default_applicable_licenses = [...])` if necessary. +repo(default_applicable_licenses = ["//:license"])