Commit Graph

5 Commits

Author SHA1 Message Date
Colin Cross 8a6ed3750d Support lint on unbundled builds
Use prebuilts of the annotations.zip and api-versions.xml files
when running lint in an unbundled build.

Test: m TARGET_BUILD_APPS=Gallery2 lint-check
Change-Id: Idacf3758a2769678a635941486183673e95b43f8
2020-07-10 19:30:32 -07:00
Colin Cross c31efeb25c Set root dir in lint project.xml
Set the root dir in the project.xml for lint so that the paths in the
lint report are relative to the top of the tree instead of relative
to the project.xml.

Bug: 153485543
Test: run lint
Change-Id: Ie163a4dadd976e708f798855de73e58084931a91
2020-06-23 10:27:05 -07:00
Colin Cross 977b6a822d Set ANDROID_SDK_HOME when running lint
Lint tries to create ~/.android, set ANDROID_SDK_HOME to keep it
from attempting to write to the home directory, which may not be
writable.

Test: run lint
Bug: 159676171
Change-Id: I16375b88d309a8fa416b3a8efeabe15759889ae3
2020-06-23 10:25:03 -07:00
Colin Cross 92e4b46af5 Support adding extra lint checks
Add a lint.extra_check_modules property to list modules to use as
plugins to Lint.

Bug: 153485543
Test: m checkbuild
Change-Id: I25c7799438cfec43163e757637c65b8657488d36
2020-06-18 15:58:32 -07:00
Colin Cross 014489c1e6 Add support for running Android lint on java and android modules.
Add a rule that runs Android lint on each java and android module
and produces reports in xml, html and text formats.

Bug: 153485543
Test: m out/soong/.intermediates/packages/apps/Settings/Settings-core/android_common/lint-report.html
Change-Id: I5a530975b73ba767fef45b257d4f9ec901a19fcb
2020-06-16 15:44:16 -07:00