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 a helper to java_apk.gypi. It should be used to create an
6 # action that runs ApkBuilder via ANT.
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.
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.
25 'has_code_str': 'false',
27 'has_code_str': 'true',
30 'has_code%': '<(has_code)',
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 >@(package_input_paths))',
35 'resource_packaged_apk_name': '<(apk_name)-resources.ap_',
36 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_name)',
38 'action_name': 'apkbuilder_<(apk_name)',
39 'message': 'Packaging <(apk_name)',
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)',
46 '>@(package_input_paths)',
47 '>(inputs_list_file)',
54 'inputs': ['<(dex_path)'],
56 '-DDEX_FILE_PATH=<(dex_path)',
61 'python', '<(DEPTH)/build/android/gyp/ant.py',
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)',
77 '<(DEPTH)/build/android/ant/apk-package.xml',