| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 # code. This allows a test APK to inject a Linker.TestRunner instance at | 54 # code. This allows a test APK to inject a Linker.TestRunner instance at |
| 55 # runtime. Should only be used by the content_linker_test_apk target!! | 55 # runtime. Should only be used by the content_linker_test_apk target!! |
| 56 { | 56 { |
| 57 'variables': { | 57 'variables': { |
| 58 'additional_input_paths': [], | 58 'additional_input_paths': [], |
| 59 'input_jars_paths': [], | 59 'input_jars_paths': [], |
| 60 'library_dexed_jars_paths': [], | 60 'library_dexed_jars_paths': [], |
| 61 'additional_src_dirs': [], | 61 'additional_src_dirs': [], |
| 62 'generated_src_dirs': [], | 62 'generated_src_dirs': [], |
| 63 'app_manifest_version_name%': '<(android_app_version_name)', | 63 'app_manifest_version_name%': '<(android_app_version_name)', |
| 64 'app_manifest_version_code%': '<(android_app_version_code)', | 64 'app_manifest_version_code%': '1', |
| 65 'proguard_enabled%': 'false', | 65 'proguard_enabled%': 'false', |
| 66 'proguard_flags_paths%': ['<(DEPTH)/build/android/empty_proguard.flags'], | 66 'proguard_flags_paths%': ['<(DEPTH)/build/android/empty_proguard.flags'], |
| 67 'jar_name': 'chromium_apk_<(_target_name).jar', | 67 'jar_name': 'chromium_apk_<(_target_name).jar', |
| 68 'resource_dir%':'<(DEPTH)/build/android/ant/empty/res', | 68 'resource_dir%':'<(DEPTH)/build/android/ant/empty/res', |
| 69 'R_package%':'', | 69 'R_package%':'', |
| 70 'additional_R_text_files': [], | 70 'additional_R_text_files': [], |
| 71 'additional_res_dirs': [], | 71 'additional_res_dirs': [], |
| 72 'additional_res_packages': [], | 72 'additional_res_packages': [], |
| 73 'is_test_apk%': 0, | 73 'is_test_apk%': 0, |
| 74 'java_strings_grd%': '', | 74 'java_strings_grd%': '', |
| 75 'library_manifest_paths' : [], | 75 'library_manifest_paths' : [], |
| 76 'resource_input_paths': [], | 76 'resource_input_paths': [], |
| 77 'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)', | 77 'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)', |
| 78 'asset_location%': '<(intermediate_dir)/assets', | 78 'asset_location%': '<(intermediate_dir)/assets', |
| 79 'codegen_stamp': '<(intermediate_dir)/codegen.stamp', | 79 'codegen_stamp': '<(intermediate_dir)/codegen.stamp', |
| 80 'compile_input_paths': [], | 80 'compile_input_paths': [], |
| 81 'package_input_paths': [], | 81 'package_input_paths': [], |
| 82 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', | 82 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', |
| 83 # TODO(cjhopman): build/ shouldn't refer to content/. The libraryloader and | 83 # TODO(cjhopman): build/ shouldn't refer to content/. The libraryloader and |
| 84 # nativelibraries template should be moved out of content/ (to base/?). | 84 # nativelibraries template should be moved out of content/ (to base/?). |
| 85 # http://crbug.com/225101 | 85 # http://crbug.com/225101 |
| 86 'native_libraries_template': '<(DEPTH)/content/public/android/java/templates
/NativeLibraries.template', | 86 'native_libraries_template': '<(DEPTH)/content/public/android/java/templates
/NativeLibraries.template', |
| 87 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', | 87 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', |
| 88 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.
java', | 88 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.
java', |
| 89 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', | 89 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', |
| 90 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/
', | 90 'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/
', |
| 91 'native_libraries_template_data_file': '<(native_libraries_template_data_dir
)/native_libraries_array.h', | 91 'native_libraries_template_data_file': '<(native_libraries_template_data_dir
)/native_libraries_array.h', |
| 92 'native_libraries_template_version_file': '<(native_libraries_template_data_
dir)/native_libraries_version.h', |
| 92 'native_libraries_template_data_stamp': '<(intermediate_dir)/native_librarie
s_template_data.stamp', | 93 'native_libraries_template_data_stamp': '<(intermediate_dir)/native_librarie
s_template_data.stamp', |
| 93 'compile_stamp': '<(intermediate_dir)/compile.stamp', | 94 'compile_stamp': '<(intermediate_dir)/compile.stamp', |
| 94 'instr_stamp': '<(intermediate_dir)/instr.stamp', | 95 'instr_stamp': '<(intermediate_dir)/instr.stamp', |
| 95 'jar_stamp': '<(intermediate_dir)/jar.stamp', | 96 'jar_stamp': '<(intermediate_dir)/jar.stamp', |
| 96 'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp', | 97 'obfuscate_stamp': '<(intermediate_dir)/obfuscate.stamp', |
| 97 'strip_stamp': '<(intermediate_dir)/strip.stamp', | 98 'strip_stamp': '<(intermediate_dir)/strip.stamp', |
| 98 'classes_dir': '<(intermediate_dir)/classes', | 99 'classes_dir': '<(intermediate_dir)/classes', |
| 99 'classes_final_dir': '<(intermediate_dir)/classes_instr', | 100 'classes_final_dir': '<(intermediate_dir)/classes_instr', |
| 100 'javac_includes': [], | 101 'javac_includes': [], |
| 101 'jar_excluded_classes': [], | 102 'jar_excluded_classes': [], |
| (...skipping 11 matching lines...) Expand all Loading... |
| 113 'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', | 114 'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', |
| 114 'source_dir': '<(java_in_dir)/src', | 115 'source_dir': '<(java_in_dir)/src', |
| 115 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', | 116 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', |
| 116 'device_intermediate_dir': '/data/local/tmp/chromium/<(_target_name)/<(CONFI
GURATION_NAME)', | 117 'device_intermediate_dir': '/data/local/tmp/chromium/<(_target_name)/<(CONFI
GURATION_NAME)', |
| 117 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', | 118 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', |
| 118 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh
', | 119 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh
', |
| 119 'create_standalone_apk%': 1, | 120 'create_standalone_apk%': 1, |
| 120 'variables': { | 121 'variables': { |
| 121 'variables': { | 122 'variables': { |
| 122 'native_lib_target%': '', | 123 'native_lib_target%': '', |
| 124 'native_lib_version_name%': '', |
| 123 'use_content_linker%': 0, | 125 'use_content_linker%': 0, |
| 124 'enable_content_linker_tests%': 0, | 126 'enable_content_linker_tests%': 0, |
| 125 'is_test_apk%': 0, | 127 'is_test_apk%': 0, |
| 126 }, | 128 }, |
| 127 'conditions': [ | 129 'conditions': [ |
| 128 ['gyp_managed_install == 1 and native_lib_target != ""', { | 130 ['gyp_managed_install == 1 and native_lib_target != ""', { |
| 129 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-stand
alone-unsigned.apk', | 131 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-stand
alone-unsigned.apk', |
| 130 }, { | 132 }, { |
| 131 'unsigned_standalone_apk_path': '<(unsigned_apk_path)', | 133 'unsigned_standalone_apk_path': '<(unsigned_apk_path)', |
| 132 }], | 134 }], |
| 133 ['gyp_managed_install == 1', { | 135 ['gyp_managed_install == 1', { |
| 134 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed', | 136 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed', |
| 135 }, { | 137 }, { |
| 136 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', | 138 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', |
| 137 }], | 139 }], |
| 138 ['is_test_apk == 0 and emma_coverage != 0', { | 140 ['is_test_apk == 0 and emma_coverage != 0', { |
| 139 'emma_instrument': 1, | 141 'emma_instrument': 1, |
| 140 },{ | 142 },{ |
| 141 'emma_instrument': 0, | 143 'emma_instrument': 0, |
| 142 }], | 144 }], |
| 143 ], | 145 ], |
| 144 }, | 146 }, |
| 145 'native_lib_target%': '', | 147 'native_lib_target%': '', |
| 148 'native_lib_version_name%': '', |
| 146 'use_content_linker%': 0, | 149 'use_content_linker%': 0, |
| 147 'enable_content_linker_tests%': 0, | 150 'enable_content_linker_tests%': 0, |
| 148 'emma_instrument': '<(emma_instrument)', | 151 'emma_instrument': '<(emma_instrument)', |
| 149 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', | 152 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', |
| 150 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', | 153 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', |
| 151 'extra_native_libs': [], | 154 'extra_native_libs': [], |
| 152 }, | 155 }, |
| 153 # Pass the jar path to the apk's "fake" jar target. This would be better as | 156 # Pass the jar path to the apk's "fake" jar target. This would be better as |
| 154 # direct_dependent_settings, but a variable set by a direct_dependent_settings | 157 # direct_dependent_settings, but a variable set by a direct_dependent_settings |
| 155 # cannot be lifted in a dependent to all_dependent_settings. | 158 # cannot be lifted in a dependent to all_dependent_settings. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 { | 236 { |
| 234 'action_name': 'native_libraries_template_data_<(_target_name)', | 237 'action_name': 'native_libraries_template_data_<(_target_name)', |
| 235 'message': 'Creating native_libraries_list.h for <(_target_name)', | 238 'message': 'Creating native_libraries_list.h for <(_target_name)', |
| 236 'inputs': [ | 239 'inputs': [ |
| 237 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 240 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 238 '<(DEPTH)/build/android/gyp/create_native_libraries_header.py', | 241 '<(DEPTH)/build/android/gyp/create_native_libraries_header.py', |
| 239 '<(ordered_libraries_file)', | 242 '<(ordered_libraries_file)', |
| 240 ], | 243 ], |
| 241 'outputs': [ | 244 'outputs': [ |
| 242 '<(native_libraries_template_data_stamp)', | 245 '<(native_libraries_template_data_stamp)', |
| 246 # '<(native_libraries_template_data_file)', |
| 247 # '<(native_libraries_template_version_file)', |
| 243 ], | 248 ], |
| 244 'action': [ | 249 'action': [ |
| 245 'python', '<(DEPTH)/build/android/gyp/create_native_libraries_header
.py', | 250 'python', '<(DEPTH)/build/android/gyp/create_native_libraries_header
.py', |
| 246 '--ordered-libraries=<(ordered_libraries_file)', | 251 '--ordered-libraries=<(ordered_libraries_file)', |
| 247 '--output=<(native_libraries_template_data_file)', | 252 '--version-name=<(native_lib_version_name)', |
| 253 '--array-output=<(native_libraries_template_data_file)', |
| 254 '--version-output=<(native_libraries_template_version_file)', |
| 248 '--stamp=<(native_libraries_template_data_stamp)', | 255 '--stamp=<(native_libraries_template_data_stamp)', |
| 249 ], | 256 ], |
| 250 }, | 257 }, |
| 251 { | 258 { |
| 252 'action_name': 'native_libraries_<(_target_name)', | 259 'action_name': 'native_libraries_<(_target_name)', |
| 253 'variables': { | 260 'variables': { |
| 254 'conditions': [ | 261 'conditions': [ |
| 255 ['use_content_linker == 1', { | 262 ['use_content_linker == 1', { |
| 256 'variables': { | 263 'variables': { |
| 257 'linker_gcc_preprocess_defines': [ | 264 'linker_gcc_preprocess_defines': [ |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 '<(DEPTH)/build/android/ant/apk-package.xml', | 749 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 743 | 750 |
| 744 # Add list of inputs to the command line, so if inputs change | 751 # Add list of inputs to the command line, so if inputs change |
| 745 # (e.g. if a Java file is removed), the command will be re-run. | 752 # (e.g. if a Java file is removed), the command will be re-run. |
| 746 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 753 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 747 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 754 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
| 748 ] | 755 ] |
| 749 }, | 756 }, |
| 750 ], | 757 ], |
| 751 } | 758 } |
| OLD | NEW |