1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # This file is meant to be included into an action to provide an action that
6 # signs and zipaligns split APKs.
9 # apk_name - Base name of the apk.
11 # density_splits - Whether to process density splits
12 # language_splits - Whether to language splits
16 'keystore_path%': '<(DEPTH)/build/android/ant/chromium-debug.keystore',
17 'keystore_name%': 'chromiumdebugkey',
18 'keystore_password%': 'chromium',
19 'zipalign_path%': '<(android_sdk_tools)/zipalign',
21 'language_splits%': [],
22 'resource_packaged_apk_name': '<(apk_name)-resources.ap_',
23 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_name)',
24 'base_output_path': '<(PRODUCT_DIR)/apks/<(apk_name)',
27 '<(DEPTH)/build/android/gyp/finalize_splits.py',
28 '<(DEPTH)/build/android/gyp/finalize_apk.py',
29 '<(DEPTH)/build/android/gyp/util/build_utils.py',
33 'python', '<(DEPTH)/build/android/gyp/finalize_splits.py',
34 '--resource-packaged-apk-path=<(resource_packaged_apk_path)',
35 '--base-output-path=<(base_output_path)',
36 '--zipalign-path=<(zipalign_path)',
37 '--key-path=<(keystore_path)',
38 '--key-name=<(keystore_name)',
39 '--key-passwd=<(keystore_password)',
42 ['density_splits == 1', {
43 'message': 'Signing/aligning <(_target_name) density splits',
45 '<(resource_packaged_apk_path)_hdpi',
46 '<(resource_packaged_apk_path)_xhdpi',
47 '<(resource_packaged_apk_path)_xxhdpi',
48 '<(resource_packaged_apk_path)_xxxhdpi',
49 '<(resource_packaged_apk_path)_tvdpi',
52 '<(base_output_path)-density-hdpi.apk',
53 '<(base_output_path)-density-xhdpi.apk',
54 '<(base_output_path)-density-xxhdpi.apk',
55 '<(base_output_path)-density-xxxhdpi.apk',
56 '<(base_output_path)-density-tvdpi.apk',
59 '--densities=hdpi,xhdpi,xxhdpi,xxxhdpi,tvdpi',
62 ['language_splits != []', {
63 'message': 'Signing/aligning <(_target_name) language splits',
65 "<!@(python <(DEPTH)/build/apply_locales.py '<(resource_packaged_apk_path)_ZZLOCALE' <(language_splits))",
68 "<!@(python <(DEPTH)/build/apply_locales.py '<(base_output_path)-lang-ZZLOCALE.apk' <(language_splits))",
71 '--languages=<(language_splits)',