| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 357 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 358 '<(DEPTH)/build/android/gyp/apk_install.py', | 358 '<(DEPTH)/build/android/gyp/apk_install.py', |
| 359 '<(build_device_config_path)', | 359 '<(build_device_config_path)', |
| 360 '<(incomplete_apk_path)', | 360 '<(incomplete_apk_path)', |
| 361 ], | 361 ], |
| 362 'outputs': [ | 362 'outputs': [ |
| 363 '<(apk_install_record)', | 363 '<(apk_install_record)', |
| 364 ], | 364 ], |
| 365 'action': [ | 365 'action': [ |
| 366 'python', '<(DEPTH)/build/android/gyp/apk_install.py', | 366 'python', '<(DEPTH)/build/android/gyp/apk_install.py', |
| 367 '--android-sdk-tools=<(android_sdk_tools)', | |
| 368 '--apk-path=<(incomplete_apk_path)', | 367 '--apk-path=<(incomplete_apk_path)', |
| 369 '--build-device-configuration=<(build_device_config_path)', | 368 '--build-device-configuration=<(build_device_config_path)', |
| 370 '--install-record=<(apk_install_record)', | 369 '--install-record=<(apk_install_record)', |
| 371 ], | 370 ], |
| 372 }, | 371 }, |
| 373 ], | 372 ], |
| 374 }], | 373 }], |
| 375 ], | 374 ], |
| 376 'actions': [ | 375 'actions': [ |
| 377 { | 376 { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 401 'action': [ | 400 'action': [ |
| 402 'python', '<(DEPTH)/build/android/gyp/ant.py', | 401 'python', '<(DEPTH)/build/android/gyp/ant.py', |
| 403 '-quiet', | 402 '-quiet', |
| 404 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', | 403 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', |
| 405 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', | 404 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', |
| 406 '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)', | 405 '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)', |
| 407 '-DANDROID_MANIFEST=<(android_manifest_path)', | 406 '-DANDROID_MANIFEST=<(android_manifest_path)', |
| 408 '-DANDROID_SDK_JAR=<(android_sdk_jar)', | 407 '-DANDROID_SDK_JAR=<(android_sdk_jar)', |
| 409 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 408 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
| 410 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | 409 '-DANDROID_SDK_VERSION=<(android_sdk_version)', |
| 410 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
| 411 '-DLIBRARY_MANIFEST_PATHS=>(library_manifest_paths)', | 411 '-DLIBRARY_MANIFEST_PATHS=>(library_manifest_paths)', |
| 412 '-DOUT_DIR=<(intermediate_dir)', | 412 '-DOUT_DIR=<(intermediate_dir)', |
| 413 '-DRESOURCE_DIR=<(resource_dir)', | 413 '-DRESOURCE_DIR=<(resource_dir)', |
| 414 | 414 |
| 415 '-DSTAMP=<(codegen_stamp)', | 415 '-DSTAMP=<(codegen_stamp)', |
| 416 '-Dbasedir=.', | 416 '-Dbasedir=.', |
| 417 '-buildfile', | 417 '-buildfile', |
| 418 '<(DEPTH)/build/android/ant/apk-codegen.xml', | 418 '<(DEPTH)/build/android/ant/apk-codegen.xml', |
| 419 | 419 |
| 420 # Add list of inputs to the command line, so if inputs change | 420 # Add list of inputs to the command line, so if inputs change |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 'outputs': [ | 497 'outputs': [ |
| 498 '<(obfuscate_stamp)', | 498 '<(obfuscate_stamp)', |
| 499 ], | 499 ], |
| 500 'action': [ | 500 'action': [ |
| 501 'python', '<(DEPTH)/build/android/gyp/ant.py', | 501 'python', '<(DEPTH)/build/android/gyp/ant.py', |
| 502 '-quiet', | 502 '-quiet', |
| 503 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', | 503 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
| 504 '-DANDROID_SDK_JAR=<(android_sdk_jar)', | 504 '-DANDROID_SDK_JAR=<(android_sdk_jar)', |
| 505 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 505 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
| 506 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | 506 '-DANDROID_SDK_VERSION=<(android_sdk_version)', |
| 507 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
| 507 '-DAPK_NAME=<(apk_name)', | 508 '-DAPK_NAME=<(apk_name)', |
| 508 '-DCREATE_TEST_JAR_PATH=<(DEPTH)/build/android/ant/create-test-jar.js', | 509 '-DCREATE_TEST_JAR_PATH=<(DEPTH)/build/android/ant/create-test-jar.js', |
| 509 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', | 510 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', |
| 510 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', | 511 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', |
| 511 '-DINPUT_JARS_PATHS=>(input_jars_paths)', | 512 '-DINPUT_JARS_PATHS=>(input_jars_paths)', |
| 512 '-DIS_TEST_APK=<(is_test_apk)', | 513 '-DIS_TEST_APK=<(is_test_apk)', |
| 513 '-DJAR_PATH=<(PRODUCT_DIR)/lib.java/<(jar_name)', | 514 '-DJAR_PATH=<(PRODUCT_DIR)/lib.java/<(jar_name)', |
| 514 '-DOBFUSCATED_JAR_PATH=<(obfuscated_jar_path)', | 515 '-DOBFUSCATED_JAR_PATH=<(obfuscated_jar_path)', |
| 515 '-DOUT_DIR=<(intermediate_dir)', | 516 '-DOUT_DIR=<(intermediate_dir)', |
| 516 '-DPROGUARD_ENABLED=<(proguard_enabled)', | 517 '-DPROGUARD_ENABLED=<(proguard_enabled)', |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 '<(package_resources_stamp)', | 570 '<(package_resources_stamp)', |
| 570 ], | 571 ], |
| 571 'action': [ | 572 'action': [ |
| 572 'python', '<(DEPTH)/build/android/gyp/ant.py', | 573 'python', '<(DEPTH)/build/android/gyp/ant.py', |
| 573 '-quiet', | 574 '-quiet', |
| 574 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', | 575 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', |
| 575 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', | 576 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)', |
| 576 '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)', | 577 '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)', |
| 577 '-DANDROID_SDK_JAR=<(android_sdk_jar)', | 578 '-DANDROID_SDK_JAR=<(android_sdk_jar)', |
| 578 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 579 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
| 580 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
| 579 '-DAPK_NAME=<(apk_name)', | 581 '-DAPK_NAME=<(apk_name)', |
| 580 '-DAPP_MANIFEST_VERSION_CODE=<(app_manifest_version_code)', | 582 '-DAPP_MANIFEST_VERSION_CODE=<(app_manifest_version_code)', |
| 581 '-DAPP_MANIFEST_VERSION_NAME=<(app_manifest_version_name)', | 583 '-DAPP_MANIFEST_VERSION_NAME=<(app_manifest_version_name)', |
| 582 '-DASSET_DIR=<(asset_location)', | 584 '-DASSET_DIR=<(asset_location)', |
| 583 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', | 585 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', |
| 584 '-DOUT_DIR=<(intermediate_dir)', | 586 '-DOUT_DIR=<(intermediate_dir)', |
| 585 '-DRESOURCE_DIR=<(resource_dir)', | 587 '-DRESOURCE_DIR=<(resource_dir)', |
| 586 | 588 |
| 587 '-DSTAMP=<(package_resources_stamp)', | 589 '-DSTAMP=<(package_resources_stamp)', |
| 588 | 590 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 609 '<(package_resources_stamp)', | 611 '<(package_resources_stamp)', |
| 610 '>@(package_input_paths)', | 612 '>@(package_input_paths)', |
| 611 ], | 613 ], |
| 612 'outputs': [ | 614 'outputs': [ |
| 613 '<(unsigned_apk_path)', | 615 '<(unsigned_apk_path)', |
| 614 ], | 616 ], |
| 615 'action': [ | 617 'action': [ |
| 616 'python', '<(DEPTH)/build/android/gyp/ant.py', | 618 'python', '<(DEPTH)/build/android/gyp/ant.py', |
| 617 '-quiet', | 619 '-quiet', |
| 618 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 620 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
| 621 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
| 619 '-DAPK_NAME=<(apk_name)', | 622 '-DAPK_NAME=<(apk_name)', |
| 620 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', | 623 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', |
| 621 '-DNATIVE_LIBS_DIR=<(apk_package_native_libs_dir)', | 624 '-DNATIVE_LIBS_DIR=<(apk_package_native_libs_dir)', |
| 622 '-DOUT_DIR=<(intermediate_dir)', | 625 '-DOUT_DIR=<(intermediate_dir)', |
| 623 '-DSOURCE_DIR=<(source_dir)', | 626 '-DSOURCE_DIR=<(source_dir)', |
| 624 '-DUNSIGNED_APK_PATH=<(unsigned_apk_path)', | 627 '-DUNSIGNED_APK_PATH=<(unsigned_apk_path)', |
| 625 | 628 |
| 626 '-Dbasedir=.', | 629 '-Dbasedir=.', |
| 627 '-buildfile', | 630 '-buildfile', |
| 628 '<(DEPTH)/build/android/ant/apk-package.xml', | 631 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 629 | 632 |
| 630 # Add list of inputs to the command line, so if inputs change | 633 # 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. | 634 # (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. | 635 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 633 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 636 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
| 634 ] | 637 ] |
| 635 }, | 638 }, |
| 636 ], | 639 ], |
| 637 } | 640 } |
| OLD | NEW |