1 # Copyright 2013 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. 4 5 # This file is meant to be included into an action to provide an action that 6 # signs and zipaligns an APK. 7 # 8 # To use this, create a gyp action with the following form: 9 # { 10 # 'action_name': 'some descriptive action name', 11 # 'variables': { 12 # 'inputs': [ 'input_path1', 'input_path2' ], 13 # 'input_apk_path': 'relative/path/to/input.apk', 14 # 'output_apk_path': 'relative/path/to/output.apk', 15 # }, 16 # 'includes': [ '../../build/android/finalize_apk.gypi' ], 17 # }, 18 # 19 20 { 21 'message': 'Signing/aligning <(_target_name) APK: <(input_apk_path).', 22 'variables': { 23 'inputs': [], 24 'keystore_path%': '<(DEPTH)/build/android/ant/chromium-debug.keystore', 25 }, 26 'inputs': [ 27 '<(DEPTH)/build/android/gyp/util/build_utils.py', 28 '<(DEPTH)/build/android/gyp/finalize_apk.py', 29 '<(keystore_path)', 30 '<(input_apk_path)', 31 '>@(inputs)', 32 ], 33 'outputs': [ 34 '<(output_apk_path)', 35 ], 36 'action': [ 37 'python', '<(DEPTH)/build/android/gyp/finalize_apk.py', 38 '--android-sdk-root=<(android_sdk_root)', 39 '--unsigned-apk-path=<(input_apk_path)', 40 '--final-apk-path=<(output_apk_path)', 41 '--keystore-path=<(keystore_path)', 42 43 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. 44 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', 45 ], 46 } 47