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

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

Issue 238253015: Finalize apk takes zipalign path as argument instead of hardcoding it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Put a condition to set the zipalign path to be empty for webview Created 6 years, 8 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/finalize_apk_action.gypi ('k') | no next file » | 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 9759097d187218e21a5c27dc4b6bfe0dee07610f..d64e10d0f57cba2a7b9185c2d58e53cd46751014 100755
--- a/build/android/gyp/finalize_apk.py
+++ b/build/android/gyp/finalize_apk.py
@@ -8,7 +8,6 @@
"""
import optparse
-import os
import shutil
import sys
import tempfile
@@ -29,9 +28,9 @@ def SignApk(key_path, key_name, key_passwd, unsigned_path, signed_path):
build_utils.CheckOutput(sign_cmd)
-def AlignApk(android_sdk_root, unaligned_path, final_path):
+def AlignApk(zipalign_path, unaligned_path, final_path):
align_cmd = [
- os.path.join(android_sdk_root, 'tools', 'zipalign'),
+ zipalign_path,
'-f', '4', # 4 bytes
unaligned_path,
final_path,
@@ -42,7 +41,7 @@ def AlignApk(android_sdk_root, unaligned_path, final_path):
def main():
parser = optparse.OptionParser()
- parser.add_option('--android-sdk-root', help='Android sdk root directory.')
+ parser.add_option('--zipalign-path', help='Path to the zipalign tool.')
parser.add_option('--unsigned-apk-path', help='Path to input unsigned APK.')
parser.add_option('--final-apk-path',
help='Path to output signed and aligned APK.')
@@ -57,7 +56,7 @@ def main():
signed_apk_path = intermediate_file.name
SignApk(options.key_path, options.key_name, options.key_passwd,
options.unsigned_apk_path, signed_apk_path)
- AlignApk(options.android_sdk_root, signed_apk_path, options.final_apk_path)
+ AlignApk(options.zipalign_path, signed_apk_path, options.final_apk_path)
if options.stamp:
build_utils.Touch(options.stamp)
« no previous file with comments | « build/android/finalize_apk_action.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698