OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 # This file is a helper to java_apk.gypi. It should be used to create an |
| 6 # action that runs ApkBuilder via ANT. |
| 7 # |
| 8 # Required variables: |
| 9 # apk_name - File name (minus path & extension) of the output apk. |
| 10 # apk_path - Path to output apk. |
| 11 # package_input_paths - Late-evaluated list of resource zips. |
| 12 # native_libs_dir - Path to lib/ directory to use. Set to an empty directory |
| 13 # if no native libs are needed. |
| 14 # Optional variables: |
| 15 # has_code - Whether to include classes.dex in the apk. |
| 16 # dex_path - Path to classes.dex. Used only when has_code=1. |
| 17 # extra_inputs - List of extra action inputs. |
| 18 { |
| 19 'variables': { |
| 20 'variables': { |
| 21 'has_code%': 1, |
| 22 }, |
| 23 'conditions': [ |
| 24 ['has_code == 0', { |
| 25 'has_code_str': 'false', |
| 26 }, { |
| 27 'has_code_str': 'true', |
| 28 }], |
| 29 ], |
| 30 'has_code%': '<(has_code)', |
| 31 'extra_inputs%': [], |
| 32 # Write the inputs list to a file, so that its mtime is updated when |
| 33 # the list of inputs changes. |
| 34 'inputs_list_file': '>|(apk_package.<(_target_name).<(apk_name).gypcmd >@(pa
ckage_input_paths))', |
| 35 'resource_packaged_apk_name': '<(apk_name)-resources.ap_', |
| 36 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_n
ame)', |
| 37 }, |
| 38 'action_name': 'apkbuilder_<(apk_name)', |
| 39 'message': 'Packaging <(apk_name)', |
| 40 'inputs': [ |
| 41 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 42 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 43 '<(DEPTH)/build/android/gyp/ant.py', |
| 44 '<(resource_packaged_apk_path)', |
| 45 '<@(extra_inputs)', |
| 46 '>@(package_input_paths)', |
| 47 '>(inputs_list_file)', |
| 48 ], |
| 49 'outputs': [ |
| 50 '<(apk_path)', |
| 51 ], |
| 52 'conditions': [ |
| 53 ['has_code == 1', { |
| 54 'inputs': ['<(dex_path)'], |
| 55 'action': [ |
| 56 '-DDEX_FILE_PATH=<(dex_path)', |
| 57 ] |
| 58 }], |
| 59 ], |
| 60 'action': [ |
| 61 'python', '<(DEPTH)/build/android/gyp/ant.py', |
| 62 '--', |
| 63 '-quiet', |
| 64 '-DHAS_CODE=<(has_code_str)', |
| 65 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
| 66 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
| 67 '-DRESOURCE_PACKAGED_APK_NAME=<(resource_packaged_apk_name)', |
| 68 '-DNATIVE_LIBS_DIR=<(native_libs_dir)', |
| 69 '-DAPK_NAME=<(apk_name)', |
| 70 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', |
| 71 '-DOUT_DIR=<(intermediate_dir)', |
| 72 '-DUNSIGNED_APK_PATH=<(apk_path)', |
| 73 '-DEMMA_INSTRUMENT=<(emma_instrument)', |
| 74 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', |
| 75 '-Dbasedir=.', |
| 76 '-buildfile', |
| 77 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 78 ] |
| 79 } |
OLD | NEW |