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

Issue 11363150: Support Java resources within content and chrome (Closed)

Created:
8 years, 1 month ago by newt (away)
Modified:
8 years, 1 month ago
CC:
chromium-reviews, jam, joi+watch-content_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, darin-cc_chromium.org, peter+watch_chromium.org, ilevy+watch_chromium.org
Visibility:
Public.

Description

Support Java resources within content. This provides support for android-style resource folders in content and other non-apk Java targets. The AppResource hack can then be removed shortly. Details: while building a non-apk target (e.g. chromium_content.jar), we generate an R.java file with non-final constants and in the appropriate Java package (e.g. org.chromium.content.R) using the resources in the target (e.g. content/public/android/java/res). This R.java is used to produce the jar, but is not included in the jar itself. When we later build an apk, we merge the resources from the apk (e.g. org/chromium/content_shell/res) with the resources from the non-apk targets it depends on (e.g. content/public/android/java/res). A new R.java is generated using the merged resources with the correct mapping from resources to integer IDs. This R.java file is copied into each needed package (e.g. org.chromium.content.R and org.chromium.content_shell.R) and included in the apk. This is the first of three CLs to replace AppResource with R: 1. http://codereview.chromium.org/11363150 - Support Java resources within content 2. http://codereview.chromium.org/11360207 - Add Java resources to content and chrome 3. http://codereview.chromium.org/11377117 - Remove AppResource and unneeded resources BUG=136704 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=168283

Patch Set 1 #

Total comments: 14

Patch Set 2 : don't include R.java files twice in test apks #

Total comments: 3

Patch Set 3 : fix indentation, speling #

Patch Set 4 : use dummy manifest and --custom-package flag with aapt #

Patch Set 5 : provide access to resources of dependencies #

Patch Set 6 : provide access to resources of dependencies (take 2) #

Total comments: 3

Patch Set 7 : #

Patch Set 8 : don't start referencing resources with R yet #

Patch Set 9 : support resources in chrome, too #

Patch Set 10 : moved conditions block #

Patch Set 11 : exclude generated files from findbugs #

Patch Set 12 : remove obsolete findbugs warnings #

Total comments: 2

Patch Set 13 : rebase #

Patch Set 14 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -45 lines) Patch
M android_webview/android_webview_tests.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
A build/android/AndroidManifest.xml View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M build/android/ant/chromium-apk.xml View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
M build/android/ant/chromium-jars.xml View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M build/android/findbugs_filter/findbugs_exclude.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -0 lines 0 comments Download
M build/android/findbugs_filter/findbugs_known_bugs.txt View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -32 lines 0 comments Download
M build/java.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +65 lines, -2 lines 0 comments Download
M build/java_apk.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +18 lines, -2 lines 0 comments Download
A + chrome/android/java/res/values/strings.xml View 1 2 3 4 5 6 7 8 1 chunk +1 line, -4 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/content.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
A + content/public/android/java/res/values/strings.xml View 1 2 3 4 5 6 7 8 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
newt (away)
8 years, 1 month ago (2012-11-08 22:24:38 UTC) #1
benm (inactive)
http://codereview.chromium.org/11363150/diff/1/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java File content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java (right): http://codereview.chromium.org/11363150/diff/1/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java#newcode124 content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java:124: sOverlayDrawable = context.getResources().getDrawable(R.drawable.ondemand_overlay); I don't think that this will ...
8 years, 1 month ago (2012-11-09 11:05:10 UTC) #2
benm (inactive)
https://codereview.chromium.org/11363150/diff/1/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java File content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java (left): https://codereview.chromium.org/11363150/diff/1/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java#oldcode124 content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java:124: AppResource.DRAWABLE_LINK_PREVIEW_POPUP_OVERLAY); Should there be a diff in AppResource.java to ...
8 years, 1 month ago (2012-11-09 16:20:00 UTC) #3
newt (away)
https://codereview.chromium.org/11363150/diff/1/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java File content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java (left): https://codereview.chromium.org/11363150/diff/1/content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java#oldcode124 content/public/android/java/src/org/chromium/content/browser/PopupZoomer.java:124: AppResource.DRAWABLE_LINK_PREVIEW_POPUP_OVERLAY); On 2012/11/09 16:20:00, benm wrote: > Should there ...
8 years, 1 month ago (2012-11-09 21:37:44 UTC) #4
cjhopman
https://codereview.chromium.org/11363150/diff/1/build/android/ant/chromium-apk.xml File build/android/ant/chromium-apk.xml (right): https://codereview.chromium.org/11363150/diff/1/build/android/ant/chromium-apk.xml#newcode37 build/android/ant/chromium-apk.xml:37: semicolon-delimited while ADDITION_RES_PACKAGES is space-delimited, hence ADDITION_RES_PACKAGES is misspelled. ...
8 years, 1 month ago (2012-11-09 22:21:30 UTC) #5
newt (away)
https://codereview.chromium.org/11363150/diff/1/build/android/ant/chromium-apk.xml File build/android/ant/chromium-apk.xml (right): https://codereview.chromium.org/11363150/diff/1/build/android/ant/chromium-apk.xml#newcode37 build/android/ant/chromium-apk.xml:37: semicolon-delimited while ADDITION_RES_PACKAGES is space-delimited, hence On 2012/11/09 22:21:30, ...
8 years, 1 month ago (2012-11-09 23:05:35 UTC) #6
cjhopman
https://codereview.chromium.org/11363150/diff/2004/content/public/android/java/AndroidManifest.xml File content/public/android/java/AndroidManifest.xml (right): https://codereview.chromium.org/11363150/diff/2004/content/public/android/java/AndroidManifest.xml#newcode10 content/public/android/java/AndroidManifest.xml:10: package="org.chromium.content"> On 2012/11/09 23:05:35, newt wrote: > On 2012/11/09 ...
8 years, 1 month ago (2012-11-12 16:47:32 UTC) #7
cjhopman
http://codereview.chromium.org/11363150/diff/6004/build/java.gypi File build/java.gypi (right): http://codereview.chromium.org/11363150/diff/6004/build/java.gypi#newcode99 build/java.gypi:99: 'conditions': [ I think this block should go before ...
8 years, 1 month ago (2012-11-14 00:34:41 UTC) #8
newt (away)
http://codereview.chromium.org/11363150/diff/6004/build/java.gypi File build/java.gypi (right): http://codereview.chromium.org/11363150/diff/6004/build/java.gypi#newcode99 build/java.gypi:99: 'conditions': [ On 2012/11/14 00:34:41, cjhopman wrote: > I ...
8 years, 1 month ago (2012-11-14 03:28:50 UTC) #9
cjhopman
lgtm either with the conditions block moved or not http://codereview.chromium.org/11363150/diff/6004/build/java.gypi File build/java.gypi (right): http://codereview.chromium.org/11363150/diff/6004/build/java.gypi#newcode99 build/java.gypi:99: ...
8 years, 1 month ago (2012-11-14 21:16:19 UTC) #10
newt (away)
http://codereview.chromium.org/11363150/diff/13006/chrome/android/java/res/values/strings.xml File chrome/android/java/res/values/strings.xml (right): http://codereview.chromium.org/11363150/diff/13006/chrome/android/java/res/values/strings.xml#newcode8 chrome/android/java/res/values/strings.xml:8: <resources> this empty file forces git to create the ...
8 years, 1 month ago (2012-11-15 00:25:40 UTC) #11
newt (away)
Primary reviewers: +benm +cjhopman Secondary reviewers: +thakis for chrome changes +piman for content changes +nileshagrawal ...
8 years, 1 month ago (2012-11-15 00:55:45 UTC) #12
newt (away)
Primary reviewers: +benm +cjhopman Secondary reviewers: +thakis for chrome changes +piman for content changes +nileshagrawal ...
8 years, 1 month ago (2012-11-15 00:56:34 UTC) #13
benm (inactive)
The motivation for this change and the associated patches lg2m, but I don't feel qualified ...
8 years, 1 month ago (2012-11-15 15:26:02 UTC) #14
Nico
I'm not qualified to review the ant bits, but it looks like cjhopman did that ...
8 years, 1 month ago (2012-11-15 17:43:32 UTC) #15
nilesh
> +nileshagrawal for chrome/android and content/public/android changes LGTM for chrome/android and content/public/android
8 years, 1 month ago (2012-11-15 17:49:24 UTC) #16
benm (inactive)
android_webview lgtm
8 years, 1 month ago (2012-11-15 18:28:29 UTC) #17
newt (away)
On 2012/11/15 17:43:32, Nico wrote: > I'm not qualified to review the ant bits, but ...
8 years, 1 month ago (2012-11-15 21:13:49 UTC) #18
Nico
On 2012/11/15 21:13:49, newt wrote: > On 2012/11/15 17:43:32, Nico wrote: > > I'm not ...
8 years, 1 month ago (2012-11-15 21:18:37 UTC) #19
newt (away)
+jam for content changes (looks like piman is OOO)
8 years, 1 month ago (2012-11-15 22:33:50 UTC) #20
jam
lgtm
8 years, 1 month ago (2012-11-15 23:01:00 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/newt@chromium.org/11363150/13006
8 years, 1 month ago (2012-11-15 23:04:15 UTC) #22
newt (away)
On 2012/11/15 21:18:37, Nico wrote: > On 2012/11/15 21:13:49, newt wrote: > > On 2012/11/15 ...
8 years, 1 month ago (2012-11-16 00:33:20 UTC) #23
Nico
Looks great, thanks! On Nov 15, 2012 4:33 PM, <newt@chromium.org> wrote: > On 2012/11/15 21:18:37, ...
8 years, 1 month ago (2012-11-16 00:36:47 UTC) #24
commit-bot: I haz the power
Retried try job too often for step(s) browser_tests
8 years, 1 month ago (2012-11-16 05:09:35 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/newt@chromium.org/11363150/13006
8 years, 1 month ago (2012-11-16 19:07:52 UTC) #26
commit-bot: I haz the power
Failed to apply patch for build/java_apk.gypi: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
8 years, 1 month ago (2012-11-16 19:08:00 UTC) #27
commit-bot: I haz the power
8 years, 1 month ago (2012-11-16 20:32:25 UTC) #28

Powered by Google App Engine
This is Rietveld 408576698