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 Java in a consistent manner. | 6 # to build Java 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_java', | 10 # 'target_name': 'my-package_java', |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 '<(R_file)', | 131 '<(R_file)', |
132 ], | 132 ], |
133 'action': [ | 133 'action': [ |
134 '<(DEPTH)/build/android/process_resources.py', | 134 '<(DEPTH)/build/android/process_resources.py', |
135 '--android-sdk', '<(android_sdk)', | 135 '--android-sdk', '<(android_sdk)', |
136 '--android-sdk-tools', '<(android_sdk_tools)', | 136 '--android-sdk-tools', '<(android_sdk_tools)', |
137 '--R-package', '<(R_package)', | 137 '--R-package', '<(R_package)', |
138 '--R-dir', '<(R_dir)', | 138 '--R-dir', '<(R_dir)', |
139 '--res-dir', '<(res_dir)', | 139 '--res-dir', '<(res_dir)', |
140 '--out-res-dir', '<(out_res_dir)', | 140 '--out-res-dir', '<(out_res_dir)', |
| 141 |
| 142 # Add list of inputs to the command line, so if inputs change |
| 143 # (e.g. if a resource if removed), the command will be re-run. |
| 144 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 145 '--ignore', '>(_inputs)', |
141 ], | 146 ], |
142 }, | 147 }, |
143 ], | 148 ], |
144 }], | 149 }], |
145 ], | 150 ], |
146 'actions': [ | 151 'actions': [ |
147 { | 152 { |
148 'action_name': 'ant_<(_target_name)', | 153 'action_name': 'ant_<(_target_name)', |
149 'message': 'Building <(_target_name) java sources.', | 154 'message': 'Building <(_target_name) java sources.', |
150 'inputs': [ | 155 'inputs': [ |
(...skipping 16 matching lines...) Expand all Loading... |
167 '-DANDROID_GDBSERVER=<(android_gdbserver)', | 172 '-DANDROID_GDBSERVER=<(android_gdbserver)', |
168 '-DPRODUCT_DIR=<(ant_build_out)', | 173 '-DPRODUCT_DIR=<(ant_build_out)', |
169 | 174 |
170 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', | 175 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
171 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', | 176 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', |
172 '-DINPUT_JARS_PATHS=>(input_jars_paths)', | 177 '-DINPUT_JARS_PATHS=>(input_jars_paths)', |
173 '-DJAR_NAME=<(jar_name)', | 178 '-DJAR_NAME=<(jar_name)', |
174 '-DOUT_DIR=<(ant_build_out)/<(_target_name)', | 179 '-DOUT_DIR=<(ant_build_out)/<(_target_name)', |
175 '-DJAVAC_INCLUDES=>(javac_includes)', | 180 '-DJAVAC_INCLUDES=>(javac_includes)', |
176 | 181 |
| 182 # Add list of inputs to the command line, so if inputs change |
| 183 # (e.g. if a Java file is removed), the command will be re-run. |
| 184 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 185 '-DTHIS_IS_IGNORED=>(_inputs)', |
| 186 |
177 '-Dbasedir=<(java_in_dir)', | 187 '-Dbasedir=<(java_in_dir)', |
178 '-buildfile', | 188 '-buildfile', |
179 '<(DEPTH)/build/android/ant/chromium-jars.xml' | 189 '<(DEPTH)/build/android/ant/chromium-jars.xml' |
180 ] | 190 ] |
181 }, | 191 }, |
182 ], | 192 ], |
183 } | 193 } |
OLD | NEW |