summaryrefslogtreecommitdiffstats
path: root/build/java.gypi
diff options
context:
space:
mode:
authorgkanwar@chromium.org <gkanwar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-22 00:08:31 +0000
committergkanwar@chromium.org <gkanwar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-22 00:08:31 +0000
commitc0a127749a99ad36ac62f2764ab259508cef5267 (patch)
tree397358c8d0b89b1d97b70048bd0d3715ccf6777a /build/java.gypi
parent9934a5e76dd787bb8924bda6e6830824c1726058 (diff)
downloadchromium_src-c0a127749a99ad36ac62f2764ab259508cef5267.zip
chromium_src-c0a127749a99ad36ac62f2764ab259508cef5267.tar.gz
chromium_src-c0a127749a99ad36ac62f2764ab259508cef5267.tar.bz2
Makes GYP changes for EMMA coverage
One piece of the overall java coverage change. See: https://codereview.chromium.org/20210002/ NOTRY=True BUG=255644 Review URL: https://chromiumcodereview.appspot.com/22870021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/java.gypi')
-rw-r--r--build/java.gypi48
1 files changed, 40 insertions, 8 deletions
diff --git a/build/java.gypi b/build/java.gypi
index 5318e2a..95858ee 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' ],