diff options
author | newt@chromium.org <newt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-16 20:39:20 +0000 |
---|---|---|
committer | newt@chromium.org <newt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-16 20:39:20 +0000 |
commit | 3ac50367e1d974176aba1b4e6d9d81e73e3d7280 (patch) | |
tree | 694ee46c9ce650184778806d47986ad111811395 /content/content.gyp | |
parent | e13284d0688fd1113c9e8cd51304df3b81d2b395 (diff) | |
download | chromium_src-3ac50367e1d974176aba1b4e6d9d81e73e3d7280.zip chromium_src-3ac50367e1d974176aba1b4e6d9d81e73e3d7280.tar.gz chromium_src-3ac50367e1d974176aba1b4e6d9d81e73e3d7280.tar.bz2 |
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
Review URL: https://codereview.chromium.org/11363150
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/content.gyp')
-rw-r--r-- | content/content.gyp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/content/content.gyp b/content/content.gyp index a0d3877..8531178 100644 --- a/content/content.gyp +++ b/content/content.gyp @@ -291,6 +291,9 @@ 'variables': { 'package_name': 'content', 'java_in_dir': '../content/public/android/java', + 'has_java_resources': 1, + 'R_package': 'org.chromium.content', + 'R_package_relpath': 'org/chromium/content', }, 'includes': [ '../build/java.gypi' ], }, |