Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(626)

Side by Side Diff: build/java.gypi

Issue 20210002: [Android] Sets up a coverage system for java using EMMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Break apart native and java coverage flags for gyp Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 { 48 {
49 'dependencies': [ 49 'dependencies': [
50 '<(DEPTH)/build/android/setup.gyp:build_output_dirs' 50 '<(DEPTH)/build/android/setup.gyp:build_output_dirs'
51 ], 51 ],
52 'variables': { 52 'variables': {
53 'android_jar': '<(android_sdk)/android.jar', 53 'android_jar': '<(android_sdk)/android.jar',
54 'input_jars_paths': [ '<(android_jar)' ], 54 'input_jars_paths': [ '<(android_jar)' ],
55 'additional_src_dirs': [], 55 'additional_src_dirs': [],
56 'javac_includes': [], 56 'javac_includes': [],
57 'jar_name': '<(_target_name).jar', 57 'jar_name': '<(_target_name).jar',
58 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', 58 'jar_dir': '<(PRODUCT_DIR)/lib.java',
59 'jar_path': '<(intermediate_dir)/<(jar_name)',
60 'jar_final_path': '<(jar_dir)/<(jar_name)',
59 'jar_excluded_classes': [ '*/R.class', '*/R##*.class' ], 61 'jar_excluded_classes': [ '*/R.class', '*/R##*.class' ],
62 'instr_stamp': '<(intermediate_dir)/instr.stamp',
60 'additional_input_paths': [], 63 'additional_input_paths': [],
61 'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar', 64 'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar',
62 'generated_src_dirs': ['>@(generated_R_dirs)'], 65 'generated_src_dirs': ['>@(generated_R_dirs)'],
63 'generated_R_dirs': [], 66 'generated_R_dirs': [],
64 'has_java_resources%': 0, 67 'has_java_resources%': 0,
65 'java_strings_grd%': '', 68 'java_strings_grd%': '',
66 'res_extra_dirs': [], 69 'res_extra_dirs': [],
67 'res_extra_files': [], 70 'res_extra_files': [],
68 'res_v14_verify_only%': 0, 71 'res_v14_verify_only%': 0,
69 'resource_input_paths': ['>@(res_extra_files)'], 72 'resource_input_paths': ['>@(res_extra_files)'],
70 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)', 73 'intermediate_dir': '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)',
71 'classes_dir': '<(intermediate_dir)/classes', 74 'classes_dir': '<(intermediate_dir)/classes',
72 'compile_stamp': '<(intermediate_dir)/compile.stamp', 75 'compile_stamp': '<(intermediate_dir)/compile.stamp',
76 'emma_instrument%': 0,
73 }, 77 },
74 # This all_dependent_settings is used for java targets only. This will add the 78 # This all_dependent_settings is used for java targets only. This will add the
75 # jar path to the classpath of dependent java targets. 79 # jar path to the classpath of dependent java targets.
76 'all_dependent_settings': { 80 'all_dependent_settings': {
77 'variables': { 81 'variables': {
78 'input_jars_paths': ['<(jar_path)'], 82 'input_jars_paths': ['<(jar_final_path)'],
79 'library_dexed_jars_paths': ['<(dex_path)'], 83 'library_dexed_jars_paths': ['<(dex_path)'],
80 }, 84 },
81 }, 85 },
82 'conditions': [ 86 'conditions': [
83 ['has_java_resources == 1', { 87 ['has_java_resources == 1', {
84 'variables': { 88 'variables': {
85 'res_dir': '<(java_in_dir)/res', 89 'res_dir': '<(java_in_dir)/res',
86 'res_crunched_dir': '<(intermediate_dir)/res_crunched', 90 'res_crunched_dir': '<(intermediate_dir)/res_crunched',
87 'res_v14_compatibility_stamp': '<(intermediate_dir)/res_v14_compatibilit y.stamp', 91 'res_v14_compatibility_stamp': '<(intermediate_dir)/res_v14_compatibilit y.stamp',
88 'res_v14_compatibility_dir': '<(intermediate_dir)/res_v14_compatibility' , 92 'res_v14_compatibility_dir': '<(intermediate_dir)/res_v14_compatibility' ,
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 'python', '<(DEPTH)/build/android/gyp/jar.py', 273 'python', '<(DEPTH)/build/android/gyp/jar.py',
270 '--classes-dir=<(classes_dir)', 274 '--classes-dir=<(classes_dir)',
271 '--jar-path=<(jar_path)', 275 '--jar-path=<(jar_path)',
272 '--excluded-classes=<(jar_excluded_classes)', 276 '--excluded-classes=<(jar_excluded_classes)',
273 277
274 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . 278 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja .
275 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', 279 '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
276 ] 280 ]
277 }, 281 },
278 { 282 {
283 'action_name': 'instr_jar_<(_target_name)',
284 'message': 'Instrumenting <(_target_name) jar',
285 'variables': {
286 'input_path': '<(jar_path)',
287 'output_path': '<(jar_final_path)',
288 'stamp_path': '<(instr_stamp)',
289 'instr_type': 'jar',
290 },
291 'outputs': [
292 '<(jar_final_path)',
293 ],
294 'inputs': [
295 '<(jar_path)',
296 ],
297 'includes': [ 'android/instr_action.gypi' ],
298 },
299 {
279 'action_name': 'jar_toc_<(_target_name)', 300 'action_name': 'jar_toc_<(_target_name)',
280 'message': 'Creating <(_target_name) jar.TOC', 301 'message': 'Creating <(_target_name) jar.TOC',
281 'inputs': [ 302 'inputs': [
282 '<(DEPTH)/build/android/gyp/util/build_utils.py', 303 '<(DEPTH)/build/android/gyp/util/build_utils.py',
283 '<(DEPTH)/build/android/gyp/util/md5_check.py', 304 '<(DEPTH)/build/android/gyp/util/md5_check.py',
284 '<(DEPTH)/build/android/gyp/jar_toc.py', 305 '<(DEPTH)/build/android/gyp/jar_toc.py',
285 '<(jar_path)', 306 '<(jar_final_path)',
286 ], 307 ],
287 'outputs': [ 308 'outputs': [
288 '<(jar_path).TOC', 309 '<(jar_final_path).TOC',
289 ], 310 ],
290 'action': [ 311 'action': [
291 'python', '<(DEPTH)/build/android/gyp/jar_toc.py', 312 'python', '<(DEPTH)/build/android/gyp/jar_toc.py',
292 '--jar-path=<(jar_path)', 313 '--jar-path=<(jar_final_path)',
293 '--toc-path=<(jar_path).TOC', 314 '--toc-path=<(jar_final_path).TOC',
294 315
295 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . 316 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja .
296 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', 317 '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
297 ] 318 ]
298 }, 319 },
299 { 320 {
300 'action_name': 'dex_<(_target_name)', 321 'action_name': 'dex_<(_target_name)',
301 'variables': { 322 'variables': {
302 'dex_input_paths': [ '<(jar_path)' ], 323 'conditions': [
324 ['emma_instrument != 0', {
325 'dex_no_locals': 1,
326 }],
327 ],
328 'dex_input_paths': [ '<(jar_final_path)' ],
303 'output_path': '<(dex_path)', 329 'output_path': '<(dex_path)',
304 }, 330 },
305 'includes': [ 'android/dex_action.gypi' ], 331 'includes': [ 'android/dex_action.gypi' ],
306 }, 332 },
307 ], 333 ],
308 } 334 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698