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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 { | 137 { |
138 'action_name': 'process_resources', | 138 'action_name': 'process_resources', |
139 'message': 'processing resources for <(_target_name)', | 139 'message': 'processing resources for <(_target_name)', |
140 'variables': { | 140 'variables': { |
141 'android_manifest': '<(DEPTH)/build/android/AndroidManifest.xml', | 141 'android_manifest': '<(DEPTH)/build/android/AndroidManifest.xml', |
142 # Include the dependencies' res dirs so that references to | 142 # Include the dependencies' res dirs so that references to |
143 # resources in dependencies can be resolved. | 143 # resources in dependencies can be resolved. |
144 'all_res_dirs': ['<@(res_input_dirs)', '>@(additional_res_dirs)'], | 144 'all_res_dirs': ['<@(res_input_dirs)', '>@(additional_res_dirs)'], |
145 }, | 145 }, |
146 'inputs': [ | 146 'inputs': [ |
147 '<(DEPTH)/build/android/pylib/build_utils.py', | 147 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
148 '<(DEPTH)/build/android/process_resources.py', | 148 '<(DEPTH)/build/android/gyp/process_resources.py', |
149 '>@(resource_input_paths)', | 149 '>@(resource_input_paths)', |
150 '>@(dependencies_res_files)', | 150 '>@(dependencies_res_files)', |
151 ], | 151 ], |
152 'outputs': [ | 152 'outputs': [ |
153 '<(R_stamp)', | 153 '<(R_stamp)', |
154 ], | 154 ], |
155 'action': [ | 155 'action': [ |
156 '<(DEPTH)/build/android/process_resources.py', | 156 'python', '<(DEPTH)/build/android/gyp/process_resources.py', |
157 '--android-sdk', '<(android_sdk)', | 157 '--android-sdk', '<(android_sdk)', |
158 '--android-sdk-tools', '<(android_sdk_tools)', | 158 '--android-sdk-tools', '<(android_sdk_tools)', |
159 '--R-dir', '<(R_dir)', | 159 '--R-dir', '<(R_dir)', |
160 '--res-dirs', '>(all_res_dirs)', | 160 '--res-dirs', '>(all_res_dirs)', |
161 '--crunch-input-dir', '>(res_dir)', | 161 '--crunch-input-dir', '>(res_dir)', |
162 '--crunch-output-dir', '<(res_crunched_dir)', | 162 '--crunch-output-dir', '<(res_crunched_dir)', |
163 '--android-manifest', '<(android_manifest)', | 163 '--android-manifest', '<(android_manifest)', |
164 '--non-constant-id', | 164 '--non-constant-id', |
165 '--custom-package', '<(R_package)', | 165 '--custom-package', '<(R_package)', |
166 '--stamp', '<(R_stamp)', | 166 '--stamp', '<(R_stamp)', |
(...skipping 12 matching lines...) Expand all Loading... |
179 'action_name': 'javac_<(_target_name)', | 179 'action_name': 'javac_<(_target_name)', |
180 'message': 'Compiling <(_target_name) java sources', | 180 'message': 'Compiling <(_target_name) java sources', |
181 'variables': { | 181 'variables': { |
182 'all_src_dirs': [ | 182 'all_src_dirs': [ |
183 '>(java_in_dir)/src', | 183 '>(java_in_dir)/src', |
184 '>@(additional_src_dirs)', | 184 '>@(additional_src_dirs)', |
185 '>@(generated_src_dirs)', | 185 '>@(generated_src_dirs)', |
186 ], | 186 ], |
187 }, | 187 }, |
188 'inputs': [ | 188 'inputs': [ |
189 '<(DEPTH)/build/android/pylib/build_utils.py', | 189 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
190 '<(DEPTH)/build/android/gyp/javac.py', | 190 '<(DEPTH)/build/android/gyp/javac.py', |
191 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', | 191 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', |
192 '>@(input_jars_paths)', | 192 '>@(input_jars_paths)', |
193 '>@(additional_input_paths)', | 193 '>@(additional_input_paths)', |
194 ], | 194 ], |
195 'outputs': [ | 195 'outputs': [ |
196 '<(compile_stamp)', | 196 '<(compile_stamp)', |
197 ], | 197 ], |
198 'action': [ | 198 'action': [ |
199 'python', '<(DEPTH)/build/android/gyp/javac.py', | 199 'python', '<(DEPTH)/build/android/gyp/javac.py', |
200 '--output-dir=<(classes_dir)', | 200 '--output-dir=<(classes_dir)', |
201 '--classpath=>(input_jars_paths)', | 201 '--classpath=>(input_jars_paths)', |
202 '--src-dirs=>(all_src_dirs)', | 202 '--src-dirs=>(all_src_dirs)', |
203 '--javac-includes=<(javac_includes)', | 203 '--javac-includes=<(javac_includes)', |
204 '--chromium-code=<(chromium_code)', | 204 '--chromium-code=<(chromium_code)', |
205 '--stamp=<(compile_stamp)', | 205 '--stamp=<(compile_stamp)', |
206 | 206 |
207 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. | 207 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. |
208 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 208 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
209 ] | 209 ] |
210 }, | 210 }, |
211 { | 211 { |
212 'action_name': 'jar_<(_target_name)', | 212 'action_name': 'jar_<(_target_name)', |
213 'message': 'Creating <(_target_name) jar', | 213 'message': 'Creating <(_target_name) jar', |
214 'inputs': [ | 214 'inputs': [ |
215 '<(DEPTH)/build/android/pylib/build_utils.py', | 215 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
216 '<(DEPTH)/build/android/gyp/util/md5_check.py', | 216 '<(DEPTH)/build/android/gyp/util/md5_check.py', |
217 '<(DEPTH)/build/android/gyp/jar.py', | 217 '<(DEPTH)/build/android/gyp/jar.py', |
218 '<(compile_stamp)', | 218 '<(compile_stamp)', |
219 ], | 219 ], |
220 'outputs': [ | 220 'outputs': [ |
221 '<(jar_path)', | 221 '<(jar_path)', |
222 ], | 222 ], |
223 'action': [ | 223 'action': [ |
224 'python', '<(DEPTH)/build/android/gyp/jar.py', | 224 'python', '<(DEPTH)/build/android/gyp/jar.py', |
225 '--classes-dir=<(classes_dir)', | 225 '--classes-dir=<(classes_dir)', |
226 '--jar-path=<(jar_path)', | 226 '--jar-path=<(jar_path)', |
227 '--excluded-classes=<(jar_excluded_classes)', | 227 '--excluded-classes=<(jar_excluded_classes)', |
228 | 228 |
229 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. | 229 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. |
230 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 230 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
231 ] | 231 ] |
232 }, | 232 }, |
233 { | 233 { |
234 'action_name': 'dex_<(_target_name)', | 234 'action_name': 'dex_<(_target_name)', |
235 'message': 'Dexing <(_target_name) jar', | 235 'message': 'Dexing <(_target_name) jar', |
236 'inputs': [ | 236 'inputs': [ |
237 '<(DEPTH)/build/android/pylib/build_utils.py', | 237 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
238 '<(DEPTH)/build/android/gyp/util/md5_check.py', | 238 '<(DEPTH)/build/android/gyp/util/md5_check.py', |
239 '<(DEPTH)/build/android/gyp/dex.py', | 239 '<(DEPTH)/build/android/gyp/dex.py', |
240 '<(jar_path)', | 240 '<(jar_path)', |
241 ], | 241 ], |
242 'outputs': [ | 242 'outputs': [ |
243 '<(dex_path)', | 243 '<(dex_path)', |
244 ], | 244 ], |
245 'action': [ | 245 'action': [ |
246 'python', '<(DEPTH)/build/android/gyp/dex.py', | 246 'python', '<(DEPTH)/build/android/gyp/dex.py', |
247 '--dex-path=<(dex_path)', | 247 '--dex-path=<(dex_path)', |
248 '--android-sdk-root=<(android_sdk_root)', | 248 '--android-sdk-root=<(android_sdk_root)', |
249 | 249 |
250 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. | 250 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. |
251 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 251 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
252 | 252 |
253 '<(jar_path)', | 253 '<(jar_path)', |
254 ] | 254 ] |
255 }, | 255 }, |
256 | 256 |
257 ], | 257 ], |
258 } | 258 } |
OLD | NEW |