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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 ] | 612 ] |
613 }, | 613 }, |
614 { | 614 { |
615 'action_name': 'ant_obfuscate_<(_target_name)', | 615 'action_name': 'ant_obfuscate_<(_target_name)', |
616 'message': 'Obfuscating <(_target_name)', | 616 'message': 'Obfuscating <(_target_name)', |
617 'inputs': [ | 617 'inputs': [ |
618 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', | 618 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', |
619 '<(DEPTH)/build/android/ant/create-test-jar.js', | 619 '<(DEPTH)/build/android/ant/create-test-jar.js', |
620 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 620 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
621 '<(DEPTH)/build/android/gyp/ant.py', | 621 '<(DEPTH)/build/android/gyp/ant.py', |
| 622 '>@(proguard_flags_paths)', |
622 '<(instr_stamp)', | 623 '<(instr_stamp)', |
623 '>@(proguard_flags_paths)', | |
624 ], | 624 ], |
625 'outputs': [ | 625 'outputs': [ |
626 # This lists obfuscate_stamp instead of obfuscated_jar_path because | 626 # This lists obfuscate_stamp instead of obfuscated_jar_path because |
627 # ant only writes the latter if the md5 of the inputs changes. | 627 # ant only writes the latter if the md5 of the inputs changes. |
628 '<(obfuscate_stamp)', | 628 '<(obfuscate_stamp)', |
629 ], | 629 ], |
630 'action': [ | 630 'action': [ |
631 'python', '<(DEPTH)/build/android/gyp/ant.py', | 631 'python', '<(DEPTH)/build/android/gyp/ant.py', |
632 '-quiet', | 632 '-quiet', |
633 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', | 633 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
(...skipping 11 matching lines...) Expand all Loading... |
645 '-DOBFUSCATED_JAR_PATH=<(obfuscated_jar_path)', | 645 '-DOBFUSCATED_JAR_PATH=<(obfuscated_jar_path)', |
646 '-DOUT_DIR=<(intermediate_dir)', | 646 '-DOUT_DIR=<(intermediate_dir)', |
647 '-DPROGUARD_ENABLED=<(proguard_enabled)', | 647 '-DPROGUARD_ENABLED=<(proguard_enabled)', |
648 '-DPROGUARD_FLAGS=<(proguard_flags_paths)', | 648 '-DPROGUARD_FLAGS=<(proguard_flags_paths)', |
649 '-DTEST_JAR_PATH=<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', | 649 '-DTEST_JAR_PATH=<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar', |
650 | 650 |
651 '-DSTAMP=<(obfuscate_stamp)', | 651 '-DSTAMP=<(obfuscate_stamp)', |
652 '-Dbasedir=.', | 652 '-Dbasedir=.', |
653 '-buildfile', | 653 '-buildfile', |
654 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', | 654 '<(DEPTH)/build/android/ant/apk-obfuscate.xml', |
655 | |
656 # Add list of inputs to the command line, so if inputs change | |
657 # (e.g. if a Java file is removed), the command will be re-run. | |
658 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | |
659 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | |
660 ], | 655 ], |
661 }, | 656 }, |
662 { | 657 { |
663 'action_name': 'dex_<(_target_name)', | 658 'action_name': 'dex_<(_target_name)', |
664 'variables': { | 659 'variables': { |
665 'conditions': [ | 660 'conditions': [ |
666 ['emma_instrument != 0', { | 661 ['emma_instrument != 0', { |
667 'dex_no_locals': 1, | 662 'dex_no_locals': 1, |
668 }], | 663 }], |
669 ['emma_instrument != 0 and is_test_apk == 0', { | 664 ['emma_instrument != 0 and is_test_apk == 0', { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 '<(DEPTH)/build/android/ant/apk-package.xml', | 764 '<(DEPTH)/build/android/ant/apk-package.xml', |
770 | 765 |
771 # Add list of inputs to the command line, so if inputs change | 766 # Add list of inputs to the command line, so if inputs change |
772 # (e.g. if a Java file is removed), the command will be re-run. | 767 # (e.g. if a Java file is removed), the command will be re-run. |
773 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 768 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
774 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 769 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
775 ] | 770 ] |
776 }, | 771 }, |
777 ], | 772 ], |
778 } | 773 } |
OLD | NEW |