| Index: build/java_apk.gypi
|
| diff --git a/build/java_apk.gypi b/build/java_apk.gypi
|
| index 2457d3a1939c663bcb348285ab92136154707d77..0ab410828d67992800c207ffe69fc120e34253c4 100644
|
| --- a/build/java_apk.gypi
|
| +++ b/build/java_apk.gypi
|
| @@ -67,6 +67,7 @@
|
| 'additional_res_dirs': [],
|
| 'additional_res_packages': [],
|
| 'is_test_apk%': 0,
|
| + 'emma_instrument%': 0,
|
| 'java_strings_grd%': '',
|
| 'library_manifest_paths' : [],
|
| 'resource_input_paths': [],
|
| @@ -87,15 +88,18 @@
|
| 'native_libraries_template_data_file': '<(native_libraries_template_data_dir)/native_libraries_array.h',
|
| 'native_libraries_template_data_stamp': '<(intermediate_dir)/native_libraries_template_data.stamp',
|
| 'compile_stamp': '<(intermediate_dir)/compile.stamp',
|
| + 'instr_stamp': '<(intermediate_dir)/instr.stamp',
|
| 'jar_stamp': '<(intermediate_dir)/jar.stamp',
|
| 'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp',
|
| 'strip_stamp': '<(intermediate_dir)/strip.stamp',
|
| 'classes_dir': '<(intermediate_dir)/classes',
|
| + 'classes_final_dir': '<(intermediate_dir)/classes_instr',
|
| 'javac_includes': [],
|
| 'jar_excluded_classes': [],
|
| 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)',
|
| 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar',
|
| 'dex_path': '<(intermediate_dir)/classes.dex',
|
| + 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar',
|
| 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml',
|
| 'push_stamp': '<(intermediate_dir)/push.stamp',
|
| 'link_stamp': '<(intermediate_dir)/link.stamp',
|
| @@ -461,20 +465,37 @@
|
| ],
|
| },
|
| {
|
| + 'action_name': 'instr_classes_<(_target_name)',
|
| + 'message': 'Instrumenting <(_target_name) classes',
|
| + 'variables': {
|
| + 'input_path': '<(classes_dir)',
|
| + 'output_path': '<(classes_final_dir)',
|
| + 'stamp_path': '<(instr_stamp)',
|
| + 'instr_type': 'classes',
|
| + },
|
| + 'outputs': [
|
| + '<(instr_stamp)',
|
| + ],
|
| + 'inputs': [
|
| + '<(compile_stamp)',
|
| + ],
|
| + 'includes': [ 'android/instr_action.gypi' ],
|
| + },
|
| + {
|
| 'action_name': 'jar_<(_target_name)',
|
| 'message': 'Creating <(_target_name) jar',
|
| 'inputs': [
|
| + '<(instr_stamp)',
|
| '<(DEPTH)/build/android/gyp/util/build_utils.py',
|
| '<(DEPTH)/build/android/gyp/util/md5_check.py',
|
| '<(DEPTH)/build/android/gyp/jar.py',
|
| - '<(compile_stamp)',
|
| ],
|
| 'outputs': [
|
| '<(jar_stamp)',
|
| ],
|
| 'action': [
|
| 'python', '<(DEPTH)/build/android/gyp/jar.py',
|
| - '--classes-dir=<(classes_dir)',
|
| + '--classes-dir=<(classes_final_dir)',
|
| '--jar-path=<(jar_path)',
|
| '--excluded-classes=<(jar_excluded_classes)',
|
| '--stamp=<(jar_stamp)',
|
| @@ -491,7 +512,7 @@
|
| '<(DEPTH)/build/android/ant/create-test-jar.js',
|
| '<(DEPTH)/build/android/gyp/util/build_utils.py',
|
| '<(DEPTH)/build/android/gyp/ant.py',
|
| - '<(compile_stamp)',
|
| + '<(instr_stamp)',
|
| '>@(proguard_flags_paths)',
|
| ],
|
| 'outputs': [
|
| @@ -537,10 +558,13 @@
|
| 'input_paths': [ '<(obfuscate_stamp)' ],
|
| 'proguard_enabled_input_path': '<(obfuscated_jar_path)',
|
| }],
|
| + ['emma_instrument != 0', {
|
| + 'dex_input_paths': [ '<(emma_device_jar)' ],
|
| + }],
|
| ],
|
| - 'input_paths': [ '<(compile_stamp)' ],
|
| + 'input_paths': [ '<(instr_stamp)' ],
|
| 'dex_input_paths': [ '>@(library_dexed_jars_paths)' ],
|
| - 'dex_generated_input_dirs': [ '<(classes_dir)' ],
|
| + 'dex_generated_input_dirs': [ '<(classes_final_dir)' ],
|
| 'output_path': '<(dex_path)',
|
| },
|
| 'includes': [ 'android/dex_action.gypi' ],
|
| @@ -625,6 +649,7 @@
|
| '-DOUT_DIR=<(intermediate_dir)',
|
| '-DSOURCE_DIR=<(source_dir)',
|
| '-DUNSIGNED_APK_PATH=<(unsigned_apk_path)',
|
| + '-DEMMA_INSTRUMENT=<(emma_instrument)',
|
|
|
| '-Dbasedir=.',
|
| '-buildfile',
|
|
|