| 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 # android_manifest_path - Path to AndroidManifest.xml. | |
| 11 # app_manifest_version_name - set the apps 'human readable' version number. | |
| 12 # app_manifest_version_code - set the apps version number. | |
| 13 # Optional variables: | |
| 14 # asset_location - The directory where assets are located (if any). | |
| 15 # resource_zips - List of paths to resource zip files. | |
| 16 # shared_resources - Make a resource package that can be loaded by a different | |
| 17 # application at runtime to access the package's resources. | |
| 18 # extensions_to_not_compress - E.g.: 'pak,dat,bin' | |
| 19 # extra_inputs - List of extra action inputs. | |
| 20 { | |
| 21 'variables': { | |
| 22 'asset_location%': '', | |
| 23 'resource_zips%': [], | |
| 24 'shared_resources%': 0, | |
| 25 'extensions_to_not_compress%': '', | |
| 26 'extra_inputs%': [], | |
| 27 'resource_packaged_apk_name': '<(apk_name)-resources.ap_', | |
| 28 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_n
ame)', | |
| 29 }, | |
| 30 'action_name': 'package_resources_<(apk_name)', | |
| 31 'message': 'packaging resources for <(apk_name)', | |
| 32 'inputs': [ | |
| 33 # TODO: This isn't always rerun correctly, http://crbug.com/351928 | |
| 34 '<(DEPTH)/build/android/gyp/util/build_utils.py', | |
| 35 '<(DEPTH)/build/android/gyp/package_resources.py', | |
| 36 '<(android_manifest_path)', | |
| 37 '<@(extra_inputs)', | |
| 38 ], | |
| 39 'outputs': [ | |
| 40 '<(resource_packaged_apk_path)', | |
| 41 ], | |
| 42 'action': [ | |
| 43 'python', '<(DEPTH)/build/android/gyp/package_resources.py', | |
| 44 '--android-sdk', '<(android_sdk)', | |
| 45 '--android-sdk-tools', '<(android_sdk_tools)', | |
| 46 '--configuration-name', '<(CONFIGURATION_NAME)', | |
| 47 '--android-manifest', '<(android_manifest_path)', | |
| 48 '--version-code', '<(app_manifest_version_code)', | |
| 49 '--version-name', '<(app_manifest_version_name)', | |
| 50 '--no-compress', '<(extensions_to_not_compress)', | |
| 51 '--apk-path', '<(resource_packaged_apk_path)', | |
| 52 ], | |
| 53 'conditions': [ | |
| 54 ['shared_resources == 1', { | |
| 55 'action': [ | |
| 56 '--shared-resources', | |
| 57 ], | |
| 58 }], | |
| 59 ['asset_location != ""', { | |
| 60 'action': [ | |
| 61 '--asset-dir', '<(asset_location)', | |
| 62 ], | |
| 63 }], | |
| 64 ['resource_zips != []', { | |
| 65 'action': [ | |
| 66 '--resource-zips', '>(resource_zips)', | |
| 67 ], | |
| 68 'inputs': [ | |
| 69 '>@(resource_zips)', | |
| 70 ], | |
| 71 }], | |
| 72 ], | |
| 73 } | |
| OLD | NEW |