| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', | 473 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', |
| 474 | 474 |
| 475 # Add list of inputs to the command line, so if inputs change | 475 # Add list of inputs to the command line, so if inputs change |
| 476 # (e.g. if a Java file is removed), the command will be re-run. | 476 # (e.g. if a Java file is removed), the command will be re-run. |
| 477 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 477 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 478 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 478 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
| 479 ], | 479 ], |
| 480 }, | 480 }, |
| 481 { | 481 { |
| 482 'action_name': 'dex_<(_target_name)', | 482 'action_name': 'dex_<(_target_name)', |
| 483 'message': 'Dexing <(_target_name) jar', | |
| 484 'variables': { | 483 'variables': { |
| 485 'conditions': [ | 484 'conditions': [ |
| 486 ['proguard_enabled=="true" and CONFIGURATION_NAME=="Release"', { | 485 ['proguard_enabled == "true"', { |
| 487 'dex_inputs': [ '<(obfuscated_jar_path)' ], | 486 'input_paths': [ '<(obfuscate_stamp)' ], |
| 488 'dex_generated_inputs': [], | 487 'proguard_enabled_input_path': '<(obfuscated_jar_path)', |
| 489 }, { | |
| 490 'dex_inputs': [ | |
| 491 '>@(library_dexed_jars_paths)', | |
| 492 ], | |
| 493 'dex_generated_inputs': [ | |
| 494 '<(classes_dir)', | |
| 495 ], | |
| 496 }], | 488 }], |
| 497 ], | 489 ], |
| 490 'input_paths': [ '<(compile_stamp)' ], |
| 491 'dex_input_paths': [ '>@(library_dexed_jars_paths)' ], |
| 492 'dex_generated_input_dirs': [ '<(classes_dir)' ], |
| 493 'output_path': '<(dex_path)', |
| 498 }, | 494 }, |
| 499 'inputs': [ | 495 'includes': [ 'android/dex_action.gypi' ], |
| 500 '<(DEPTH)/build/android/gyp/util/build_utils.py', | |
| 501 '<(DEPTH)/build/android/gyp/util/md5_check.py', | |
| 502 '<(DEPTH)/build/android/gyp/dex.py', | |
| 503 '<(compile_stamp)', | |
| 504 '>@(dex_inputs)', | |
| 505 ], | |
| 506 'outputs': [ | |
| 507 '<(dex_path)', | |
| 508 ], | |
| 509 'action': [ | |
| 510 'python', '<(DEPTH)/build/android/gyp/dex.py', | |
| 511 '--dex-path=<(dex_path)', | |
| 512 '--android-sdk-root=<(android_sdk_root)', | |
| 513 | |
| 514 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. | |
| 515 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | |
| 516 | |
| 517 '>@(dex_inputs)', | |
| 518 '>@(dex_generated_inputs)', | |
| 519 ] | |
| 520 }, | 496 }, |
| 521 { | 497 { |
| 522 'action_name': 'ant package resources', | 498 'action_name': 'ant package resources', |
| 523 'message': 'Packaging resources for <(_target_name) APK.', | 499 'message': 'Packaging resources for <(_target_name) APK.', |
| 524 'inputs': [ | 500 'inputs': [ |
| 525 '<(DEPTH)/build/android/ant/apk-package-resources.xml', | 501 '<(DEPTH)/build/android/ant/apk-package-resources.xml', |
| 526 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 502 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 527 '<(DEPTH)/build/android/gyp/ant.py', | 503 '<(DEPTH)/build/android/gyp/ant.py', |
| 528 '<(android_manifest_path)', | 504 '<(android_manifest_path)', |
| 529 '<(codegen_stamp)', | 505 '<(codegen_stamp)', |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 '--unsigned-apk-path=<(unsigned_apk_path)', | 600 '--unsigned-apk-path=<(unsigned_apk_path)', |
| 625 '--final-apk-path=<(final_apk_path)', | 601 '--final-apk-path=<(final_apk_path)', |
| 626 '--keystore-path=<(keystore_path)', | 602 '--keystore-path=<(keystore_path)', |
| 627 | 603 |
| 628 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 604 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 629 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 605 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
| 630 ], | 606 ], |
| 631 }, | 607 }, |
| 632 ], | 608 ], |
| 633 } | 609 } |
| OLD | NEW |