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

Issue 2062633002: [GN] Lint Android resources (Closed)

Created:
4 years, 6 months ago by mlopatkin
Modified:
4 years, 6 months ago
Reviewers:
jbudorick, agrieve, brettw
CC:
chromium-reviews, chromoting-reviews_chromium.org, nyquist+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, jam, marcinjb+watch-blimp_chromium.org, jessicag+watch-blimp_chromium.org, darin-cc_chromium.org, khushalsagar+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, jbudorick+watch_chromium.org, mlamouri+watch-content_chromium.org, Peter Beverloo, feature-media-reviews_chromium.org, mkwst+moarreviews-shell_chromium.org, jochen+watch_chromium.org, anandc+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, android-webview-reviews_chromium.org, mikecase+watch_chromium.org, dtrainor+watch-blimp_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[GN] Lint Android resources Lint is still run only within android_library/android_apk targets but resources folders and generated resources ZIPs from direct dependencies are added to this run. ZIPs are extracted to temporary folders during linting. This approach requires a big rewrite of existing dependencies. Before the patch every library that needs to reference something from R.java of the other library has to directly depend on the resource target that generates this R.java, for example chrome_java depended on ui_java_resources while also dependening on ui_java. This is the only way to get R.java from ui_java_resources in chrome_java. This causes Lint to lint ui_java_resources twice (within chrome_java and ui_java) and may produce false positives. This patch changes these R.java dependencies to transitives, so chrome_java only depends on ui_java and still gets all R.java from its resources. Only resources that are the part of the library/APK should be direct dependencies of this library otherwise Lint will not work properly. Resource folders/ZIPs are propagated to dependent libraries via build_config files. Each android_resources target publishes its resource folders in its build_config; it also writes list of resources_zips of direct dependencies which have no own package names - these are generated resources, conceptually part of the same target. Library/APK targets expose list of folders and ZIPs from dependencies via their own build_config which is read by Lint. BUG=595810 Committed: https://crrev.com/18749bd362a7a8b7f4c1185c838d724dea5fad85 Cr-Commit-Position: refs/heads/master@{#400727}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -37 lines) Patch
M android_webview/glue/glue.gni View 1 chunk +0 lines, -4 lines 0 comments Download
M blimp/client/BUILD.gn View 3 chunks +0 lines, -4 lines 0 comments Download
M build/android/gyp/lint.py View 8 chunks +44 lines, -13 lines 0 comments Download
M build/android/gyp/write_build_config.py View 3 chunks +37 lines, -1 line 0 comments Download
M build/config/android/internal_rules.gni View 2 chunks +7 lines, -0 lines 0 comments Download
M build/config/android/rules.gni View 1 chunk +1 line, -0 lines 1 comment Download
M chrome/android/BUILD.gn View 5 chunks +0 lines, -6 lines 0 comments Download
M chrome/test/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/android/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M components/web_contents_delegate_android/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M content/public/android/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M content/shell/android/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M remoting/android/BUILD.gn View 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/android_media/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M ui/android/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 23 (10 generated)
mlopatkin
Please take a look. I plan to add other owners to review later when we ...
4 years, 6 months ago (2016-06-11 18:15:16 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/2062633002/1
4 years, 6 months ago (2016-06-15 14:26:34 UTC) #5
agrieve
On 2016/06/15 14:26:34, commit-bot: I haz the power wrote: > Dry run: CQ is trying ...
4 years, 6 months ago (2016-06-15 14:31:25 UTC) #6
agrieve
brettw@chromium.org: Please rs BUILD.gn changes.
4 years, 6 months ago (2016-06-15 14:32:25 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-15 15:34:48 UTC) #10
brettw
lgtm https://codereview.chromium.org/2062633002/diff/1/build/config/android/rules.gni File build/config/android/rules.gni (right): https://codereview.chromium.org/2062633002/diff/1/build/config/android/rules.gni#newcode718 build/config/android/rules.gni:718: # app_as_shared_lib: If true make a resource package ...
4 years, 6 months ago (2016-06-15 19:22:01 UTC) #11
mlopatkin
On 2016/06/15 19:22:01, brettw wrote: > lgtm > > https://codereview.chromium.org/2062633002/diff/1/build/config/android/rules.gni > File build/config/android/rules.gni (right): > ...
4 years, 6 months ago (2016-06-16 11:51:44 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2062633002/1
4 years, 6 months ago (2016-06-20 14:07:44 UTC) #14
agrieve
On 2016/06/16 11:51:44, mlopatkin wrote: > On 2016/06/15 19:22:01, brettw wrote: > > lgtm > ...
4 years, 6 months ago (2016-06-20 14:08:02 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/230842)
4 years, 6 months ago (2016-06-20 15:23:07 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2062633002/1
4 years, 6 months ago (2016-06-20 17:43:44 UTC) #19
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 6 months ago (2016-06-20 18:14:01 UTC) #21
commit-bot: I haz the power
4 years, 6 months ago (2016-06-20 18:19:00 UTC) #23
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/18749bd362a7a8b7f4c1185c838d724dea5fad85
Cr-Commit-Position: refs/heads/master@{#400727}

Powered by Google App Engine
This is Rietveld 408576698