Chromium Code Reviews| Index: build/java_apk.gypi |
| diff --git a/build/java_apk.gypi b/build/java_apk.gypi |
| index a1fc8574db67ca4e21145a2d2205ae5c263f8ba4..4effd896d580a7329434cc435dab51841466d950 100644 |
| --- a/build/java_apk.gypi |
| +++ b/build/java_apk.gypi |
| @@ -70,11 +70,13 @@ |
| 'variables': { |
| 'tested_apk_obfuscated_jar_path%': '/', |
| 'tested_apk_dex_path%': '/', |
| + 'tested_apk_is_multidex%': 0, |
| 'additional_input_paths': [], |
| 'create_density_splits%': 0, |
| 'language_splits': [], |
| 'input_jars_paths': [], |
| 'library_dexed_jars_paths': [], |
| + 'main_dex_list_paths': [], |
| 'additional_src_dirs': [], |
| 'generated_src_dirs': [], |
| 'app_manifest_version_name%': '<(android_app_version_name)', |
| @@ -131,7 +133,7 @@ |
| 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', |
| 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar', |
| 'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', |
| - 'dex_path': '<(intermediate_dir)/classes.dex', |
| + 'enable_multidex%': 0, |
| 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', |
| 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', |
| 'split_android_manifest_path': '<(intermediate_dir)/split-manifests/<(android_app_abi)/AndroidManifest.xml', |
| @@ -160,6 +162,7 @@ |
| 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', |
| 'unsigned_abi_split_apk_path': '<(intermediate_dir)/<(apk_name)-abi-<(android_app_abi)-unsigned.apk', |
| 'create_abi_split%': 0, |
| + 'enable_multidex%': 0, |
| }, |
| 'unsigned_apk_path': '<(unsigned_apk_path)', |
| 'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', |
| @@ -193,6 +196,11 @@ |
| }, { |
| 'managed_input_apk_path': '<(unsigned_apk_path)', |
| }], |
| + ['enable_multidex == 1', { |
| + 'dex_path': '<(intermediate_dir)/classes.dex.zip', |
| + }, { |
| + 'dex_path': '<(intermediate_dir)/classes.dex', |
| + }], |
| ], |
| }, |
| 'native_lib_target%': '', |
| @@ -213,6 +221,7 @@ |
| 'native_lib_placeholder_stamp': '<(apk_package_native_libs_dir)/<(android_app_abi)/native_lib_placeholder.stamp', |
| 'native_lib_placeholders': [], |
| 'main_apk_name': '<(apk_name)', |
| + 'dex_path': '<(dex_path)', |
| 'enable_errorprone%': '0', |
| 'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', |
| }, |
| @@ -231,6 +240,7 @@ |
| 'apk_output_jar_path': '<(jar_path)', |
| 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)', |
| 'tested_apk_dex_path': '<(dex_path)', |
| + 'tested_apk_is_multidex': '<(enable_multidex)', |
| }, |
| }, |
| 'conditions': [ |
| @@ -740,8 +750,34 @@ |
| ], |
| }, |
| ], |
| - }, |
| - ] |
| + }], |
| + ['enable_multidex == 1', { |
| + 'variables': { |
| + 'main_dex_list_file': '<(intermediate_dir)/main_dex_list.txt', |
| + }, |
| + 'actions': [ |
| + { |
| + 'action_name': 'main_dex_list_for_<(_target_name)', |
| + 'variables': { |
| + 'main_dex_rules_file': '<(DEPTH)/build/android/main_dex_classes.flags', |
| + }, |
| + 'inputs': [ |
| + '<(DEPTH)/build/android/gyp/main_dex_list.py', |
| + '<(main_dex_rules_file)', |
| + ], |
| + 'outputs': [ |
| + '<(main_dex_list_file)', |
| + ], |
| + 'action': [ |
| + 'python', '<(DEPTH)/build/android/gyp/main_dex_list.py', |
| + '--android-sdk-tools', '<(android_sdk_tools)', |
| + '--main-dex-list-path', '<(main_dex_list_file)', |
| + '--main-dex-rules-path', '<(main_dex_rules_file)', |
| + '>@(input_jars_paths)', |
| + ], |
| + }, |
| + ], |
| + }], |
| ], |
| 'dependencies': [ |
| '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', |
| @@ -993,14 +1029,40 @@ |
| { |
| 'action_name': 'dex_<(_target_name)', |
| 'variables': { |
| + 'dex_additional_options': [], |
| 'dex_input_paths': [ |
| - '>@(library_dexed_jars_paths)', |
| '<(jar_path)', |
| ], |
| 'output_path': '<(dex_path)', |
| 'proguard_enabled_input_path': '<(obfuscated_jar_path)', |
| }, |
| + 'conditions': [ |
| + ['enable_multidex == 1', { |
| + 'variables': { |
| + 'dex_additional_options': [ |
| + '--multi-dex', |
| + '--main-dex-list-paths', '>@(main_dex_list_paths)', |
| + ], |
| + }, |
| + 'inputs': [ |
| + '>@(main_dex_list_paths)', |
|
Yaron
2015/08/13 20:18:27
Actually, does this include the file created from
jbudorick
2015/08/14 21:01:21
Good catch. It does now.
|
| + ], |
| + }] |
| + ], |
| 'target_conditions': [ |
| + ['enable_multidex == 1 or tested_apk_is_multidex == 1', { |
| + 'variables': { |
| + 'dex_input_paths': [ |
| + '>@(input_jars_paths)', |
| + ], |
| + }, |
| + }, { |
| + 'variables': { |
| + 'dex_input_paths': [ |
| + '>@(library_dexed_jars_paths)', |
| + ], |
| + }, |
| + }], |
| ['emma_instrument != 0', { |
| 'variables': { |
| 'dex_no_locals': 1, |