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