Chromium Code Reviews| Index: build/java_apk.gypi |
| diff --git a/build/java_apk.gypi b/build/java_apk.gypi |
| index 174ec4d4da9769087ff44df5bae2de3daab58e47..ef1c0b62f8d6333da5fa3e6564994c46fceba66c 100644 |
| --- a/build/java_apk.gypi |
| +++ b/build/java_apk.gypi |
| @@ -77,6 +77,7 @@ |
| 'tested_apk_obfuscated_jar_path%': '/', |
| 'tested_apk_dex_path%': '/', |
| 'tested_apk_is_multidex%': 0, |
| + 'tested_apk_multidex_configuration_path%': '', |
| 'additional_input_paths': [], |
| 'additional_locale_input_paths': [], |
| 'create_density_splits%': 0, |
| @@ -84,8 +85,6 @@ |
| 'library_jars_paths': [], |
| 'input_jars_paths': [], |
| 'library_dexed_jars_paths': [], |
| - 'main_dex_list_path': '<(intermediate_dir)/main_dex_list.txt', |
| - 'main_dex_list_paths': ['<(main_dex_list_path)'], |
| 'additional_src_dirs': [], |
| 'generated_src_dirs': [], |
| 'app_manifest_version_name%': '<(android_app_version_name)', |
| @@ -146,6 +145,11 @@ |
| 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar', |
| 'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', |
| 'enable_multidex%': 0, |
| + 'enable_multidex_configurations%': [], |
| + 'multidex_configuration_path': '<(intermediate_dir)/multidex_config.json', |
| + 'multidex_disabled_jars_paths%': [], |
| + 'multidex_enabled_jars_paths%': [], |
| + 'main_dex_list_path': '<(intermediate_dir)/main_dex_list.txt', |
| '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', |
| @@ -264,6 +268,7 @@ |
| 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)', |
| 'tested_apk_dex_path': '<(dex_path)', |
| 'tested_apk_is_multidex': '<(enable_multidex)', |
| + 'tested_apk_multidex_configuration_path': '<(multidex_configuration_path)', |
| }, |
| }, |
| 'conditions': [ |
| @@ -509,7 +514,6 @@ |
| 'libraries_top_dir': '<(intermediate_dir)/lib.stripped', |
| 'libraries_source_dir': '<(libraries_top_dir)/lib/<(android_app_abi)', |
| 'device_library_dir': '<(device_intermediate_dir)/lib.stripped', |
| - 'configuration_name': '<(CONFIGURATION_NAME)', |
| }, |
| 'dependencies': [ |
| '<(DEPTH)/build/android/setup.gyp:get_build_device_configurations', |
| @@ -747,7 +751,7 @@ |
| 'dependencies': [ |
| '<(DEPTH)/build/android/pylib/device/commands/commands.gyp:chromium_commands', |
| '<(DEPTH)/tools/android/android_tools.gyp:android_tools', |
| - ] |
| + ], |
| }], |
| ['run_findbugs == 1', { |
| 'actions': [ |
| @@ -786,6 +790,68 @@ |
| }, |
| ], |
| }], |
| + ['enable_multidex == 1', { |
| + 'actions': [ |
| + { |
| + 'action_name': 'main_dex_list_for_<(_target_name)', |
| + 'variables': { |
| + 'jar_paths': ['>@(input_jars_paths)', '<(javac_jar_path)'], |
| + 'output_path': '<(main_dex_list_path)', |
| + }, |
| + 'includes': [ 'android/main_dex_action.gypi' ], |
| + }, |
| + ], |
| + 'dependencies': [ |
| + '<(DEPTH)/base/base.gyp:base_multidex_enabled_java', |
| + ], |
| + }], |
| + ], |
| + 'target_conditions': [ |
| + ['multidex_disabled_jars_paths != []', { |
| + 'actions': [ |
| + { |
| + 'action_name': 'configure_multidex_for_<(_target_name)', |
| + 'inputs': [ |
| + '<(DEPTH)/build/android/gyp/configure_multidex.py', |
| + '>@(multidex_enabled_jars_paths)', |
| + '>@(multidex_disabled_jars_paths)', |
| + ], |
| + 'outputs': [ |
| + '<(multidex_configuration_path)', |
| + ], |
| + 'variables': { |
| + 'additional_multidex_config_options': [], |
| + 'enabled_configurations': ['>@(enable_multidex_configurations)'], |
| + 'conditions': [ |
| + ['enable_multidex == 1', { |
| + 'additional_multidex_config_options': ['--enable-multidex'], |
| + }], |
| + ], |
| + 'target_conditions': [ |
| + ['multidex_enabled_jars_paths != []', { |
| + 'additional_multidex_config_options': [ |
| + '--multidex-enabled-libs', '>(multidex_enabled_jars_paths)', |
|
agrieve
2015/11/11 14:43:01
nit: libs usually refers to native libs, can you c
jbudorick
2015/11/12 20:33:40
Entirely gone after Yaron's cpp suggestion.
|
| + ], |
| + }], |
| + ['tested_apk_multidex_configuration_path == 1', { |
| + 'additional_multidex_config_options': [ |
| + '--tested-apk-multidex-configuration-path', |
| + '>(tested_apk_multidex_configuration_path)', |
| + ], |
| + }], |
| + ], |
| + }, |
| + 'action': [ |
| + 'python', '<(DEPTH)/build/android/gyp/configure_multidex.py', |
| + '--configuration-name', '<(CONFIGURATION_NAME)', |
| + '--enabled-configurations', '<(enabled_configurations)', |
| + '--multidex-configuration-path', '<(multidex_configuration_path)', |
| + '--multidex-disabled-libs', '>(multidex_disabled_jars_paths)', |
| + '>@(additional_multidex_config_options)', |
| + ], |
| + }, |
| + ], |
| + }], |
| ], |
| 'dependencies': [ |
| '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', |
| @@ -935,14 +1001,6 @@ |
| ], |
| }, |
| { |
| - 'action_name': 'main_dex_list_for_<(_target_name)', |
| - 'variables': { |
| - 'jar_path': '<(javac_jar_path)', |
| - 'output_path': '<(main_dex_list_path)', |
| - }, |
| - 'includes': [ 'android/main_dex_action.gypi' ], |
| - }, |
| - { |
| 'action_name': 'emma_instr_jar_<(_target_name)', |
| 'message': 'Instrumenting <(_target_name) jar', |
| 'variables': { |
| @@ -1023,6 +1081,28 @@ |
| '<(test_jar_path)', |
| ], |
| }], |
| + ['enable_multidex == 1', { |
| + 'inputs': [ |
| + '<(main_dex_list_path)', |
| + ], |
| + 'variables': { |
| + 'additional_obfuscate_options': [ |
| + '--main-dex-list-path', '<(main_dex_list_path)', |
| + ], |
| + }, |
| + }], |
| + ], |
| + 'target_conditions': [ |
| + ['multidex_disabled_jars_paths != []', { |
| + 'variables': { |
| + 'additional_obfuscate_options': [ |
| + '--multidex-configuration-path', '>(multidex_configuration_path)', |
| + ], |
| + }, |
| + 'inputs': [ |
| + '>(multidex_configuration_path)', |
| + ], |
| + }] |
| ], |
| 'inputs': [ |
| '<(DEPTH)/build/android/gyp/apk_obfuscate.py', |
| @@ -1077,16 +1157,13 @@ |
| }, |
| 'conditions': [ |
| ['enable_multidex == 1', { |
| - 'variables': { |
| - 'dex_additional_options': [ |
| - '--multi-dex', |
| - '--main-dex-list-paths', '>@(main_dex_list_paths)', |
| - ], |
| - }, |
| 'inputs': [ |
| - '>@(main_dex_list_paths)', |
| + '<(main_dex_list_path)', |
| ], |
| - }] |
| + 'variables': { |
| + 'dex_additional_options': ['--main-dex-list-path', '<(main_dex_list_path)'], |
| + }, |
| + }], |
| ], |
| 'target_conditions': [ |
| ['enable_multidex == 1 or tested_apk_is_multidex == 1', { |
| @@ -1095,6 +1172,16 @@ |
| '>@(input_jars_paths)', |
| ], |
| }, |
| + }], |
| + ['multidex_disabled_jars_paths != []', { |
| + 'variables': { |
| + 'dex_additional_options': [ |
| + '--multidex-configuration-path', '>(multidex_configuration_path)', |
| + ], |
| + }, |
| + 'inputs': [ |
| + '>(multidex_configuration_path)', |
| + ], |
| }, { |
| 'variables': { |
| 'dex_input_paths': [ |