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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 ], | 239 ], |
240 'conditions': [ | 240 'conditions': [ |
241 ['gyp_managed_install == 1', { | 241 ['gyp_managed_install == 1', { |
242 'variables': { | 242 'variables': { |
243 'libraries_top_dir': '<(intermediate_dir)/lib.stripped', | 243 'libraries_top_dir': '<(intermediate_dir)/lib.stripped', |
244 'libraries_source_dir': '<(libraries_top_dir)/lib/<(android_app_abi)
', | 244 'libraries_source_dir': '<(libraries_top_dir)/lib/<(android_app_abi)
', |
245 'device_library_dir': '<(device_intermediate_dir)/lib.stripped', | 245 'device_library_dir': '<(device_intermediate_dir)/lib.stripped', |
246 }, | 246 }, |
247 'dependencies': [ | 247 'dependencies': [ |
248 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', | 248 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', |
| 249 '<(DEPTH)/build/android/setup.gyp:get_build_device_configurations', |
249 ], | 250 ], |
250 'actions': [ | 251 'actions': [ |
251 { | 252 { |
252 'includes': ['../build/android/push_libraries.gypi'], | 253 'includes': ['../build/android/push_libraries.gypi'], |
253 }, | 254 }, |
254 { | 255 { |
255 'action_name': 'create device library symlinks', | 256 'action_name': 'create device library symlinks', |
256 'message': 'Creating links on device for <(_target_name).', | 257 'message': 'Creating links on device for <(_target_name).', |
257 'inputs': [ | 258 'inputs': [ |
258 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 259 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
259 '<(DEPTH)/build/android/gyp/create_device_library_links.py', | 260 '<(DEPTH)/build/android/gyp/create_device_library_links.py', |
260 '<(apk_install_record)', | 261 '<(apk_install_record)', |
| 262 '<(build_device_config_path)', |
261 '<(ordered_libraries_file)', | 263 '<(ordered_libraries_file)', |
262 ], | 264 ], |
263 'outputs': [ | 265 'outputs': [ |
264 '<(link_stamp)' | 266 '<(link_stamp)' |
265 ], | 267 ], |
266 'action': [ | 268 'action': [ |
267 'python', '<(DEPTH)/build/android/gyp/create_device_library_link
s.py', | 269 'python', '<(DEPTH)/build/android/gyp/create_device_library_link
s.py', |
| 270 '--build-device-configuration=<(build_device_config_path)', |
268 '--libraries-json=<(ordered_libraries_file)', | 271 '--libraries-json=<(ordered_libraries_file)', |
269 '--script-host-path=<(symlink_script_host_path)', | 272 '--script-host-path=<(symlink_script_host_path)', |
270 '--script-device-path=<(symlink_script_device_path)', | 273 '--script-device-path=<(symlink_script_device_path)', |
271 '--target-dir=<(device_library_dir)', | 274 '--target-dir=<(device_library_dir)', |
272 '--apk=<(incomplete_apk_path)', | 275 '--apk=<(incomplete_apk_path)', |
273 '--stamp=<(link_stamp)', | 276 '--stamp=<(link_stamp)', |
274 ], | 277 ], |
275 }, | 278 }, |
276 ], | 279 ], |
277 'conditions': [ | 280 'conditions': [ |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 'output_apk_path': '<(incomplete_apk_path)', | 349 'output_apk_path': '<(incomplete_apk_path)', |
347 }, | 350 }, |
348 'includes': [ 'android/finalize_apk_action.gypi'] | 351 'includes': [ 'android/finalize_apk_action.gypi'] |
349 }, | 352 }, |
350 { | 353 { |
351 'action_name': 'apk_install_<(_target_name)', | 354 'action_name': 'apk_install_<(_target_name)', |
352 'message': 'Installing <(apk_name).apk', | 355 'message': 'Installing <(apk_name).apk', |
353 'inputs': [ | 356 'inputs': [ |
354 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 357 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
355 '<(DEPTH)/build/android/gyp/apk_install.py', | 358 '<(DEPTH)/build/android/gyp/apk_install.py', |
| 359 '<(build_device_config_path)', |
356 '<(incomplete_apk_path)', | 360 '<(incomplete_apk_path)', |
357 ], | 361 ], |
358 'outputs': [ | 362 'outputs': [ |
359 '<(apk_install_record)', | 363 '<(apk_install_record)', |
360 # If a user switches the connected device, the APK may need to be | |
361 # installed even if there have been no changes. To ensure that the | |
362 # APK on the device is always up-to-date, this step should always | |
363 # be triggered. | |
364 '<(apk_install_record).fake', | |
365 ], | 364 ], |
366 'action': [ | 365 'action': [ |
367 'python', '<(DEPTH)/build/android/gyp/apk_install.py', | 366 'python', '<(DEPTH)/build/android/gyp/apk_install.py', |
368 '--android-sdk-tools=<(android_sdk_tools)', | 367 '--android-sdk-tools=<(android_sdk_tools)', |
369 '--apk-path=<(incomplete_apk_path)', | 368 '--apk-path=<(incomplete_apk_path)', |
370 '--install-record=<(apk_install_record)' | 369 '--build-device-configuration=<(build_device_config_path)', |
| 370 '--install-record=<(apk_install_record)', |
371 ], | 371 ], |
372 }, | 372 }, |
373 ], | 373 ], |
374 }], | 374 }], |
375 ], | 375 ], |
376 'actions': [ | 376 'actions': [ |
377 { | 377 { |
378 'action_name': 'ant_codegen_<(_target_name)', | 378 'action_name': 'ant_codegen_<(_target_name)', |
379 'message': 'Generating R.java for <(_target_name)', | 379 'message': 'Generating R.java for <(_target_name)', |
380 'conditions': [ | 380 'conditions': [ |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 '<(DEPTH)/build/android/ant/apk-package.xml', | 628 '<(DEPTH)/build/android/ant/apk-package.xml', |
629 | 629 |
630 # Add list of inputs to the command line, so if inputs change | 630 # Add list of inputs to the command line, so if inputs change |
631 # (e.g. if a Java file is removed), the command will be re-run. | 631 # (e.g. if a Java file is removed), the command will be re-run. |
632 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 632 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
633 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 633 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
634 ] | 634 ] |
635 }, | 635 }, |
636 ], | 636 ], |
637 } | 637 } |
OLD | NEW |