aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules/apex/apex_deps_validation.bzl6
-rw-r--r--rules/license/license_aspect.bzl2
2 files changed, 7 insertions, 1 deletions
diff --git a/rules/apex/apex_deps_validation.bzl b/rules/apex/apex_deps_validation.bzl
index 4d5e39de..f69b30e3 100644
--- a/rules/apex/apex_deps_validation.bzl
+++ b/rules/apex/apex_deps_validation.bzl
@@ -75,6 +75,9 @@ _IGNORED_ATTRS = [
"androidmk_dynamic_deps",
"androidmk_deps",
]
+_IGNORED_TARGETS = [
+ "default_metadata_file",
+]
def _should_skip_apex_dep(target, ctx):
# Ignore Bazel-specific targets like platform/os/arch constraints,
@@ -85,7 +88,8 @@ def _should_skip_apex_dep(target, ctx):
ctx.label.workspace_name in _IGNORED_REPOSITORIES or
ctx.label.package in _IGNORED_PACKAGES or
ctx.rule.kind in _IGNORED_RULE_KINDS or
- True in [p in target for p in _IGNORED_PROVIDERS]
+ True in [p in target for p in _IGNORED_PROVIDERS] or
+ target.label.name in _IGNORED_TARGETS
)
def _apex_dep_validation_aspect_impl(target, ctx):
diff --git a/rules/license/license_aspect.bzl b/rules/license/license_aspect.bzl
index 1b6d27d5..2302137b 100644
--- a/rules/license/license_aspect.bzl
+++ b/rules/license/license_aspect.bzl
@@ -87,6 +87,8 @@ def license_map(deps):
license_by_label = dict()
licensees = dict()
for lic in depset(transitive = transitive_licenses).to_list():
+ if not LicenseInfo in lic:
+ continue
label = lic[LicenseInfo].label.name
if not label in license_by_label:
license_by_label[label] = lic