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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 'package_input_paths': [], | 114 'package_input_paths': [], |
115 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', | 115 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', |
116 'additional_ordered_libraries_file': '<(intermediate_dir)/additional_native_
libraries.json', | 116 'additional_ordered_libraries_file': '<(intermediate_dir)/additional_native_
libraries.json', |
117 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib
raries.template', | 117 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib
raries.template', |
118 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', | 118 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', |
119 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.
java', | 119 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.
java', |
120 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', | 120 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', |
121 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/
', | 121 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/
', |
122 'native_libraries_template_data_file': '<(native_libraries_template_data_dir
)/native_libraries_array.h', | 122 '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', | 123 'native_libraries_template_version_file': '<(native_libraries_template_data_
dir)/native_libraries_version.h', |
| 124 'generate_multidex_config%': 0, |
| 125 'multidex_config_template': '<(DEPTH)/base/android/java/templates/ChromiumMu
ltiDex.template', |
| 126 'multidex_config_java_dir': '<(intermediate_dir)/multidex_config/', |
| 127 'multidex_config_java_file': '<(multidex_config_java_dir)/ChromiumMultiDex.j
ava', |
| 128 'multidex_config_java_stamp': '<(intermediate_dir)/multidex_config_java.stam
p', |
124 'compile_stamp': '<(intermediate_dir)/compile.stamp', | 129 'compile_stamp': '<(intermediate_dir)/compile.stamp', |
125 'lint_stamp': '<(intermediate_dir)/lint.stamp', | 130 'lint_stamp': '<(intermediate_dir)/lint.stamp', |
126 'lint_result': '<(intermediate_dir)/lint_result.xml', | 131 'lint_result': '<(intermediate_dir)/lint_result.xml', |
127 'lint_config': '<(intermediate_dir)/lint_config.xml', | 132 'lint_config': '<(intermediate_dir)/lint_config.xml', |
128 'never_lint%': 0, | 133 'never_lint%': 0, |
129 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp', | 134 'findbugs_stamp': '<(intermediate_dir)/findbugs.stamp', |
130 'run_findbugs%': 0, | 135 'run_findbugs%': 0, |
131 'java_in_dir_suffix%': '/src', | 136 'java_in_dir_suffix%': '/src', |
132 'emma_instr_stamp': '<(intermediate_dir)/emma_instr.stamp', | 137 'emma_instr_stamp': '<(intermediate_dir)/emma_instr.stamp', |
133 'jar_stamp': '<(intermediate_dir)/jar.stamp', | 138 'jar_stamp': '<(intermediate_dir)/jar.stamp', |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 'action': [ | 792 'action': [ |
788 'python', '<(DEPTH)/build/android/findbugs_diff.py', | 793 'python', '<(DEPTH)/build/android/findbugs_diff.py', |
789 '--auxclasspath-gyp', '>(input_jars_paths)', | 794 '--auxclasspath-gyp', '>(input_jars_paths)', |
790 '--stamp', '<(findbugs_stamp)', | 795 '--stamp', '<(findbugs_stamp)', |
791 '<@(additional_findbugs_args)', | 796 '<@(additional_findbugs_args)', |
792 '<(jar_path)', | 797 '<(jar_path)', |
793 ], | 798 ], |
794 }, | 799 }, |
795 ], | 800 ], |
796 }], | 801 }], |
797 ['enable_multidex == 1', { | 802 ], |
| 803 'target_conditions': [ |
| 804 ['generate_multidex_config == 1', { |
| 805 'variables': { |
| 806 'generated_src_dirs': ['<(multidex_config_java_dir)'], |
| 807 }, |
798 'actions': [ | 808 'actions': [ |
799 { | 809 { |
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)', | 810 'action_name': 'configure_multidex_for_<(_target_name)', |
809 'inputs': [ | 811 'inputs': [ |
810 '<(DEPTH)/build/android/gyp/configure_multidex.py', | 812 '<(DEPTH)/build/android/gyp/configure_multidex.py', |
| 813 '<(multidex_config_template)', |
811 ], | 814 ], |
812 'outputs': [ | 815 'outputs': [ |
813 '<(multidex_configuration_path)', | 816 '<(multidex_configuration_path)', |
| 817 '<(multidex_config_java_stamp)', |
814 ], | 818 ], |
815 'variables': { | 819 'variables': { |
816 'additional_multidex_config_options': [], | 820 'additional_multidex_config_options': [], |
817 'enabled_configurations': ['>@(enable_multidex_configurations)'], | 821 'enabled_configurations': '>(enable_multidex_configurations)', |
| 822 'conditions': [ |
| 823 ['enable_multidex == 1', { |
| 824 'additional_multidex_config_options': ['--enable-multidex'], |
| 825 }], |
| 826 ], |
818 }, | 827 }, |
819 'action': [ | 828 'action': [ |
820 'python', '<(DEPTH)/build/android/gyp/configure_multidex.py', | 829 'python', '<(DEPTH)/build/android/gyp/configure_multidex.py', |
821 '--configuration-name', '<(CONFIGURATION_NAME)', | 830 '--configuration-name', '<(CONFIGURATION_NAME)', |
822 '--enabled-configurations', '<(enabled_configurations)', | 831 '--enabled-configurations', '<(enabled_configurations)', |
823 '--multidex-configuration-path', '<(multidex_configuration_path)', | 832 '--multidex-configuration-path', '<(multidex_configuration_path)', |
| 833 '--multidex-config-java-template', '<(multidex_config_template)', |
| 834 '--multidex-config-java-file', '<(multidex_config_java_file)', |
| 835 '--multidex-config-java-stamp', '<(multidex_config_java_stamp)', |
824 '>@(additional_multidex_config_options)', | 836 '>@(additional_multidex_config_options)', |
825 ], | 837 ], |
826 }, | 838 }, |
827 ], | 839 ], |
| 840 'conditions': [ |
| 841 ['enable_multidex == 1', { |
| 842 'actions': [ |
| 843 { |
| 844 'action_name': 'main_dex_list_for_<(_target_name)', |
| 845 'variables': { |
| 846 'jar_paths': ['>@(input_jars_paths)', '<(javac_jar_path)'], |
| 847 'output_path': '<(main_dex_list_path)', |
| 848 }, |
| 849 'includes': [ 'android/main_dex_action.gypi' ], |
| 850 }, |
| 851 ] |
| 852 }] |
| 853 ], |
828 }], | 854 }], |
829 ], | 855 ], |
830 'dependencies': [ | 856 'dependencies': [ |
831 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', | 857 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', |
832 ], | 858 ], |
833 'actions': [ | 859 'actions': [ |
834 { | 860 { |
835 'action_name': 'process_resources', | 861 'action_name': 'process_resources', |
836 'message': 'processing resources for <(_target_name)', | 862 'message': 'processing resources for <(_target_name)', |
837 'variables': { | 863 'variables': { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 '<(DEPTH)/build/android/gyp/javac.py', | 974 '<(DEPTH)/build/android/gyp/javac.py', |
949 '>@(java_sources)', | 975 '>@(java_sources)', |
950 '>@(input_jars_paths)', | 976 '>@(input_jars_paths)', |
951 '<(codegen_stamp)', | 977 '<(codegen_stamp)', |
952 '<@(extra_inputs)', | 978 '<@(extra_inputs)', |
953 ], | 979 ], |
954 'conditions': [ | 980 'conditions': [ |
955 ['native_lib_target != ""', { | 981 ['native_lib_target != ""', { |
956 'inputs': [ '<(native_libraries_java_stamp)' ], | 982 'inputs': [ '<(native_libraries_java_stamp)' ], |
957 }], | 983 }], |
| 984 ['generate_multidex_config == 1', { |
| 985 'inputs': [ '<(multidex_config_java_stamp)' ], |
| 986 }], |
958 ], | 987 ], |
959 'outputs': [ | 988 'outputs': [ |
960 '<(compile_stamp)', | 989 '<(compile_stamp)', |
961 '<(javac_jar_path)', | 990 '<(javac_jar_path)', |
962 ], | 991 ], |
963 'action': [ | 992 'action': [ |
964 'python', '<(DEPTH)/build/android/gyp/javac.py', | 993 'python', '<(DEPTH)/build/android/gyp/javac.py', |
965 '--bootclasspath=<(android_sdk_jar)', | 994 '--bootclasspath=<(android_sdk_jar)', |
966 '--classpath=>(input_jars_paths) <(android_sdk_jar) >(library_jars_paths
)', | 995 '--classpath=>(input_jars_paths) <(android_sdk_jar) >(library_jars_paths
)', |
967 '--src-gendirs=>(gen_src_dirs)', | 996 '--src-gendirs=>(gen_src_dirs)', |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 'native_libs_dir': '<(apk_package_native_libs_dir)', | 1236 'native_libs_dir': '<(apk_package_native_libs_dir)', |
1208 }, { | 1237 }, { |
1209 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', | 1238 'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', |
1210 }], | 1239 }], |
1211 ], | 1240 ], |
1212 }, | 1241 }, |
1213 'includes': ['android/apkbuilder_action.gypi'], | 1242 'includes': ['android/apkbuilder_action.gypi'], |
1214 }, | 1243 }, |
1215 ], | 1244 ], |
1216 } | 1245 } |
OLD | NEW |