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

Side by Side Diff: build/java.gypi

Issue 22870021: [Android] Makes GYP changes for EMMA coverage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverts accidental change in common.gypi, moves emma_device_jar to 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
« no previous file with comments | « build/common.gypi ('k') | build/java_apk.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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',
73 'proguard_config%': '', 76 'proguard_config%': '',
74 'proguard_preprocess%': '0', 77 'proguard_preprocess%': '0',
75 'variables': { 78 'variables': {
76 'variables': { 79 'variables': {
77 'proguard_preprocess%': 0, 80 'proguard_preprocess%': 0,
78 }, 81 },
79 'conditions': [ 82 'conditions': [
80 ['proguard_preprocess == 1', { 83 ['proguard_preprocess == 1', {
81 'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar' 84 'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar'
82 }, { 85 }, {
83 'javac_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)' 86 'javac_jar_path': '<(jar_path)'
84 }], 87 }],
85 ], 88 ],
86 }, 89 },
87 'javac_jar_path': '<(javac_jar_path)', 90 'javac_jar_path': '<(javac_jar_path)',
91 'conditions': [
92 ['chromium_code != 0 and emma_coverage != 0', {
93 'emma_instrument': 1,
94 }, {
95 'emma_instrument': 0,
96 }],
97 ],
88 }, 98 },
89 # This all_dependent_settings is used for java targets only. This will add the 99 # This all_dependent_settings is used for java targets only. This will add the
90 # jar path to the classpath of dependent java targets. 100 # jar path to the classpath of dependent java targets.
91 'all_dependent_settings': { 101 'all_dependent_settings': {
92 'variables': { 102 'variables': {
93 'input_jars_paths': ['<(jar_path)'], 103 'input_jars_paths': ['<(jar_final_path)'],
94 'library_dexed_jars_paths': ['<(dex_path)'], 104 'library_dexed_jars_paths': ['<(dex_path)'],
95 }, 105 },
96 }, 106 },
97 'conditions': [ 107 'conditions': [
98 ['has_java_resources == 1', { 108 ['has_java_resources == 1', {
99 'variables': { 109 'variables': {
100 'res_dir': '<(java_in_dir)/res', 110 'res_dir': '<(java_in_dir)/res',
101 'res_crunched_dir': '<(intermediate_dir)/res_crunched', 111 'res_crunched_dir': '<(intermediate_dir)/res_crunched',
102 'res_v14_compatibility_stamp': '<(intermediate_dir)/res_v14_compatibilit y.stamp', 112 'res_v14_compatibility_stamp': '<(intermediate_dir)/res_v14_compatibilit y.stamp',
103 'res_v14_compatibility_dir': '<(intermediate_dir)/res_v14_compatibility' , 113 'res_v14_compatibility_dir': '<(intermediate_dir)/res_v14_compatibility' ,
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 'python', '<(DEPTH)/build/android/gyp/jar.py', 323 'python', '<(DEPTH)/build/android/gyp/jar.py',
314 '--classes-dir=<(classes_dir)', 324 '--classes-dir=<(classes_dir)',
315 '--jar-path=<(javac_jar_path)', 325 '--jar-path=<(javac_jar_path)',
316 '--excluded-classes=<(jar_excluded_classes)', 326 '--excluded-classes=<(jar_excluded_classes)',
317 327
318 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . 328 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja .
319 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', 329 '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
320 ] 330 ]
321 }, 331 },
322 { 332 {
333 'action_name': 'instr_jar_<(_target_name)',
334 'message': 'Instrumenting <(_target_name) jar',
335 'variables': {
336 'input_path': '<(jar_path)',
337 'output_path': '<(jar_final_path)',
338 'stamp_path': '<(instr_stamp)',
339 'instr_type': 'jar',
340 },
341 'outputs': [
342 '<(jar_final_path)',
343 ],
344 'inputs': [
345 '<(jar_path)',
346 ],
347 'includes': [ 'android/instr_action.gypi' ],
348 },
349 {
323 'action_name': 'jar_toc_<(_target_name)', 350 'action_name': 'jar_toc_<(_target_name)',
324 'message': 'Creating <(_target_name) jar.TOC', 351 'message': 'Creating <(_target_name) jar.TOC',
325 'inputs': [ 352 'inputs': [
326 '<(DEPTH)/build/android/gyp/util/build_utils.py', 353 '<(DEPTH)/build/android/gyp/util/build_utils.py',
327 '<(DEPTH)/build/android/gyp/util/md5_check.py', 354 '<(DEPTH)/build/android/gyp/util/md5_check.py',
328 '<(DEPTH)/build/android/gyp/jar_toc.py', 355 '<(DEPTH)/build/android/gyp/jar_toc.py',
329 '<(jar_path)', 356 '<(jar_final_path)',
330 ], 357 ],
331 'outputs': [ 358 'outputs': [
332 '<(jar_path).TOC', 359 '<(jar_final_path).TOC',
333 ], 360 ],
334 'action': [ 361 'action': [
335 'python', '<(DEPTH)/build/android/gyp/jar_toc.py', 362 'python', '<(DEPTH)/build/android/gyp/jar_toc.py',
336 '--jar-path=<(jar_path)', 363 '--jar-path=<(jar_final_path)',
337 '--toc-path=<(jar_path).TOC', 364 '--toc-path=<(jar_final_path).TOC',
338 365
339 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . 366 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja .
340 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', 367 '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
341 ] 368 ]
342 }, 369 },
343 { 370 {
344 'action_name': 'dex_<(_target_name)', 371 'action_name': 'dex_<(_target_name)',
345 'variables': { 372 'variables': {
346 'dex_input_paths': [ '<(jar_path)' ], 373 'conditions': [
374 ['emma_instrument != 0', {
375 'dex_no_locals': 1,
376 }],
377 ],
378 'dex_input_paths': [ '<(jar_final_path)' ],
347 'output_path': '<(dex_path)', 379 'output_path': '<(dex_path)',
348 }, 380 },
349 'includes': [ 'android/dex_action.gypi' ], 381 'includes': [ 'android/dex_action.gypi' ],
350 }, 382 },
351 ], 383 ],
352 } 384 }
OLDNEW
« no previous file with comments | « build/common.gypi ('k') | build/java_apk.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698