rules_jvm_external icon indicating copy to clipboard operation
rules_jvm_external copied to clipboard

WIP: License lookup - a better version

Open aiuto opened this issue 2 years ago • 1 comments

This is a backwards compatible approach. It is so ugly it is delicious.

We start with a fallback license_lookup, implemented in rules_jvm_external. If you do nothing else you get that, so no license information is added.

If you want to override that with your own method:

  • implement //:license_classifier.bzl%lookup_license in a repository of your choosing. It could be a local one.
  • load that repository before rules_jvm_external.
  • load rules_jvm_external with a patch_cmd that points to your classifier repo.
local_repository(
  name = "my_compliance",
  path = "compliance",
)

http_archive(
    name = "rules_jvm_external",
    urls = ["file:///tmp/rje.tar"],
    patch_cmds = [
      "./use_license_classifier.sh my_compliance",
    ]
)

Note that the patch command is actually implemented in rules_jvm_external, so you don't have to write your own.

aiuto avatar Apr 28 '22 20:04 aiuto

cc: @danielmachlab I like this one better than the other PR.

aiuto avatar Apr 28 '22 20:04 aiuto