Index: build/java.gypi |
diff --git a/build/java.gypi b/build/java.gypi |
index 1635c71da40db66cfee1a1737cc9089057ec378c..f8aecd901c1fe61372de4296e5f5329d493f3153 100644 |
--- a/build/java.gypi |
+++ b/build/java.gypi |
@@ -55,7 +55,9 @@ |
'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' ], |
'additional_input_paths': [], |
'dex_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).dex.jar', |
@@ -75,7 +77,7 @@ |
# 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)'], |
}, |
}, |
@@ -276,21 +278,58 @@ |
] |
}, |
{ |
+ 'action_name': 'instr_jar_<(_target_name)', |
cjhopman
2013/08/10 00:11:47
Extract this action to its own file in build/andro
gkanwar1
2013/08/12 18:19:10
Done.
|
+ 'message': 'Instrumenting <(_target_name) jar', |
+ 'variables': { |
+ 'conditions': [ |
+ ['emma_instrument != 0', { |
+ 'instr_action': 'instrument_jar', |
+ 'extra_instr_args': [ |
+ '--intermediate-dir=<(intermediate_dir)', |
+ '--coverage-file=<(intermediate_dir)/coverage.em', |
+ '--sources-file=<(intermediate_dir)/emma_sources.txt', |
+ '--sources=<(java_in_dir)/src >(additional_src_dirs) >(generated_src_dirs)', |
+ '--src-root=<(DEPTH)', |
+ '--sdk-root=<(android_sdk_root)', |
+ ], |
+ }, { |
+ 'instr_action': 'copy', |
+ 'extra_instr_args': [], |
+ }] |
+ ] |
+ }, |
+ 'inputs': [ |
+ '<(jar_path)', |
+ '<(DEPTH)/build/android/gyp/instr.py', |
+ '<(DEPTH)/build/android/pylib/utils/command_option_parser.py', |
+ ], |
+ 'outputs': [ |
+ '<(jar_final_path)', |
+ ], |
+ 'action': [ |
+ 'python', '<(DEPTH)/build/android/gyp/instr.py', |
+ '<(instr_action)', |
+ '--input-path=<(jar_path)', |
+ '--output-path=<(jar_dir)', |
+ '<@(extra_instr_args)', |
+ ] |
+ }, |
+ { |
'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)', |
@@ -299,7 +338,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' ], |