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

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

Issue 2345143002: Move language pak files to assets. (Closed)
Patch Set: Move language pak files back to assets rather than res. Created 4 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
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 c17bfcb45906717c585940668da6dae9f34eb147..a21caf5040fcfa2ae9c4044bcb01a1bc17e6ee94 100755
--- a/build/android/gyp/write_build_config.py
+++ b/build/android/gyp/write_build_config.py
@@ -233,8 +233,6 @@ def main(argv):
parser.add_option('--package-name',
help='Java package name for these resources.')
parser.add_option('--android-manifest', help='Path to android manifest.')
- parser.add_option('--is-locale-resource', action='store_true',
- help='Whether it is locale resource.')
parser.add_option('--resource-dirs', action='append', default=[],
help='GYP-list of resource dirs')
@@ -246,6 +244,8 @@ def main(argv):
help='List of asset custom destinations.')
parser.add_option('--disable-asset-compression', action='store_true',
help='Whether to disable asset compression.')
+ parser.add_option('--is-locale-asset', action='store_true',
agrieve 2016/09/21 01:06:42 Idea: If we add the assets target directly to the
estevenson 2016/09/21 19:50:56 Done.
+ help='Whether it is a locale asset.')
# java library options
parser.add_option('--jar-path', help='Path to target\'s jar output.')
@@ -290,8 +290,8 @@ def main(argv):
help='GYP-list of proguard flag files to use in final apk.')
parser.add_option('--proguard-info',
help='Path to the proguard .info output for this apk.')
- parser.add_option('--has-alternative-locale-resource', action='store_true',
- help='Whether there is alternative-locale-resource in direct deps')
+ parser.add_option('--has-alternative-locale-asset', action='store_true',
+ help='Whether there is alternative-locale-asset in direct deps')
parser.add_option('--fail',
help='GYP-list of error message lines to fail with.')
@@ -339,17 +339,17 @@ def main(argv):
deps = Deps(direct_deps_config_paths)
all_inputs = deps.AllConfigPaths()
- # Remove other locale resources if there is alternative_locale_resource in
+ # Remove other locale assets if there is alternative_locale_asset in
# direct deps.
- if options.has_alternative_locale_resource:
- alternative = [r['path'] for r in deps.Direct('android_resources')
- if r.get('is_locale_resource')]
- # We can only have one locale resources in direct deps.
+ if options.has_alternative_locale_asset:
+ alternative = [r['path'] for r in deps.Direct('android_assets')
+ if r.get('is_locale_asset')]
+ # We can only have one locale assets in direct deps.
if len(alternative) != 1:
- raise Exception('The number of locale resource in direct deps is wrong %d'
+ raise Exception('The number of locale assets in direct deps is wrong %d'
% len(alternative))
- unwanted = [r['path'] for r in deps.All('android_resources')
- if r.get('is_locale_resource') and r['path'] not in alternative]
+ unwanted = [r['path'] for r in deps.All('android_assets')
+ if r.get('is_locale_asset') and r['path'] not in alternative]
for p in unwanted:
deps.RemoveNonDirectDep(p)
@@ -473,6 +473,8 @@ def main(argv):
build_utils.ParseGnList(options.asset_renaming_destinations))
if options.disable_asset_compression:
deps_info['assets']['disable_compression'] = True
+ if options.is_locale_asset:
+ deps_info['is_locale_asset'] = True
if options.type == 'android_resources':
deps_info['resources_zip'] = options.resources_zip
@@ -485,8 +487,6 @@ def main(argv):
deps_info['package_name'] = options.package_name
if options.r_text:
deps_info['r_text'] = options.r_text
- if options.is_locale_resource:
- deps_info['is_locale_resource'] = True
deps_info['resources_dirs'] = []
if options.resource_dirs:

Powered by Google App Engine
This is Rietveld 408576698