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

Side by Side 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 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 # code. This allows a test APK to inject a Linker.TestRunner instance at 67 # code. This allows a test APK to inject a Linker.TestRunner instance at
68 # runtime. Should only be used by the chromium_linker_test_apk target!! 68 # runtime. Should only be used by the chromium_linker_test_apk target!!
69 # never_lint - Set to 1 to not run lint on this target. 69 # never_lint - Set to 1 to not run lint on this target.
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_path%': '/',
77 'tested_apk_obfuscated_jar_path%': '/', 78 'tested_apk_obfuscated_jar_path%': '/',
78 'tested_apk_dex_path%': '/', 79 'tested_apk_dex_path%': '/',
79 'tested_apk_is_multidex%': 0, 80 'tested_apk_is_multidex%': 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': [],
(...skipping 27 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 'action': [ 793 'action': [
788 'python', '<(DEPTH)/build/android/findbugs_diff.py', 794 'python', '<(DEPTH)/build/android/findbugs_diff.py',
789 '--auxclasspath-gyp', '>(input_jars_paths)', 795 '--auxclasspath-gyp', '>(input_jars_paths)',
790 '--stamp', '<(findbugs_stamp)', 796 '--stamp', '<(findbugs_stamp)',
791 '<@(additional_findbugs_args)', 797 '<@(additional_findbugs_args)',
792 '<(jar_path)', 798 '<(jar_path)',
793 ], 799 ],
794 }, 800 },
795 ], 801 ],
796 }], 802 }],
797 ['enable_multidex == 1', { 803 ],
804 'target_conditions': [
805 ['generate_multidex_config == 1 and is_test_apk == 0', {
806 'variables': {
807 'generated_src_dirs': ['<(multidex_config_java_dir)'],
808 },
798 'actions': [ 809 'actions': [
799 { 810 {
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)', 811 'action_name': 'configure_multidex_for_<(_target_name)',
809 'inputs': [ 812 'inputs': [
810 '<(DEPTH)/build/android/gyp/configure_multidex.py', 813 '<(DEPTH)/build/android/gyp/configure_multidex.py',
814 '<(multidex_config_template)',
811 ], 815 ],
812 'outputs': [ 816 'outputs': [
813 '<(multidex_configuration_path)', 817 '<(multidex_configuration_path)',
818 '<(multidex_config_java_stamp)',
814 ], 819 ],
815 'variables': { 820 'variables': {
816 'additional_multidex_config_options': [], 821 'additional_multidex_config_options': [],
817 'enabled_configurations': ['>@(enable_multidex_configurations)'], 822 'enabled_configurations': '>(enable_multidex_configurations)',
823 'conditions': [
824 ['enable_multidex == 1', {
825 'additional_multidex_config_options': ['--enable-multidex'],
826 }],
827 ],
818 }, 828 },
819 'action': [ 829 'action': [
820 'python', '<(DEPTH)/build/android/gyp/configure_multidex.py', 830 'python', '<(DEPTH)/build/android/gyp/configure_multidex.py',
821 '--configuration-name', '<(CONFIGURATION_NAME)', 831 '--configuration-name', '<(CONFIGURATION_NAME)',
822 '--enabled-configurations', '<(enabled_configurations)', 832 '--enabled-configurations', '<(enabled_configurations)',
823 '--multidex-configuration-path', '<(multidex_configuration_path)', 833 '--multidex-configuration-path', '<(multidex_configuration_path)',
834 '--multidex-config-java-template', '<(multidex_config_template)',
835 '--multidex-config-java-file', '<(multidex_config_java_file)',
836 '--multidex-config-java-stamp', '<(multidex_config_java_stamp)',
824 '>@(additional_multidex_config_options)', 837 '>@(additional_multidex_config_options)',
825 ], 838 ],
826 }, 839 },
827 ], 840 ],
841 'conditions': [
842 ['enable_multidex == 1', {
843 'actions': [
844 {
845 'action_name': 'main_dex_list_for_<(_target_name)',
846 'variables': {
847 'jar_paths': ['>@(input_jars_paths)', '<(javac_jar_path)'],
848 'output_path': '<(main_dex_list_path)',
849 },
850 'includes': [ 'android/main_dex_action.gypi' ],
851 },
852 ]
853 }]
854 ],
828 }], 855 }],
829 ], 856 ],
830 'dependencies': [ 857 'dependencies': [
831 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', 858 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum',
832 ], 859 ],
833 'actions': [ 860 'actions': [
834 { 861 {
835 'action_name': 'process_resources', 862 'action_name': 'process_resources',
836 'message': 'processing resources for <(_target_name)', 863 'message': 'processing resources for <(_target_name)',
837 'variables': { 864 'variables': {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
948 '<(DEPTH)/build/android/gyp/javac.py', 975 '<(DEPTH)/build/android/gyp/javac.py',
949 '>@(java_sources)', 976 '>@(java_sources)',
950 '>@(input_jars_paths)', 977 '>@(input_jars_paths)',
951 '<(codegen_stamp)', 978 '<(codegen_stamp)',
952 '<@(extra_inputs)', 979 '<@(extra_inputs)',
953 ], 980 ],
954 'conditions': [ 981 'conditions': [
955 ['native_lib_target != ""', { 982 ['native_lib_target != ""', {
956 'inputs': [ '<(native_libraries_java_stamp)' ], 983 'inputs': [ '<(native_libraries_java_stamp)' ],
957 }], 984 }],
985 ['generate_multidex_config == 1', {
986 'inputs': [ '<(multidex_config_java_stamp)' ],
987 }],
958 ], 988 ],
959 'outputs': [ 989 'outputs': [
960 '<(compile_stamp)', 990 '<(compile_stamp)',
961 '<(javac_jar_path)', 991 '<(javac_jar_path)',
962 ], 992 ],
963 'action': [ 993 'action': [
964 'python', '<(DEPTH)/build/android/gyp/javac.py', 994 'python', '<(DEPTH)/build/android/gyp/javac.py',
965 '--bootclasspath=<(android_sdk_jar)', 995 '--bootclasspath=<(android_sdk_jar)',
966 '--classpath=>(input_jars_paths) <(android_sdk_jar) >(library_jars_paths )', 996 '--classpath=>(input_jars_paths) <(android_sdk_jar) >(library_jars_paths )',
967 '--src-gendirs=>(gen_src_dirs)', 997 '--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)', 1237 'native_libs_dir': '<(apk_package_native_libs_dir)',
1208 }, { 1238 }, {
1209 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', 1239 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res',
1210 }], 1240 }],
1211 ], 1241 ],
1212 }, 1242 },
1213 'includes': ['android/apkbuilder_action.gypi'], 1243 'includes': ['android/apkbuilder_action.gypi'],
1214 }, 1244 },
1215 ], 1245 ],
1216 } 1246 }
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