| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # This file is a helper to java_apk.gypi. It should be used to create an | 5 # This file is a helper to java_apk.gypi. It should be used to create an |
| 6 # action that runs ApkBuilder via ANT. | 6 # action that runs ApkBuilder via ANT. |
| 7 # | 7 # |
| 8 # Required variables: | 8 # Required variables: |
| 9 # apk_name - File name (minus path & extension) of the output apk. | 9 # apk_name - File name (minus path & extension) of the output apk. |
| 10 # android_manifest_path - Path to AndroidManifest.xml. | 10 # android_manifest_path - Path to AndroidManifest.xml. |
| 11 # app_manifest_version_name - set the apps 'human readable' version number. | 11 # app_manifest_version_name - set the apps 'human readable' version number. |
| 12 # app_manifest_version_code - set the apps version number. | 12 # app_manifest_version_code - set the apps version number. |
| 13 # Optional variables: | 13 # Optional variables: |
| 14 # asset_location - The directory where assets are located (if any). | 14 # asset_location - The directory where assets are located (if any). |
| 15 # create_density_splits - Whether to create density-based apk splits. Splits |
| 16 # are supported only for minSdkVersion >= 21. |
| 15 # resource_zips - List of paths to resource zip files. | 17 # resource_zips - List of paths to resource zip files. |
| 16 # shared_resources - Make a resource package that can be loaded by a different | 18 # shared_resources - Make a resource package that can be loaded by a different |
| 17 # application at runtime to access the package's resources. | 19 # application at runtime to access the package's resources. |
| 18 # extensions_to_not_compress - E.g.: 'pak,dat,bin' | 20 # extensions_to_not_compress - E.g.: 'pak,dat,bin' |
| 19 # extra_inputs - List of extra action inputs. | 21 # extra_inputs - List of extra action inputs. |
| 20 { | 22 { |
| 21 'variables': { | 23 'variables': { |
| 22 'asset_location%': '', | 24 'asset_location%': '', |
| 25 'create_density_splits%': 0, |
| 23 'resource_zips%': [], | 26 'resource_zips%': [], |
| 24 'shared_resources%': 0, | 27 'shared_resources%': 0, |
| 25 'extensions_to_not_compress%': '', | 28 'extensions_to_not_compress%': '', |
| 26 'extra_inputs%': [], | 29 'extra_inputs%': [], |
| 27 'resource_packaged_apk_name': '<(apk_name)-resources.ap_', | 30 'resource_packaged_apk_name': '<(apk_name)-resources.ap_', |
| 28 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_n
ame)', | 31 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_n
ame)', |
| 29 }, | 32 }, |
| 30 'action_name': 'package_resources_<(apk_name)', | 33 'action_name': 'package_resources_<(apk_name)', |
| 31 'message': 'packaging resources for <(apk_name)', | 34 'message': 'packaging resources for <(apk_name)', |
| 32 'inputs': [ | 35 'inputs': [ |
| (...skipping 21 matching lines...) Expand all Loading... |
| 54 ['shared_resources == 1', { | 57 ['shared_resources == 1', { |
| 55 'action': [ | 58 'action': [ |
| 56 '--shared-resources', | 59 '--shared-resources', |
| 57 ], | 60 ], |
| 58 }], | 61 }], |
| 59 ['asset_location != ""', { | 62 ['asset_location != ""', { |
| 60 'action': [ | 63 'action': [ |
| 61 '--asset-dir', '<(asset_location)', | 64 '--asset-dir', '<(asset_location)', |
| 62 ], | 65 ], |
| 63 }], | 66 }], |
| 67 ['create_density_splits == 1', { |
| 68 'action': [ |
| 69 '--create-density-splits', |
| 70 ], |
| 71 'outputs': [ |
| 72 '<(resource_packaged_apk_path)-hdpi', |
| 73 '<(resource_packaged_apk_path)-xhdpi', |
| 74 '<(resource_packaged_apk_path)-xxhdpi', |
| 75 '<(resource_packaged_apk_path)-tvdpi', |
| 76 ], |
| 77 }], |
| 64 ['resource_zips != []', { | 78 ['resource_zips != []', { |
| 65 'action': [ | 79 'action': [ |
| 66 '--resource-zips', '>(resource_zips)', | 80 '--resource-zips', '>(resource_zips)', |
| 67 ], | 81 ], |
| 68 'inputs': [ | 82 'inputs': [ |
| 69 '>@(resource_zips)', | 83 '>@(resource_zips)', |
| 70 ], | 84 ], |
| 71 }], | 85 }], |
| 72 ], | 86 ], |
| 73 } | 87 } |
| OLD | NEW |