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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', | 74 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', |
75 'compile_stamp': '<(intermediate_dir)/compile.stamp', | 75 'compile_stamp': '<(intermediate_dir)/compile.stamp', |
76 'lint_stamp': '<(intermediate_dir)/lint.stamp', | 76 'lint_stamp': '<(intermediate_dir)/lint.stamp', |
77 'lint_result': '<(intermediate_dir)/lint_result.xml', | 77 'lint_result': '<(intermediate_dir)/lint_result.xml', |
78 'lint_config': '<(intermediate_dir)/lint_config.xml', | 78 'lint_config': '<(intermediate_dir)/lint_config.xml', |
79 'never_lint%': 0, | 79 'never_lint%': 0, |
80 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp', | 80 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp', |
81 'run_findbugs%': 0, | 81 'run_findbugs%': 0, |
82 'proguard_config%': '', | 82 'proguard_config%': '', |
83 'proguard_preprocess%': '0', | 83 'proguard_preprocess%': '0', |
84 'enable_errorprone%': '0', | |
85 'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', | |
84 'variables': { | 86 'variables': { |
85 'variables': { | 87 'variables': { |
86 'proguard_preprocess%': 0, | 88 'proguard_preprocess%': 0, |
87 'emma_never_instrument%': 0, | 89 'emma_never_instrument%': 0, |
88 }, | 90 }, |
89 'conditions': [ | 91 'conditions': [ |
90 ['proguard_preprocess == 1', { | 92 ['proguard_preprocess == 1', { |
91 'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar' | 93 'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar' |
92 }, { | 94 }, { |
93 'javac_jar_path': '<(jar_path)' | 95 'javac_jar_path': '<(jar_path)' |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 }, | 246 }, |
245 ], | 247 ], |
246 }], | 248 }], |
247 ], | 249 ], |
248 'actions': [ | 250 'actions': [ |
249 { | 251 { |
250 'action_name': 'javac_<(_target_name)', | 252 'action_name': 'javac_<(_target_name)', |
251 'message': 'Compiling <(_target_name) java sources', | 253 'message': 'Compiling <(_target_name) java sources', |
252 'variables': { | 254 'variables': { |
253 'java_sources': ['>!@(find >(java_in_dir)/src >(additional_src_dirs) -na me "*.java")'], | 255 'java_sources': ['>!@(find >(java_in_dir)/src >(additional_src_dirs) -na me "*.java")'], |
256 'conditions': [ | |
257 ['enable_errorprone == 1', { | |
258 'extra_inputs': [ | |
259 '<(errorprone_exe_path)', | |
260 ], | |
261 'extra_args': [ '--errorprone-path=<(errorprone_exe_path)' ], | |
262 }, { | |
263 'extra_inputs': [], | |
264 'extra_args': [ '--enable-errorprone' ], | |
jbudorick
2015/05/15 18:37:12
Similarly here w.r.t. --errorprone-path & --enable
raywilliams_chromium
2015/05/18 19:53:24
Done.
raywilliams_chromium
2015/05/18 19:53:24
Fixed
| |
265 }], | |
266 ], | |
254 }, | 267 }, |
255 'inputs': [ | 268 'inputs': [ |
256 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 269 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
257 '<(DEPTH)/build/android/gyp/javac.py', | 270 '<(DEPTH)/build/android/gyp/javac.py', |
258 '>@(java_sources)', | 271 '>@(java_sources)', |
259 '>@(input_jars_paths)', | 272 '>@(input_jars_paths)', |
260 '>@(additional_input_paths)', | 273 '>@(additional_input_paths)', |
274 '<@(extra_inputs)', | |
261 ], | 275 ], |
262 'outputs': [ | 276 'outputs': [ |
263 '<(compile_stamp)', | 277 '<(compile_stamp)', |
264 '<(javac_jar_path)', | 278 '<(javac_jar_path)', |
265 ], | 279 ], |
266 'action': [ | 280 'action': [ |
267 'python', '<(DEPTH)/build/android/gyp/javac.py', | 281 'python', '<(DEPTH)/build/android/gyp/javac.py', |
268 '--classpath=>(input_jars_paths)', | 282 '--classpath=>(input_jars_paths)', |
269 '--src-gendirs=>(generated_src_dirs)', | 283 '--src-gendirs=>(generated_src_dirs)', |
270 '--javac-includes=<(javac_includes)', | 284 '--javac-includes=<(javac_includes)', |
271 '--chromium-code=<(chromium_code)', | 285 '--chromium-code=<(chromium_code)', |
272 '--jar-path=<(javac_jar_path)', | 286 '--jar-path=<(javac_jar_path)', |
273 '--jar-excluded-classes=<(jar_excluded_classes)', | 287 '--jar-excluded-classes=<(jar_excluded_classes)', |
274 '--stamp=<(compile_stamp)', | 288 '--stamp=<(compile_stamp)', |
289 '<@(extra_args)', | |
275 '>@(java_sources)', | 290 '>@(java_sources)', |
276 ] | 291 ] |
277 }, | 292 }, |
278 { | 293 { |
279 'action_name': 'instr_jar_<(_target_name)', | 294 'action_name': 'instr_jar_<(_target_name)', |
280 'message': 'Instrumenting <(_target_name) jar', | 295 'message': 'Instrumenting <(_target_name) jar', |
281 'variables': { | 296 'variables': { |
282 'input_path': '<(jar_path)', | 297 'input_path': '<(jar_path)', |
283 'output_path': '<(jar_final_path)', | 298 'output_path': '<(jar_final_path)', |
284 'stamp_path': '<(instr_stamp)', | 299 'stamp_path': '<(instr_stamp)', |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
338 'dex_no_locals': 1, | 353 'dex_no_locals': 1, |
339 }], | 354 }], |
340 ], | 355 ], |
341 'dex_input_paths': [ '<(jar_final_path)' ], | 356 'dex_input_paths': [ '<(jar_final_path)' ], |
342 'output_path': '<(dex_path)', | 357 'output_path': '<(dex_path)', |
343 }, | 358 }, |
344 'includes': [ 'android/dex_action.gypi' ], | 359 'includes': [ 'android/dex_action.gypi' ], |
345 }, | 360 }, |
346 ], | 361 ], |
347 } | 362 } |
OLD | NEW |