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

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

Issue 2392643003: Removes files from //build that we don't need (Closed)
Patch Set: Created 4 years, 2 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/finalize_apk.py ('k') | build/android/gyp/find.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2015 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6 """Signs and zipaligns split APKs.
7
8 This script is require only by GYP (not GN).
9 """
10
11 import optparse
12 import sys
13
14 import finalize_apk
15 from util import build_utils
16
17 def main():
18 parser = optparse.OptionParser()
19 parser.add_option('--zipalign-path', help='Path to the zipalign tool.')
20 parser.add_option('--resource-packaged-apk-path',
21 help='Base path to input .ap_s.')
22 parser.add_option('--base-output-path',
23 help='Path to output .apk, minus extension.')
24 parser.add_option('--key-path', help='Path to keystore for signing.')
25 parser.add_option('--key-passwd', help='Keystore password')
26 parser.add_option('--key-name', help='Keystore name')
27 parser.add_option('--densities',
28 help='Comma separated list of densities finalize.')
29 parser.add_option('--languages',
30 help='GYP list of language splits to finalize.')
31
32 options, _ = parser.parse_args()
33 options.load_library_from_zip = 0
34
35 if options.densities:
36 for density in options.densities.split(','):
37 options.unsigned_apk_path = ("%s_%s" %
38 (options.resource_packaged_apk_path, density))
39 options.final_apk_path = ("%s-density-%s.apk" %
40 (options.base_output_path, density))
41 finalize_apk.FinalizeApk(options)
42
43 if options.languages:
44 for lang in build_utils.ParseGypList(options.languages):
45 options.unsigned_apk_path = ("%s_%s" %
46 (options.resource_packaged_apk_path, lang))
47 options.final_apk_path = ("%s-lang-%s.apk" %
48 (options.base_output_path, lang))
49 finalize_apk.FinalizeApk(options)
50
51 if __name__ == '__main__':
52 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/gyp/finalize_apk.py ('k') | build/android/gyp/find.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698