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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | build/java_apk.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/java.gypi
diff --git a/build/java.gypi b/build/java.gypi
index 5318e2a35983cd4857cdd20b8770439db160fbd9..95858ee298ed1741475dbb9d53d6f83a90ab9d7e 100644
--- a/build/java.gypi
+++ b/build/java.gypi
@@ -55,8 +55,11 @@
'additional_src_dirs': [],
'javac_includes': [],
'jar_name': '<(_target_name).jar',
- 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)',
+ 'jar_dir': '<(PRODUCT_DIR)/lib.java',
+ 'jar_path': '<(intermediate_dir)/<(jar_name)',
+ 'jar_final_path': '<(jar_dir)/<(jar_name)',
'jar_excluded_classes': [ '*/R.class', '*/R##*.class' ],
+ 'instr_stamp': '<(intermediate_dir)/instr.stamp',
'additional_input_paths': [],
'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar',
'generated_src_dirs': ['>@(generated_R_dirs)'],
@@ -80,17 +83,24 @@
['proguard_preprocess == 1', {
'javac_jar_path': '<(intermediate_dir)/<(_target_name).pre.jar'
}, {
- 'javac_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)'
+ 'javac_jar_path': '<(jar_path)'
}],
],
},
'javac_jar_path': '<(javac_jar_path)',
+ 'conditions': [
+ ['chromium_code != 0 and emma_coverage != 0', {
+ 'emma_instrument': 1,
+ }, {
+ 'emma_instrument': 0,
+ }],
+ ],
},
# This all_dependent_settings is used for java targets only. This will add the
# jar path to the classpath of dependent java targets.
'all_dependent_settings': {
'variables': {
- 'input_jars_paths': ['<(jar_path)'],
+ 'input_jars_paths': ['<(jar_final_path)'],
'library_dexed_jars_paths': ['<(dex_path)'],
},
},
@@ -320,21 +330,38 @@
]
},
{
+ 'action_name': 'instr_jar_<(_target_name)',
+ 'message': 'Instrumenting <(_target_name) jar',
+ 'variables': {
+ 'input_path': '<(jar_path)',
+ 'output_path': '<(jar_final_path)',
+ 'stamp_path': '<(instr_stamp)',
+ 'instr_type': 'jar',
+ },
+ 'outputs': [
+ '<(jar_final_path)',
+ ],
+ 'inputs': [
+ '<(jar_path)',
+ ],
+ 'includes': [ 'android/instr_action.gypi' ],
+ },
+ {
'action_name': 'jar_toc_<(_target_name)',
'message': 'Creating <(_target_name) jar.TOC',
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/util/md5_check.py',
'<(DEPTH)/build/android/gyp/jar_toc.py',
- '<(jar_path)',
+ '<(jar_final_path)',
],
'outputs': [
- '<(jar_path).TOC',
+ '<(jar_final_path).TOC',
],
'action': [
'python', '<(DEPTH)/build/android/gyp/jar_toc.py',
- '--jar-path=<(jar_path)',
- '--toc-path=<(jar_path).TOC',
+ '--jar-path=<(jar_final_path)',
+ '--toc-path=<(jar_final_path).TOC',
# TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
'--ignore=>!(echo \'>(_inputs)\' | md5sum)',
@@ -343,7 +370,12 @@
{
'action_name': 'dex_<(_target_name)',
'variables': {
- 'dex_input_paths': [ '<(jar_path)' ],
+ 'conditions': [
+ ['emma_instrument != 0', {
+ 'dex_no_locals': 1,
+ }],
+ ],
+ 'dex_input_paths': [ '<(jar_final_path)' ],
'output_path': '<(dex_path)',
},
'includes': [ 'android/dex_action.gypi' ],
« 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