Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1238)

Unified Diff: build/java_apk.gypi

Issue 1581563003: [Android] Rework multidex and enable multidex for unit_tests_apk. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix junit tests Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/android/rules.gni ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/java_apk.gypi
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index ab49dc6ab1b7990be44c07905f906f976fa2ba8a..8c305ee5eba1bac383924e710072440003005639 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -74,6 +74,7 @@
# replace dependencies_locale_zip_paths of all_dependent_settings.
{
'variables': {
+ 'tested_apk_path%': '/',
'tested_apk_obfuscated_jar_path%': '/',
'tested_apk_dex_path%': '/',
'tested_apk_is_multidex%': 0,
@@ -121,6 +122,11 @@
'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/',
'native_libraries_template_data_file': '<(native_libraries_template_data_dir)/native_libraries_array.h',
'native_libraries_template_version_file': '<(native_libraries_template_data_dir)/native_libraries_version.h',
+ 'generate_multidex_config%': 0,
+ 'multidex_config_template': '<(DEPTH)/base/android/java/templates/ChromiumMultiDex.template',
+ 'multidex_config_java_dir': '<(intermediate_dir)/multidex_config/',
+ 'multidex_config_java_file': '<(multidex_config_java_dir)/ChromiumMultiDex.java',
+ 'multidex_config_java_stamp': '<(intermediate_dir)/multidex_config_java.stamp',
'compile_stamp': '<(intermediate_dir)/compile.stamp',
'lint_stamp': '<(intermediate_dir)/lint.stamp',
'lint_result': '<(intermediate_dir)/lint_result.xml',
@@ -794,37 +800,58 @@
},
],
}],
- ['enable_multidex == 1', {
+ ],
+ 'target_conditions': [
+ ['generate_multidex_config == 1 and is_test_apk == 0', {
+ 'variables': {
+ 'generated_src_dirs': ['<(multidex_config_java_dir)'],
+ },
'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' ],
- },
- {
'action_name': 'configure_multidex_for_<(_target_name)',
'inputs': [
'<(DEPTH)/build/android/gyp/configure_multidex.py',
+ '<(multidex_config_template)',
],
'outputs': [
'<(multidex_configuration_path)',
+ '<(multidex_config_java_stamp)',
],
'variables': {
'additional_multidex_config_options': [],
- 'enabled_configurations': ['>@(enable_multidex_configurations)'],
+ 'enabled_configurations': '>(enable_multidex_configurations)',
+ 'conditions': [
+ ['enable_multidex == 1', {
+ 'additional_multidex_config_options': ['--enable-multidex'],
+ }],
+ ],
},
'action': [
'python', '<(DEPTH)/build/android/gyp/configure_multidex.py',
'--configuration-name', '<(CONFIGURATION_NAME)',
'--enabled-configurations', '<(enabled_configurations)',
'--multidex-configuration-path', '<(multidex_configuration_path)',
+ '--multidex-config-java-template', '<(multidex_config_template)',
+ '--multidex-config-java-file', '<(multidex_config_java_file)',
+ '--multidex-config-java-stamp', '<(multidex_config_java_stamp)',
'>@(additional_multidex_config_options)',
],
},
],
+ 'conditions': [
+ ['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': [
@@ -955,6 +982,9 @@
['native_lib_target != ""', {
'inputs': [ '<(native_libraries_java_stamp)' ],
}],
+ ['generate_multidex_config == 1', {
+ 'inputs': [ '<(multidex_config_java_stamp)' ],
+ }],
],
'outputs': [
'<(compile_stamp)',
« no previous file with comments | « build/config/android/rules.gni ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698