| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 }], | 119 }], |
| 120 ['R_package != ""', { | 120 ['R_package != ""', { |
| 121 'variables': { | 121 'variables': { |
| 122 # We generate R.java in package R_package (in addition to the package | 122 # We generate R.java in package R_package (in addition to the package |
| 123 # listed in the AndroidManifest.xml, which is unavoidable). | 123 # listed in the AndroidManifest.xml, which is unavoidable). |
| 124 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], | 124 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], |
| 125 'additional_res_packages': ['<(R_package)'], | 125 'additional_res_packages': ['<(R_package)'], |
| 126 'additional_R_text_files': ['<(PRODUCT_DIR)/<(package_name)/R.txt'], | 126 'additional_R_text_files': ['<(PRODUCT_DIR)/<(package_name)/R.txt'], |
| 127 }, | 127 }, |
| 128 }], | 128 }], |
| 129 ['native_libs_paths != [] and component == "shared_library"', { |
| 130 'dependencies': [ |
| 131 '<(DEPTH)/build/android/setup.gyp:copy_system_libraries', |
| 132 ] |
| 133 }], |
| 129 ['native_libs_paths != []', { | 134 ['native_libs_paths != []', { |
| 130 'variables': { | 135 'variables': { |
| 131 'compile_input_paths': [ '<(native_libraries_java_stamp)' ], | 136 'compile_input_paths': [ '<(native_libraries_java_stamp)' ], |
| 132 'generated_src_dirs': [ '<(native_libraries_java_dir)' ], | 137 'generated_src_dirs': [ '<(native_libraries_java_dir)' ], |
| 133 }, | 138 }, |
| 134 'actions': [ | 139 'actions': [ |
| 135 { | 140 { |
| 136 'action_name': 'ordered_libraries_<(_target_name)', | 141 'action_name': 'ordered_libraries_<(_target_name)', |
| 137 'message': 'Writing dependency ordered libraries for <(_target_name).'
, | 142 'message': 'Writing dependency ordered libraries for <(_target_name).'
, |
| 138 'inputs': [ | 143 'inputs': [ |
| 139 '<(DEPTH)/build/android/pylib/build_utils.py', | 144 '<(DEPTH)/build/android/pylib/build_utils.py', |
| 140 '<(DEPTH)/build/android/write_ordered_libraries.py', | 145 '<(DEPTH)/build/android/gyp/write_ordered_libraries.py', |
| 141 '<@(native_libs_paths)', | 146 '<@(native_libs_paths)', |
| 142 ], | 147 ], |
| 143 'outputs': [ | 148 'outputs': [ |
| 144 '<(ordered_libraries_file)', | 149 '<(ordered_libraries_file)', |
| 145 ], | 150 ], |
| 146 'action': [ | 151 'action': [ |
| 147 'python', '<(DEPTH)/build/android/write_ordered_libraries.py', | 152 'python', '<(DEPTH)/build/android/gyp/write_ordered_libraries.py', |
| 148 '--input-libraries=<(native_libs_paths)', | 153 '--input-libraries=<(native_libs_paths)', |
| 154 '--readelf=<(android_readelf)', |
| 149 '--output=<(ordered_libraries_file)', | 155 '--output=<(ordered_libraries_file)', |
| 150 ], | 156 ], |
| 151 }, | 157 }, |
| 152 { | 158 { |
| 153 'action_name': 'native_libraries_template_data_<(_target_name)', | 159 'action_name': 'native_libraries_template_data_<(_target_name)', |
| 154 'message': 'Creating native_libraries_list.h for <(_target_name).', | 160 'message': 'Creating native_libraries_list.h for <(_target_name).', |
| 155 'inputs': [ | 161 'inputs': [ |
| 156 '<(DEPTH)/build/android/pylib/build_utils.py', | 162 '<(DEPTH)/build/android/pylib/build_utils.py', |
| 157 '<(DEPTH)/build/android/create_native_libraries_header.py', | 163 '<(DEPTH)/build/android/create_native_libraries_header.py', |
| 158 '<(ordered_libraries_file)', | 164 '<(ordered_libraries_file)', |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 | 549 |
| 544 # Add list of inputs to the command line, so if inputs change | 550 # Add list of inputs to the command line, so if inputs change |
| 545 # (e.g. if a Java file is removed), the command will be re-run. | 551 # (e.g. if a Java file is removed), the command will be re-run. |
| 546 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 552 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 547 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 553 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
| 548 | 554 |
| 549 ] | 555 ] |
| 550 }, | 556 }, |
| 551 ], | 557 ], |
| 552 } | 558 } |
| OLD | NEW |