Index: build/android/gyp/write_build_config.py |
diff --git a/build/android/gyp/write_build_config.py b/build/android/gyp/write_build_config.py |
index 1b4379d3b97eb2e1e40780d41584f0953684f345..0f3bfadd8ab0408d08a70032ea7a3dfcbdb71c33 100755 |
--- a/build/android/gyp/write_build_config.py |
+++ b/build/android/gyp/write_build_config.py |
@@ -100,6 +100,7 @@ def main(argv): |
# android_resources options |
parser.add_option('--srcjar', help='Path to target\'s resources srcjar.') |
parser.add_option('--resources-zip', help='Path to target\'s resources zip.') |
+ parser.add_option('--r-text', help='Path to target\'s R.txt file.') |
parser.add_option('--package-name', |
help='Java package name for these resources.') |
parser.add_option('--android-manifest', help='Path to android manifest.') |
@@ -237,18 +238,26 @@ def main(argv): |
deps_info['resources_zip'] = options.resources_zip |
if options.srcjar: |
deps_info['srcjar'] = options.srcjar |
+ if options.android_manifest: |
+ manifest = AndroidManifest(options.android_manifest) |
+ deps_info['package_name'] = manifest.GetPackageName() |
if options.package_name: |
deps_info['package_name'] = options.package_name |
+ if options.r_text: |
+ deps_info['r_text'] = options.r_text |
if options.type == 'android_resources' or options.type == 'android_apk': |
config['resources'] = {} |
config['resources']['dependency_zips'] = [ |
c['resources_zip'] for c in all_resources_deps] |
config['resources']['extra_package_names'] = [] |
+ config['resources']['extra_r_text_files'] = [] |
if options.type == 'android_apk': |
config['resources']['extra_package_names'] = [ |
c['package_name'] for c in all_resources_deps if 'package_name' in c] |
+ config['resources']['extra_r_text_files'] = [ |
+ c['r_text'] for c in all_resources_deps if 'r_text' in c] |
if options.type in ['android_apk', 'deps_dex']: |
deps_dex_files = [c['dex_path'] for c in all_library_deps] |