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

Side by Side Diff: build/android/gyp/finalize_apk.py

Issue 383613002: Make android_apk template actually create an apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-apk-dex
Patch Set: Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « build/android/gyp/ant.py ('k') | build/android/gyp/package_resources.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 """Signs and zipaligns APK. 6 """Signs and zipaligns APK.
7 7
8 """ 8 """
9 9
10 import optparse 10 import optparse
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 rezip_path, 63 rezip_path,
64 'dropdescriptors', 64 'dropdescriptors',
65 in_zip_file, 65 in_zip_file,
66 out_zip_file, 66 out_zip_file,
67 ] 67 ]
68 build_utils.CheckOutput(rename_cmd) 68 build_utils.CheckOutput(rename_cmd)
69 69
70 70
71 def main(): 71 def main():
72 parser = optparse.OptionParser() 72 parser = optparse.OptionParser()
73 build_utils.AddDepfileOption(parser)
73 74
74 parser.add_option('--zipalign-path', help='Path to the zipalign tool.') 75 parser.add_option('--zipalign-path', help='Path to the zipalign tool.')
75 parser.add_option('--rezip-path', help='Path to the rezip executable.') 76 parser.add_option('--rezip-path', help='Path to the rezip executable.')
76 parser.add_option('--unsigned-apk-path', help='Path to input unsigned APK.') 77 parser.add_option('--unsigned-apk-path', help='Path to input unsigned APK.')
77 parser.add_option('--final-apk-path', 78 parser.add_option('--final-apk-path',
78 help='Path to output signed and aligned APK.') 79 help='Path to output signed and aligned APK.')
79 parser.add_option('--key-path', help='Path to keystore for signing.') 80 parser.add_option('--key-path', help='Path to keystore for signing.')
80 parser.add_option('--key-passwd', help='Keystore password') 81 parser.add_option('--key-passwd', help='Keystore password')
81 parser.add_option('--key-name', help='Keystore name') 82 parser.add_option('--key-name', help='Keystore name')
82 parser.add_option('--stamp', help='Path to touch on success.') 83 parser.add_option('--stamp', help='Path to touch on success.')
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 aligned_apk = options.final_apk_path 119 aligned_apk = options.final_apk_path
119 120
120 # Align uncompress items to 4 bytes 121 # Align uncompress items to 4 bytes
121 AlignApk(options.zipalign_path, apk_to_align, aligned_apk) 122 AlignApk(options.zipalign_path, apk_to_align, aligned_apk)
122 123
123 if options.load_library_from_zip_file: 124 if options.load_library_from_zip_file:
124 # Uncompress the library and make sure that it is page aligned. 125 # Uncompress the library and make sure that it is page aligned.
125 UncompressLibAndPageAlignInApk( 126 UncompressLibAndPageAlignInApk(
126 options.rezip_path, aligned_apk, options.final_apk_path) 127 options.rezip_path, aligned_apk, options.final_apk_path)
127 128
129 if options.depfile:
130 build_utils.WriteDepfile(
131 options.depfile, build_utils.GetPythonDependencies())
132
128 if options.stamp: 133 if options.stamp:
129 build_utils.Touch(options.stamp) 134 build_utils.Touch(options.stamp)
130 135
131 136
132 if __name__ == '__main__': 137 if __name__ == '__main__':
133 sys.exit(main()) 138 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/gyp/ant.py ('k') | build/android/gyp/package_resources.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698