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

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

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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 | « build/android/gyp/create_test_runner_script.py ('k') | build/android/gyp/finalize_splits.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/finalize_apk.py
diff --git a/build/android/gyp/finalize_apk.py b/build/android/gyp/finalize_apk.py
index 5416008189492fa6666a62cd1f223562117aba14..0a8003508b505213b175cad9730611f7a53ff636 100755
--- a/build/android/gyp/finalize_apk.py
+++ b/build/android/gyp/finalize_apk.py
@@ -79,17 +79,28 @@ def main():
parser.add_option('--key-passwd', help='Keystore password')
parser.add_option('--key-name', help='Keystore name')
parser.add_option('--stamp', help='Path to touch on success.')
- parser.add_option('--load-library-from-zip-file', type='int',
+ parser.add_option('--load-library-from-zip', type='int',
help='If non-zero, build the APK such that the library can be loaded ' +
'directly from the zip file using the crazy linker. The library ' +
'will be renamed, uncompressed and page aligned.')
options, _ = parser.parse_args()
+ FinalizeApk(options)
+
+ if options.depfile:
+ build_utils.WriteDepfile(
+ options.depfile, build_utils.GetPythonDependencies())
+
+ if options.stamp:
+ build_utils.Touch(options.stamp)
+
+
+def FinalizeApk(options):
with tempfile.NamedTemporaryFile() as signed_apk_path_tmp, \
tempfile.NamedTemporaryFile() as apk_to_sign_tmp:
- if options.load_library_from_zip_file:
+ if options.load_library_from_zip:
# We alter the name of the library so that the Android Package Manager
# does not extract it into a separate file. This must be done before
# signing, as the filename is part of the signed manifest. At the same
@@ -106,7 +117,7 @@ def main():
JarSigner(options.key_path, options.key_name, options.key_passwd,
apk_to_sign, signed_apk_path)
- if options.load_library_from_zip_file:
+ if options.load_library_from_zip:
# Reorder the contents of the APK. This re-establishes the canonical
# order which means the library will be back at its page aligned location.
# This step also aligns uncompressed items to 4 bytes.
@@ -116,13 +127,6 @@ def main():
# Align uncompressed items to 4 bytes
AlignApk(options.zipalign_path, signed_apk_path, options.final_apk_path)
- if options.depfile:
- build_utils.WriteDepfile(
- options.depfile, build_utils.GetPythonDependencies())
-
- if options.stamp:
- build_utils.Touch(options.stamp)
-
if __name__ == '__main__':
sys.exit(main())
« no previous file with comments | « build/android/gyp/create_test_runner_script.py ('k') | build/android/gyp/finalize_splits.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698