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

Side by Side Diff: build/java_apk.gypi

Issue 1590243003: [Android] Rework multidex and enable multidex for unit_tests_apk. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed 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 unified diff | Download patch
« no previous file with comments | « build/config/android/rules.gni ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # This file is meant to be included into a target to provide a rule 5 # This file is meant to be included into a target to provide a rule
6 # to build Android APKs in a consistent manner. 6 # to build Android APKs in a consistent manner.
7 # 7 #
8 # To use this, create a gyp target with the following form: 8 # To use this, create a gyp target with the following form:
9 # { 9 # {
10 # 'target_name': 'my_package_apk', 10 # 'target_name': 'my_package_apk',
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 # java_in_dir_suffix - To override the /src suffix on java_in_dir. 70 # java_in_dir_suffix - To override the /src suffix on java_in_dir.
71 # app_manifest_version_name - set the apps 'human readable' version number. 71 # app_manifest_version_name - set the apps 'human readable' version number.
72 # app_manifest_version_code - set the apps version number. 72 # app_manifest_version_code - set the apps version number.
73 # dependencies_locale_zip_alternative_paths - a list of paths that used to 73 # dependencies_locale_zip_alternative_paths - a list of paths that used to
74 # replace dependencies_locale_zip_paths of all_dependent_settings. 74 # replace dependencies_locale_zip_paths of all_dependent_settings.
75 { 75 {
76 'variables': { 76 'variables': {
77 'tested_apk_obfuscated_jar_path%': '/', 77 'tested_apk_obfuscated_jar_path%': '/',
78 'tested_apk_dex_path%': '/', 78 'tested_apk_dex_path%': '/',
79 'tested_apk_is_multidex%': 0, 79 'tested_apk_is_multidex%': 0,
80 'tested_apk_generated_multidex_config%': 0,
80 'additional_input_paths': [], 81 'additional_input_paths': [],
81 'additional_locale_input_paths': [], 82 'additional_locale_input_paths': [],
82 'create_density_splits%': 0, 83 'create_density_splits%': 0,
83 'language_splits': [], 84 'language_splits': [],
84 'library_jars_paths': [], 85 'library_jars_paths': [],
85 'input_jars_paths': [], 86 'input_jars_paths': [],
86 'library_dexed_jars_paths': [], 87 'library_dexed_jars_paths': [],
87 'additional_src_dirs': [], 88 'additional_src_dirs': [],
88 'generated_src_dirs': [], 89 'generated_src_dirs': [],
89 'app_manifest_version_name%': '<(android_app_version_name)', 90 'app_manifest_version_name%': '<(android_app_version_name)',
(...skipping 24 matching lines...) Expand all
114 'package_input_paths': [], 115 'package_input_paths': [],
115 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', 116 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json',
116 'additional_ordered_libraries_file': '<(intermediate_dir)/additional_native_ libraries.json', 117 'additional_ordered_libraries_file': '<(intermediate_dir)/additional_native_ libraries.json',
117 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib raries.template', 118 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib raries.template',
118 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', 119 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/',
119 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries. java', 120 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries. java',
120 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st amp', 121 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st amp',
121 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/ ', 122 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/ ',
122 'native_libraries_template_data_file': '<(native_libraries_template_data_dir )/native_libraries_array.h', 123 'native_libraries_template_data_file': '<(native_libraries_template_data_dir )/native_libraries_array.h',
123 'native_libraries_template_version_file': '<(native_libraries_template_data_ dir)/native_libraries_version.h', 124 'native_libraries_template_version_file': '<(native_libraries_template_data_ dir)/native_libraries_version.h',
125 'generate_multidex_config%': 0,
126 'multidex_config_template': '<(DEPTH)/base/android/java/templates/ChromiumMu ltiDex.template',
127 'multidex_config_java_dir': '<(intermediate_dir)/multidex_config/',
128 'multidex_config_java_file': '<(multidex_config_java_dir)/ChromiumMultiDex.j ava',
129 'multidex_config_java_stamp': '<(intermediate_dir)/multidex_config_java.stam p',
124 'compile_stamp': '<(intermediate_dir)/compile.stamp', 130 'compile_stamp': '<(intermediate_dir)/compile.stamp',
125 'lint_stamp': '<(intermediate_dir)/lint.stamp', 131 'lint_stamp': '<(intermediate_dir)/lint.stamp',
126 'lint_result': '<(intermediate_dir)/lint_result.xml', 132 'lint_result': '<(intermediate_dir)/lint_result.xml',
127 'lint_config': '<(intermediate_dir)/lint_config.xml', 133 'lint_config': '<(intermediate_dir)/lint_config.xml',
128 'never_lint%': 0, 134 'never_lint%': 0,
129 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp', 135 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp',
130 'run_findbugs%': 0, 136 'run_findbugs%': 0,
131 'java_in_dir_suffix%': '/src', 137 'java_in_dir_suffix%': '/src',
132 'emma_instr_stamp': '<(intermediate_dir)/emma_instr.stamp', 138 'emma_instr_stamp': '<(intermediate_dir)/emma_instr.stamp',
133 'jar_stamp': '<(intermediate_dir)/jar.stamp', 139 'jar_stamp': '<(intermediate_dir)/jar.stamp',
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 'variables': { 265 'variables': {
260 'debug_build_proguard_enabled': 'true', 266 'debug_build_proguard_enabled': 'true',
261 } 267 }
262 }], 268 }],
263 ['is_test_apk == 0', { 269 ['is_test_apk == 0', {
264 'variables': { 270 'variables': {
265 'tested_apk_path': '<(final_apk_path)', 271 'tested_apk_path': '<(final_apk_path)',
266 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)', 272 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)',
267 'tested_apk_dex_path': '<(dex_path)', 273 'tested_apk_dex_path': '<(dex_path)',
268 'tested_apk_is_multidex': '<(enable_multidex)', 274 'tested_apk_is_multidex': '<(enable_multidex)',
275 'tested_apk_generated_multidex_config': '>(generate_multidex_config)',
269 } 276 }
270 }] 277 }]
271 ], 278 ],
272 'variables': { 279 'variables': {
273 'apk_output_jar_path': '<(jar_path)', 280 'apk_output_jar_path': '<(jar_path)',
274 }, 281 },
275 }, 282 },
276 'conditions': [ 283 'conditions': [
277 ['resource_dir!=""', { 284 ['resource_dir!=""', {
278 'variables': { 285 'variables': {
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 'action': [ 794 'action': [
788 'python', '<(DEPTH)/build/android/findbugs_diff.py', 795 'python', '<(DEPTH)/build/android/findbugs_diff.py',
789 '--auxclasspath-gyp', '>(input_jars_paths)', 796 '--auxclasspath-gyp', '>(input_jars_paths)',
790 '--stamp', '<(findbugs_stamp)', 797 '--stamp', '<(findbugs_stamp)',
791 '<@(additional_findbugs_args)', 798 '<@(additional_findbugs_args)',
792 '<(jar_path)', 799 '<(jar_path)',
793 ], 800 ],
794 }, 801 },
795 ], 802 ],
796 }], 803 }],
797 ['enable_multidex == 1', { 804 ],
805 'target_conditions': [
806 ['generate_multidex_config == 1 and tested_apk_generated_multidex_config == 0', {
807 'variables': {
808 'generated_src_dirs': ['<(multidex_config_java_dir)'],
809 },
798 'actions': [ 810 'actions': [
799 { 811 {
800 'action_name': 'main_dex_list_for_<(_target_name)',
801 'variables': {
802 'jar_paths': ['>@(input_jars_paths)', '<(javac_jar_path)'],
803 'output_path': '<(main_dex_list_path)',
804 },
805 'includes': [ 'android/main_dex_action.gypi' ],
806 },
807 {
808 'action_name': 'configure_multidex_for_<(_target_name)', 812 'action_name': 'configure_multidex_for_<(_target_name)',
809 'inputs': [ 813 'inputs': [
810 '<(DEPTH)/build/android/gyp/configure_multidex.py', 814 '<(DEPTH)/build/android/gyp/configure_multidex.py',
815 '<(multidex_config_template)',
811 ], 816 ],
812 'outputs': [ 817 'outputs': [
813 '<(multidex_configuration_path)', 818 '<(multidex_configuration_path)',
819 '<(multidex_config_java_stamp)',
814 ], 820 ],
815 'variables': { 821 'variables': {
816 'additional_multidex_config_options': [], 822 'additional_multidex_config_options': [],
817 'enabled_configurations': ['>@(enable_multidex_configurations)'], 823 'enabled_configurations': '>(enable_multidex_configurations)',
824 'conditions': [
825 ['enable_multidex == 1', {
826 'additional_multidex_config_options': ['--enable-multidex'],
827 }],
828 ],
818 }, 829 },
819 'action': [ 830 'action': [
820 'python', '<(DEPTH)/build/android/gyp/configure_multidex.py', 831 'python', '<(DEPTH)/build/android/gyp/configure_multidex.py',
821 '--configuration-name', '<(CONFIGURATION_NAME)', 832 '--configuration-name', '<(CONFIGURATION_NAME)',
822 '--enabled-configurations', '<(enabled_configurations)', 833 '--enabled-configurations', '<(enabled_configurations)',
823 '--multidex-configuration-path', '<(multidex_configuration_path)', 834 '--multidex-configuration-path', '<(multidex_configuration_path)',
835 '--multidex-config-java-template', '<(multidex_config_template)',
836 '--multidex-config-java-file', '<(multidex_config_java_file)',
837 '--multidex-config-java-stamp', '<(multidex_config_java_stamp)',
824 '>@(additional_multidex_config_options)', 838 '>@(additional_multidex_config_options)',
825 ], 839 ],
826 }, 840 },
827 ], 841 ],
842 'conditions': [
843 ['enable_multidex == 1', {
844 'actions': [
845 {
846 'action_name': 'main_dex_list_for_<(_target_name)',
847 'variables': {
848 'jar_paths': ['>@(input_jars_paths)', '<(javac_jar_path)'],
849 'output_path': '<(main_dex_list_path)',
850 },
851 'includes': [ 'android/main_dex_action.gypi' ],
852 },
853 ]
854 }]
855 ],
828 }], 856 }],
829 ], 857 ],
830 'dependencies': [ 858 'dependencies': [
831 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', 859 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum',
832 ], 860 ],
833 'actions': [ 861 'actions': [
834 { 862 {
835 'action_name': 'process_resources', 863 'action_name': 'process_resources',
836 'message': 'processing resources for <(_target_name)', 864 'message': 'processing resources for <(_target_name)',
837 'variables': { 865 'variables': {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 '<(DEPTH)/build/android/gyp/javac.py', 976 '<(DEPTH)/build/android/gyp/javac.py',
949 '>@(java_sources)', 977 '>@(java_sources)',
950 '>@(input_jars_paths)', 978 '>@(input_jars_paths)',
951 '<(codegen_stamp)', 979 '<(codegen_stamp)',
952 '<@(extra_inputs)', 980 '<@(extra_inputs)',
953 ], 981 ],
954 'conditions': [ 982 'conditions': [
955 ['native_lib_target != ""', { 983 ['native_lib_target != ""', {
956 'inputs': [ '<(native_libraries_java_stamp)' ], 984 'inputs': [ '<(native_libraries_java_stamp)' ],
957 }], 985 }],
986 ['generate_multidex_config == 1', {
987 'inputs': [ '<(multidex_config_java_stamp)' ],
988 }],
958 ], 989 ],
959 'outputs': [ 990 'outputs': [
960 '<(compile_stamp)', 991 '<(compile_stamp)',
961 '<(javac_jar_path)', 992 '<(javac_jar_path)',
962 ], 993 ],
963 'action': [ 994 'action': [
964 'python', '<(DEPTH)/build/android/gyp/javac.py', 995 'python', '<(DEPTH)/build/android/gyp/javac.py',
965 '--bootclasspath=<(android_sdk_jar)', 996 '--bootclasspath=<(android_sdk_jar)',
966 '--classpath=>(input_jars_paths) <(android_sdk_jar) >(library_jars_paths )', 997 '--classpath=>(input_jars_paths) <(android_sdk_jar) >(library_jars_paths )',
967 '--src-gendirs=>(gen_src_dirs)', 998 '--src-gendirs=>(gen_src_dirs)',
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 'native_libs_dir': '<(apk_package_native_libs_dir)', 1238 'native_libs_dir': '<(apk_package_native_libs_dir)',
1208 }, { 1239 }, {
1209 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', 1240 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res',
1210 }], 1241 }],
1211 ], 1242 ],
1212 }, 1243 },
1213 'includes': ['android/apkbuilder_action.gypi'], 1244 'includes': ['android/apkbuilder_action.gypi'],
1214 }, 1245 },
1215 ], 1246 ],
1216 } 1247 }
OLDNEW
« 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