| 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 'dependencies': [ | 426 'dependencies': [ |
| 427 '<(DEPTH)/tools/android/android_tools.gyp:android_tools', | 427 '<(DEPTH)/tools/android/android_tools.gyp:android_tools', |
| 428 ] | 428 ] |
| 429 }], | 429 }], |
| 430 ], | 430 ], |
| 431 'dependencies': [ | 431 'dependencies': [ |
| 432 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', | 432 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', |
| 433 ], | 433 ], |
| 434 'actions': [ | 434 'actions': [ |
| 435 { | 435 { |
| 436 'action_name': 'ant_codegen_<(_target_name)', | 436 'action_name': 'process_resources', |
| 437 'message': 'Generating R.java for <(_target_name)', | 437 'message': 'processing resources for <(_target_name)', |
| 438 'variables': { |
| 439 # Write the inputs list to a file, so that its mtime is updated when |
| 440 # the list of inputs changes. |
| 441 'inputs_list_file': '>|(apk_codegen.<(_target_name).gypcmd >@(additional
_input_paths) >@(resource_input_paths))', |
| 442 'resource_additional_options': [], |
| 443 }, |
| 438 'conditions': [ | 444 'conditions': [ |
| 439 ['is_test_apk == 1', { | 445 ['is_test_apk == 1', { |
| 440 'variables': { | 446 'variables': { |
| 441 'additional_res_dirs=': [], | 447 'additional_res_dirs=': [], |
| 442 'additional_res_packages=': [], | 448 'additional_res_packages=': [], |
| 443 } | 449 } |
| 444 }], | 450 }], |
| 445 ], | 451 ], |
| 446 'variables': { | |
| 447 # Write the inputs list to a file, so that its mtime is updated when | |
| 448 # the list of inputs changes. | |
| 449 'inputs_list_file': '>|(apk_codegen.<(_target_name).gypcmd >@(additional
_input_paths) >@(resource_input_paths))' | |
| 450 }, | |
| 451 'inputs': [ | 452 'inputs': [ |
| 452 '<(DEPTH)/build/android/ant/apk-codegen.xml', | |
| 453 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 453 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 454 '<(DEPTH)/build/android/gyp/ant.py', | 454 '<(DEPTH)/build/android/gyp/process_resources.py', |
| 455 '<(android_manifest_path)', | 455 '<(android_manifest_path)', |
| 456 '>@(additional_input_paths)', | 456 '>@(additional_input_paths)', |
| 457 '>@(resource_input_paths)', | 457 '>@(resource_input_paths)', |
| 458 '>(inputs_list_file)', | 458 '>(inputs_list_file)', |
| 459 ], | 459 ], |
| 460 'outputs': [ | 460 'outputs': [ |
| 461 '<(codegen_stamp)', | 461 '<(codegen_stamp)', |
| 462 ], | 462 ], |
| 463 'action': [ | 463 'action': [ |
| 464 'python', '<(DEPTH)/build/android/gyp/ant.py', | 464 'python', '<(DEPTH)/build/android/gyp/process_resources.py', |
| 465 '-quiet', | 465 '--android-sdk', '<(android_sdk)', |
| 466 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', | 466 '--android-sdk-tools', '<(android_sdk_tools)', |
| 467 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', | |
| 468 '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)', | |
| 469 '-DANDROID_MANIFEST=<(android_manifest_path)', | |
| 470 '-DANDROID_SDK_JAR=<(android_sdk_jar)', | |
| 471 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | |
| 472 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | |
| 473 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', | |
| 474 '-DOUT_DIR=<(intermediate_dir)', | |
| 475 '-DRESOURCE_DIR=<(resource_dir)', | |
| 476 | 467 |
| 477 '-DSTAMP=<(codegen_stamp)', | 468 '--android-manifest', '<(android_manifest_path)', |
| 478 '-Dbasedir=.', | 469 '--dependencies-res-dirs', '>(additional_res_dirs)', |
| 479 '-buildfile', | 470 |
| 480 '<(DEPTH)/build/android/ant/apk-codegen.xml', | 471 '--extra-res-packages', '>(additional_res_packages)', |
| 472 '--extra-r-text-files', '>(additional_R_text_files)', |
| 473 |
| 474 '--resource-dir', '<(resource_dir)', |
| 475 '--crunch-output-dir', '<(intermediate_dir)/res', |
| 476 |
| 477 '--R-dir', '<(intermediate_dir)/gen', |
| 478 |
| 479 '--stamp', '<(codegen_stamp)', |
| 481 ], | 480 ], |
| 482 }, | 481 }, |
| 483 { | 482 { |
| 484 'action_name': 'javac_<(_target_name)', | 483 'action_name': 'javac_<(_target_name)', |
| 485 'message': 'Compiling java for <(_target_name)', | 484 'message': 'Compiling java for <(_target_name)', |
| 486 'variables': { | 485 'variables': { |
| 487 'gen_src_dirs': [ | 486 'gen_src_dirs': [ |
| 488 '<(intermediate_dir)/gen', | 487 '<(intermediate_dir)/gen', |
| 489 '>@(generated_src_dirs)', | 488 '>@(generated_src_dirs)', |
| 490 ], | 489 ], |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 '-DEMMA_INSTRUMENT=<(emma_instrument)', | 725 '-DEMMA_INSTRUMENT=<(emma_instrument)', |
| 727 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', | 726 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', |
| 728 | 727 |
| 729 '-Dbasedir=.', | 728 '-Dbasedir=.', |
| 730 '-buildfile', | 729 '-buildfile', |
| 731 '<(DEPTH)/build/android/ant/apk-package.xml', | 730 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 732 ] | 731 ] |
| 733 }, | 732 }, |
| 734 ], | 733 ], |
| 735 } | 734 } |
| OLD | NEW |