Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Issue 1870073002: Properly set up classpath for Android Lint (and fix its stderr filter) (Closed)

Created:
4 years, 8 months ago by mlopatkin
Modified:
4 years, 8 months ago
Reviewers:
jbudorick, agrieve
CC:
chromium-reviews, jbudorick+watch_chromium.org, mikecase+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Properly set up classpath for Android Lint (and fix its stderr filter) Lint's stderr filter actually was dropping all output of the tool instead of just single 'Picking up _JAVA_OPTIONS' line. Fixing this revealed a lot of internal lint errors. Most of them were CRC errors from interface JARs, so I switched back to use normal JARs. Others were internal errors of InvalidPackageName check which was trying to check Android SDK classes, because these classes were added to classpath as a jar. It turns out that Lint treats SDK jar differently but only if it is properly specified. The only way to tell Lint which SDK jar to use is to create project.properties file (like in old Ant-based build). So lint.py now accepts SDK version as a command-line argument and creates dummy project.properties in temporary folder. BUG=599052 Committed: https://crrev.com/ef5e20f9fe84651ca03fb53ed15910121cedfc0a Cr-Commit-Position: refs/heads/master@{#386188}

Patch Set 1 #

Total comments: 7

Patch Set 2 : Skip --android-sdk-version for GYP build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -10 lines) Patch
M build/android/android_lint_cache.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M build/android/gyp/lint.py View 1 7 chunks +24 lines, -8 lines 0 comments Download
M build/config/android/internal_rules.gni View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (9 generated)
mlopatkin
Please take a look. This is Lint fix, as a promised in https://codereview.chromium.org/1828693002 I cannot ...
4 years, 8 months ago (2016-04-08 10:37:34 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870073002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870073002/1
4 years, 8 months ago (2016-04-08 13:30:15 UTC) #5
agrieve
https://codereview.chromium.org/1870073002/diff/1/build/android/gyp/lint.py File build/android/gyp/lint.py (right): https://codereview.chromium.org/1870073002/diff/1/build/android/gyp/lint.py#newcode159 build/android/gyp/lint.py:159: r'^.*_JAVA_OPTIONS.*\n', '', l, flags=re.MULTILINE) nit: I don't think you ...
4 years, 8 months ago (2016-04-08 13:40:29 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/50764)
4 years, 8 months ago (2016-04-08 13:45:02 UTC) #8
agrieve
https://codereview.chromium.org/1870073002/diff/1/build/android/lint_action.gypi File build/android/lint_action.gypi (right): https://codereview.chromium.org/1870073002/diff/1/build/android/lint_action.gypi#newcode40 build/android/lint_action.gypi:40: '--android-sdk-version=<(android_sdk_version)', Since at the moment lint warnings fail GYP ...
4 years, 8 months ago (2016-04-08 15:16:12 UTC) #9
mlopatkin
https://codereview.chromium.org/1870073002/diff/1/build/android/gyp/lint.py File build/android/gyp/lint.py (right): https://codereview.chromium.org/1870073002/diff/1/build/android/gyp/lint.py#newcode159 build/android/gyp/lint.py:159: r'^.*_JAVA_OPTIONS.*\n', '', l, flags=re.MULTILINE) On 2016/04/08 13:40:29, agrieve wrote: ...
4 years, 8 months ago (2016-04-08 16:55:16 UTC) #10
agrieve
lgtm. Thanks for fixing this up! https://codereview.chromium.org/1870073002/diff/1/build/android/gyp/lint.py File build/android/gyp/lint.py (right): https://codereview.chromium.org/1870073002/diff/1/build/android/gyp/lint.py#newcode159 build/android/gyp/lint.py:159: r'^.*_JAVA_OPTIONS.*\n', '', l, ...
4 years, 8 months ago (2016-04-08 17:26:50 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870073002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870073002/20001
4 years, 8 months ago (2016-04-08 19:01:45 UTC) #13
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-08 20:10:43 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870073002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870073002/20001
4 years, 8 months ago (2016-04-08 20:21:28 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-08 20:26:59 UTC) #19
commit-bot: I haz the power
4 years, 8 months ago (2016-04-08 20:28:19 UTC) #21
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ef5e20f9fe84651ca03fb53ed15910121cedfc0a
Cr-Commit-Position: refs/heads/master@{#386188}

Powered by Google App Engine
This is Rietveld 408576698