OLD | NEW |
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 'package_input_paths': [], | 115 'package_input_paths': [], |
116 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', | 116 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', |
117 'additional_ordered_libraries_file': '<(intermediate_dir)/additional_native_
libraries.json', | 117 'additional_ordered_libraries_file': '<(intermediate_dir)/additional_native_
libraries.json', |
118 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib
raries.template', | 118 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib
raries.template', |
119 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', | 119 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', |
120 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.
java', | 120 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.
java', |
121 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', | 121 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', |
122 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/
', | 122 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/
', |
123 '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', |
124 '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, | 125 'generate_chromium_build_config%': 0, |
126 'multidex_config_template': '<(DEPTH)/base/android/java/templates/ChromiumMu
ltiDex.template', | 126 'chromium_build_config_template': '<(DEPTH)/base/android/java/templates/Chro
miumBuildConfig.template', |
127 'multidex_config_java_dir': '<(intermediate_dir)/multidex_config/', | 127 'chromium_build_config_java_dir': '<(intermediate_dir)/chromium_build_config
/', |
128 'multidex_config_java_file': '<(multidex_config_java_dir)/ChromiumMultiDex.j
ava', | 128 'chromium_build_config_java_file': '<(chromium_build_config_java_dir)/Chromi
umBuildConfig.java', |
129 'multidex_config_java_stamp': '<(intermediate_dir)/multidex_config_java.stam
p', | 129 'chromium_build_config_java_stamp': '<(intermediate_dir)/chromium_build_conf
ig_java.stamp', |
130 'compile_stamp': '<(intermediate_dir)/compile.stamp', | 130 'compile_stamp': '<(intermediate_dir)/compile.stamp', |
131 'lint_stamp': '<(intermediate_dir)/lint.stamp', | 131 'lint_stamp': '<(intermediate_dir)/lint.stamp', |
132 'lint_result': '<(intermediate_dir)/lint_result.xml', | 132 'lint_result': '<(intermediate_dir)/lint_result.xml', |
133 'lint_config': '<(intermediate_dir)/lint_config.xml', | 133 'lint_config': '<(intermediate_dir)/lint_config.xml', |
134 'never_lint%': 0, | 134 'never_lint%': 0, |
135 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp', | 135 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp', |
136 'run_findbugs%': 0, | 136 'run_findbugs%': 0, |
137 'java_in_dir_suffix%': '/src', | 137 'java_in_dir_suffix%': '/src', |
138 'emma_instr_stamp': '<(intermediate_dir)/emma_instr.stamp', | 138 'emma_instr_stamp': '<(intermediate_dir)/emma_instr.stamp', |
139 '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 Loading... |
265 'variables': { | 265 'variables': { |
266 'debug_build_proguard_enabled': 'true', | 266 'debug_build_proguard_enabled': 'true', |
267 } | 267 } |
268 }], | 268 }], |
269 ['is_test_apk == 0', { | 269 ['is_test_apk == 0', { |
270 'variables': { | 270 'variables': { |
271 'tested_apk_path': '<(final_apk_path)', | 271 'tested_apk_path': '<(final_apk_path)', |
272 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)', | 272 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)', |
273 'tested_apk_dex_path': '<(dex_path)', | 273 'tested_apk_dex_path': '<(dex_path)', |
274 'tested_apk_is_multidex': '<(enable_multidex)', | 274 'tested_apk_is_multidex': '<(enable_multidex)', |
275 'tested_apk_generated_multidex_config': '>(generate_multidex_config)', | 275 'tested_apk_generated_multidex_config': '>(generate_chromium_build_con
fig)', |
276 } | 276 } |
277 }] | 277 }] |
278 ], | 278 ], |
279 'variables': { | 279 'variables': { |
280 'apk_output_jar_path': '<(jar_path)', | 280 'apk_output_jar_path': '<(jar_path)', |
281 }, | 281 }, |
282 }, | 282 }, |
283 'conditions': [ | 283 'conditions': [ |
284 ['resource_dir!=""', { | 284 ['resource_dir!=""', { |
285 'variables': { | 285 'variables': { |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 '--auxclasspath-gyp', '>(input_jars_paths)', | 796 '--auxclasspath-gyp', '>(input_jars_paths)', |
797 '--stamp', '<(findbugs_stamp)', | 797 '--stamp', '<(findbugs_stamp)', |
798 '<@(additional_findbugs_args)', | 798 '<@(additional_findbugs_args)', |
799 '<(jar_path)', | 799 '<(jar_path)', |
800 ], | 800 ], |
801 }, | 801 }, |
802 ], | 802 ], |
803 }], | 803 }], |
804 ], | 804 ], |
805 'target_conditions': [ | 805 'target_conditions': [ |
806 ['generate_multidex_config == 1 and tested_apk_generated_multidex_config ==
0', { | 806 ['generate_chromium_build_config == 1 and tested_apk_generated_multidex_conf
ig == 0', { |
807 'variables': { | 807 'variables': { |
808 'generated_src_dirs': ['<(multidex_config_java_dir)'], | 808 'generated_src_dirs': ['<(chromium_build_config_java_dir)'], |
809 }, | 809 }, |
810 'actions': [ | 810 'actions': [ |
811 { | 811 { |
812 'action_name': 'configure_multidex_for_<(_target_name)', | 812 'action_name': 'configure_multidex_for_<(_target_name)', |
813 'inputs': [ | 813 'inputs': [ |
814 '<(DEPTH)/build/android/gyp/configure_multidex.py', | 814 '<(DEPTH)/build/android/gyp/configure_multidex.py', |
815 '<(multidex_config_template)', | 815 '<(chromium_build_config_template)', |
816 ], | 816 ], |
817 'outputs': [ | 817 'outputs': [ |
818 '<(multidex_configuration_path)', | 818 '<(multidex_configuration_path)', |
819 '<(multidex_config_java_stamp)', | 819 '<(chromium_build_config_java_stamp)', |
820 ], | 820 ], |
821 'variables': { | 821 'variables': { |
822 'additional_multidex_config_options': [], | 822 'additional_multidex_config_options': [], |
823 'enabled_configurations': '>(enable_multidex_configurations)', | 823 'enabled_configurations': '>(enable_multidex_configurations)', |
824 'conditions': [ | 824 'conditions': [ |
825 ['enable_multidex == 1', { | 825 ['enable_multidex == 1', { |
826 'additional_multidex_config_options': ['--enable-multidex'], | 826 'additional_multidex_config_options': ['--enable-multidex'], |
827 }], | 827 }], |
828 ], | 828 ], |
829 }, | 829 }, |
830 'action': [ | 830 'action': [ |
831 'python', '<(DEPTH)/build/android/gyp/configure_multidex.py', | 831 'python', '<(DEPTH)/build/android/gyp/configure_multidex.py', |
832 '--configuration-name', '<(CONFIGURATION_NAME)', | 832 '--configuration-name', '<(CONFIGURATION_NAME)', |
833 '--enabled-configurations', '<(enabled_configurations)', | 833 '--enabled-configurations', '<(enabled_configurations)', |
834 '--multidex-configuration-path', '<(multidex_configuration_path)', | 834 '--multidex-configuration-path', '<(multidex_configuration_path)', |
835 '--multidex-config-java-template', '<(multidex_config_template)', | 835 '--multidex-config-java-template', '<(chromium_build_config_template
)', |
836 '--multidex-config-java-file', '<(multidex_config_java_file)', | 836 '--multidex-config-java-file', '<(chromium_build_config_java_file)', |
837 '--multidex-config-java-stamp', '<(multidex_config_java_stamp)', | 837 '--multidex-config-java-stamp', '<(chromium_build_config_java_stamp)
', |
838 '>@(additional_multidex_config_options)', | 838 '>@(additional_multidex_config_options)', |
839 ], | 839 ], |
840 }, | 840 }, |
841 ], | 841 ], |
842 'conditions': [ | 842 'conditions': [ |
843 ['enable_multidex == 1', { | 843 ['enable_multidex == 1', { |
844 'actions': [ | 844 'actions': [ |
845 { | 845 { |
846 'action_name': 'main_dex_list_for_<(_target_name)', | 846 'action_name': 'main_dex_list_for_<(_target_name)', |
847 'variables': { | 847 'variables': { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 '>@(input_jars_paths)', | 978 '>@(input_jars_paths)', |
979 '<(codegen_stamp)', | 979 '<(codegen_stamp)', |
980 '<@(extra_inputs)', | 980 '<@(extra_inputs)', |
981 ], | 981 ], |
982 'conditions': [ | 982 'conditions': [ |
983 ['native_lib_target != ""', { | 983 ['native_lib_target != ""', { |
984 'inputs': [ '<(native_libraries_java_stamp)' ], | 984 'inputs': [ '<(native_libraries_java_stamp)' ], |
985 }], | 985 }], |
986 ], | 986 ], |
987 'target_conditions': [ | 987 'target_conditions': [ |
988 ['generate_multidex_config == 1 and tested_apk_generated_multidex_config
== 0', { | 988 ['generate_chromium_build_config == 1 and tested_apk_generated_multidex_
config == 0', { |
989 'inputs': [ '<(multidex_config_java_stamp)' ], | 989 'inputs': [ '<(chromium_build_config_java_stamp)' ], |
990 }], | 990 }], |
991 ], | 991 ], |
992 'outputs': [ | 992 'outputs': [ |
993 '<(compile_stamp)', | 993 '<(compile_stamp)', |
994 '<(javac_jar_path)', | 994 '<(javac_jar_path)', |
995 ], | 995 ], |
996 'action': [ | 996 'action': [ |
997 'python', '<(DEPTH)/build/android/gyp/javac.py', | 997 'python', '<(DEPTH)/build/android/gyp/javac.py', |
998 '--bootclasspath=<(android_sdk_jar)', | 998 '--bootclasspath=<(android_sdk_jar)', |
999 '--classpath=>(input_jars_paths) <(android_sdk_jar) >(library_jars_paths
)', | 999 '--classpath=>(input_jars_paths) <(android_sdk_jar) >(library_jars_paths
)', |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 'native_libs_dir': '<(apk_package_native_libs_dir)', | 1240 'native_libs_dir': '<(apk_package_native_libs_dir)', |
1241 }, { | 1241 }, { |
1242 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', | 1242 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', |
1243 }], | 1243 }], |
1244 ], | 1244 ], |
1245 }, | 1245 }, |
1246 'includes': ['android/apkbuilder_action.gypi'], | 1246 'includes': ['android/apkbuilder_action.gypi'], |
1247 }, | 1247 }, |
1248 ], | 1248 ], |
1249 } | 1249 } |
OLD | NEW |