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

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

Issue 1140763002: Extract package_resources step into a .gypi & make assets & resource zips optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@apkbuilder
Patch Set: rebased Created 5 years, 7 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/package_resources_action.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/package_resources.py
diff --git a/build/android/gyp/package_resources.py b/build/android/gyp/package_resources.py
index 2251de00c89178e176478469dee313527e145ff1..53937664c8b8de02e44bed4aba8fa29f3f3ddc25 100755
--- a/build/android/gyp/package_resources.py
+++ b/build/android/gyp/package_resources.py
@@ -60,7 +60,7 @@ def ParseArgs():
# Check that required options have been provided.
required_options = ('android_sdk', 'android_sdk_tools', 'configuration_name',
'android_manifest', 'version_code', 'version_name',
- 'resource_zips', 'asset_dir', 'apk_path')
+ 'apk_path')
build_utils.CheckOptions(options, parser, required=required_options)
@@ -140,16 +140,17 @@ def main():
if options.shared_resources:
package_command.append('--shared-lib')
- if os.path.exists(options.asset_dir):
+ if options.asset_dir and os.path.exists(options.asset_dir):
package_command += ['-A', options.asset_dir]
- dep_zips = build_utils.ParseGypList(options.resource_zips)
- for z in dep_zips:
- subdir = os.path.join(temp_dir, os.path.basename(z))
- if os.path.exists(subdir):
- raise Exception('Resource zip name conflict: ' + os.path.basename(z))
- build_utils.ExtractAll(z, path=subdir)
- package_command += PackageArgsForExtractedZip(subdir)
+ if options.resource_zips:
+ dep_zips = build_utils.ParseGypList(options.resource_zips)
+ for z in dep_zips:
+ subdir = os.path.join(temp_dir, os.path.basename(z))
+ if os.path.exists(subdir):
+ raise Exception('Resource zip name conflict: ' + os.path.basename(z))
+ build_utils.ExtractAll(z, path=subdir)
+ package_command += PackageArgsForExtractedZip(subdir)
if 'Debug' in options.configuration_name:
package_command += ['--debug-mode']
« no previous file with comments | « no previous file | build/android/package_resources_action.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698