DescriptionSupport 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 #
Messages
Total messages: 28 (0 generated)
|