Skip to content
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

Ensure android-kotlin sandwich targets are treated as android modules during lint analysis #153

Closed
Closed
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
4 changes: 3 additions & 1 deletion rules/android/lint/lint_aspect.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ def _lint_aspect_impl(target, ctx):
# Current target info
rule_kind = ctx.rule.kind
kotlin = rule_kind == "kt_jvm_library"
android = rule_kind == "android_library" or rule_kind == "android_binary"

#TODO(arun) Remove name based detection and inject value into lint_sources from macro and read it later
android = rule_kind == "android_library" or rule_kind == "android_binary" or (kotlin and target.label.name.endswith("_kt"))
library = rule_kind != "android_binary"

enabled = LINT_ENABLED in ctx.rule.attr.tags and (android or kotlin)
Expand Down
Loading