summaryrefslogtreecommitdiffstats
path: root/chromium/build/android/finalize_apk_action.gypi
blob: bfb7ccdb7b008af083069fb42b5fb560e7eeba83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This file is meant to be included into an action to provide an action that
# signs and zipaligns an APK.
#
# To use this, create a gyp action with the following form:
#  {
#    'action_name': 'some descriptive action name',
#    'variables': {
#      'input_apk_path': 'relative/path/to/input.apk',
#      'output_apk_path': 'relative/path/to/output.apk',
#    },
#    'includes': [ '../../build/android/finalize_apk.gypi' ],
#  },
#

{
  'message': 'Signing/aligning <(_target_name) APK: <(input_apk_path)',
  'variables': {
    'keystore_path%': '<(DEPTH)/build/android/ant/chromium-debug.keystore',
    'keystore_name%': 'chromiumdebugkey',
    'keystore_password%': 'chromium',
    'conditions': [
        # Webview doesn't use zipalign.
        ['android_webview_build==0', {
          'zipalign_path%': ['<!@(find <(android_sdk_root) -name zipalign)'],
        }, {
          'zipalign_path%': "",
        }],
    ],
  },
  'inputs': [
    '<(DEPTH)/build/android/gyp/util/build_utils.py',
    '<(DEPTH)/build/android/gyp/finalize_apk.py',
    '<(keystore_path)',
    '<(input_apk_path)',
  ],
  'outputs': [
    '<(output_apk_path)',
  ],
  'action': [
    'python', '<(DEPTH)/build/android/gyp/finalize_apk.py',
    '--zipalign-path=<(zipalign_path)',
    '--unsigned-apk-path=<(input_apk_path)',
    '--final-apk-path=<(output_apk_path)',
    '--key-path=<(keystore_path)',
    '--key-name=<(keystore_name)',
    '--key-passwd=<(keystore_password)',
  ],
}