OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 meant to be included into a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
6 # to build Android APKs in a consistent manner. | 6 # to build Android APKs in a consistent manner. |
7 # | 7 # |
8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
9 # { | 9 # { |
10 # 'target_name': 'my_package_apk', | 10 # 'target_name': 'my_package_apk', |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 '<(DEPTH)/build/android/ant/sdk-targets.xml', | 70 '<(DEPTH)/build/android/ant/sdk-targets.xml', |
71 # If there is a separate find for additonal_src_dirs, it will find the | 71 # If there is a separate find for additonal_src_dirs, it will find the |
72 # wrong .java files when additional_src_dirs is empty. | 72 # wrong .java files when additional_src_dirs is empty. |
73 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', | 73 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', |
74 '<!@(find <(java_in_dir)/<(resource_dir) -name "*")', | 74 '<!@(find <(java_in_dir)/<(resource_dir) -name "*")', |
75 '>@(input_jars_paths)', | 75 '>@(input_jars_paths)', |
76 '>@(native_libs_paths)', | 76 '>@(native_libs_paths)', |
77 '>@(additional_input_paths)', | 77 '>@(additional_input_paths)', |
78 ], | 78 ], |
79 'outputs': [ | 79 'outputs': [ |
| 80 # TODO(cjhopman): Apks are built with a -debug suffix even when they are |
| 81 # built in release. This should be fixed. |
80 '<(PRODUCT_DIR)/apks/<(apk_name)-debug.apk', | 82 '<(PRODUCT_DIR)/apks/<(apk_name)-debug.apk', |
81 ], | 83 ], |
82 'action': [ | 84 'action': [ |
83 'ant', | 85 'ant', |
84 '-DAPP_ABI=<(android_app_abi)', | 86 '-DAPP_ABI=<(android_app_abi)', |
85 '-DANDROID_GDBSERVER=<(android_gdbserver)', | 87 '-DANDROID_GDBSERVER=<(android_gdbserver)', |
86 '-DANDROID_SDK=<(android_sdk)', | 88 '-DANDROID_SDK=<(android_sdk)', |
87 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 89 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
88 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', | 90 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
89 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | 91 '-DANDROID_SDK_VERSION=<(android_sdk_version)', |
90 '-DANDROID_TOOLCHAIN=<(android_toolchain)', | 92 '-DANDROID_TOOLCHAIN=<(android_toolchain)', |
91 '-DCHROMIUM_SRC=<(ant_build_out)/../..', | 93 '-DCHROMIUM_SRC=<(ant_build_out)/../..', |
92 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', | 94 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', |
93 '-DPRODUCT_DIR=<(ant_build_out)', | 95 '-DPRODUCT_DIR=<(ant_build_out)', |
94 | 96 |
95 '-DAPK_NAME=<(apk_name)', | 97 '-DAPK_NAME=<(apk_name)', |
96 '-DASSET_DIR=<(asset_location)', | 98 '-DASSET_DIR=<(asset_location)', |
97 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', | 99 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
98 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', | 100 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', |
99 '-DINPUT_JARS_PATHS=>(input_jars_paths)', | 101 '-DINPUT_JARS_PATHS=>(input_jars_paths)', |
100 '-DPACKAGE_NAME=<(package_name)', | 102 '-DPACKAGE_NAME=<(package_name)', |
101 '-DRESOURCE_DIR=<(resource_dir)', | 103 '-DRESOURCE_DIR=<(resource_dir)', |
102 | 104 |
103 '-Dbasedir=<(java_in_dir)', | 105 '-Dbasedir=<(java_in_dir)', |
104 '-buildfile', | 106 '-buildfile', |
105 '<(DEPTH)/build/android/ant/chromium-apk.xml' | 107 '<(DEPTH)/build/android/ant/chromium-apk.xml', |
| 108 |
| 109 # Specify CONFIGURATION_NAME as the target for ant to build. The |
| 110 # buildfile will then build the appropriate SDK tools target. |
| 111 '<(CONFIGURATION_NAME)', |
106 ] | 112 ] |
107 }, | 113 }, |
108 ], | 114 ], |
109 } | 115 } |
OLD | NEW |