Skip to content

Commit

Permalink
[android lint] define project.properties rule (#949)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilramakrishnan committed Jul 28, 2021
1 parent 811f9de commit 16621cd
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ def okbuck_lint(

cmd += "export ANDROID_LINT_JARS=\"$PREBUILT_AAR_LINT_JARS{}\"; PROJECT_ROOT=`echo '{}' | sed 's|buck-out.*||'`; ".format(":".join([toLocation(custom_lint) for custom_lint in custom_lints]), toLocation(manifest))

# Create project.properties file so Android lint CLI jar respects our target SDK version when running lint.
target_sdk = native.read_config("android", "target")
cmd += "echo \"target={}\njava.compilerargs=-Xlint:all -Werror\" > \"`dirname {}`/project.properties\"; ".format(target_sdk, toLocation(manifest))

cmd += "CP_FILE=`mktemp`; "
if has_srcs:
cmd += "ORIGINAL_CP_FILE=`sed 's/@@//' <<< $(@@@(classpathMacro) :src_{})`; ".format(variant)
Expand Down

0 comments on commit 16621cd

Please sign in to comment.