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

Unified Diff: build/android/gyp/process_resources.py

Issue 570033002: Fix handling of resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-openmax-dl
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/gyp/write_build_config.py » ('j') | build/android/gyp/write_build_config.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/process_resources.py
diff --git a/build/android/gyp/process_resources.py b/build/android/gyp/process_resources.py
index a31d00072812f43680894fa343f2d315ce933c71..fd3206437d8584d768e876e49c2f88ad5027f145 100755
--- a/build/android/gyp/process_resources.py
+++ b/build/android/gyp/process_resources.py
@@ -64,6 +64,8 @@ def ParseArgs(args):
parser.add_option(
'--extra-res-packages',
help='Additional package names to generate R.java files for')
+ # TODO(cjhopman): Actually use --extra-r-text-files. We currently include all
+ # the resources in all R.java files for a particular apk.
parser.add_option(
'--extra-r-text-files',
help='For each additional package, the R.txt file should contain a '
@@ -99,12 +101,7 @@ def ParseArgs(args):
return options
-def CreateExtraRJavaFiles(
- r_dir, extra_packages, extra_r_text_files):
- if len(extra_packages) != len(extra_r_text_files):
- raise Exception('--extra-res-packages and --extra-r-text-files'
- 'should have the same length')
-
+def CreateExtraRJavaFiles(r_dir, extra_packages):
java_files = build_utils.FindInDirectory(r_dir, "R.java")
if len(java_files) != 1:
return
@@ -236,8 +233,7 @@ def main():
if options.extra_res_packages:
CreateExtraRJavaFiles(
gen_dir,
- build_utils.ParseGypList(options.extra_res_packages),
- build_utils.ParseGypList(options.extra_r_text_files))
+ build_utils.ParseGypList(options.extra_res_packages))
# This is the list of directories with resources to put in the final .zip
# file. The order of these is important so that crunched/v14 resources
« no previous file with comments | « no previous file | build/android/gyp/write_build_config.py » ('j') | build/android/gyp/write_build_config.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698