Chromium Code Reviews| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 173 'load_library_from_zip_file%' : 0, | 173 'load_library_from_zip_file%' : 0, |
| 174 'use_relocation_packer%' : 0, | 174 'use_relocation_packer%' : 0, |
| 175 'enable_chromium_linker_tests%': 0, | 175 'enable_chromium_linker_tests%': 0, |
| 176 'emma_instrument%': '<(emma_instrument)', | 176 'emma_instrument%': '<(emma_instrument)', |
| 177 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', | 177 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', |
| 178 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', | 178 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', |
| 179 'libchromium_android_linker': 'libchromium_android_linker.>(android_product_ extension)', | 179 'libchromium_android_linker': 'libchromium_android_linker.>(android_product_ extension)', |
| 180 'extra_native_libs': [], | 180 'extra_native_libs': [], |
| 181 'native_lib_placeholder_stamp': '<(apk_package_native_libs_dir)/<(android_ap p_abi)/native_lib_placeholder.stamp', | 181 'native_lib_placeholder_stamp': '<(apk_package_native_libs_dir)/<(android_ap p_abi)/native_lib_placeholder.stamp', |
| 182 'native_lib_placeholders': [], | 182 'native_lib_placeholders': [], |
| 183 'disable_errorprone%': '0', | |
|
jbudorick
2015/05/07 18:49:27
If errorprone is enabled, this should add the erro
raywilliams_chromium
2015/05/11 19:52:25
added the condition
raywilliams_chromium
2015/05/11 19:52:25
Done.
| |
| 184 'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', | |
| 183 }, | 185 }, |
| 184 # Pass the jar path to the apk's "fake" jar target. This would be better as | 186 # Pass the jar path to the apk's "fake" jar target. This would be better as |
| 185 # direct_dependent_settings, but a variable set by a direct_dependent_settings | 187 # direct_dependent_settings, but a variable set by a direct_dependent_settings |
| 186 # cannot be lifted in a dependent to all_dependent_settings. | 188 # cannot be lifted in a dependent to all_dependent_settings. |
| 187 'all_dependent_settings': { | 189 'all_dependent_settings': { |
| 188 'conditions': [ | 190 'conditions': [ |
| 189 ['proguard_enabled == "true"', { | 191 ['proguard_enabled == "true"', { |
| 190 'variables': { | 192 'variables': { |
| 191 'proguard_enabled': 'true', | 193 'proguard_enabled': 'true', |
| 192 } | 194 } |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 661 # wrong .java files when additional_src_dirs is empty. | 663 # wrong .java files when additional_src_dirs is empty. |
| 662 # TODO(thakis): Gyp caches >! evaluation by command. Both java.gypi and | 664 # TODO(thakis): Gyp caches >! evaluation by command. Both java.gypi and |
| 663 # java_apk.gypi evaluate the same command, and at the moment two targets | 665 # java_apk.gypi evaluate the same command, and at the moment two targets |
| 664 # set java_in_dir to "java". Add a dummy comment here to make sure | 666 # set java_in_dir to "java". Add a dummy comment here to make sure |
| 665 # that the two targets (one uses java.gypi, the other java_apk.gypi) | 667 # that the two targets (one uses java.gypi, the other java_apk.gypi) |
| 666 # get distinct source lists. Medium-term, make targets list all their | 668 # get distinct source lists. Medium-term, make targets list all their |
| 667 # Java files instead of using find. (As is, this will be broken if two | 669 # Java files instead of using find. (As is, this will be broken if two |
| 668 # targets use the same java_in_dir and both use java_apk.gypi or | 670 # targets use the same java_in_dir and both use java_apk.gypi or |
| 669 # both use java.gypi.) | 671 # both use java.gypi.) |
| 670 'java_sources': ['>!@(find >(java_in_dir)>(java_in_dir_suffix) >(additio nal_src_dirs) -name "*.java" # apk)'], | 672 'java_sources': ['>!@(find >(java_in_dir)>(java_in_dir_suffix) >(additio nal_src_dirs) -name "*.java" # apk)'], |
| 671 | 673 'conditions': [ |
| 674 ['disable_errorprone == 0', { | |
| 675 'extra_inputs': [ | |
| 676 '<(errorprone_exe_path)', | |
| 677 ], | |
| 678 'extra_args': [ '--errorprone-path=<(errorprone_exe_path)' ], | |
| 679 }, { | |
| 680 'extra_inputs': [], | |
| 681 'extra_args': [ '--disable-errorprone' ], | |
| 682 }], | |
| 683 ], | |
| 672 }, | 684 }, |
| 673 'inputs': [ | 685 'inputs': [ |
| 674 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 686 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 675 '<(DEPTH)/build/android/gyp/javac.py', | 687 '<(DEPTH)/build/android/gyp/javac.py', |
| 676 '>@(java_sources)', | 688 '>@(java_sources)', |
| 677 '>@(input_jars_paths)', | 689 '>@(input_jars_paths)', |
| 678 '<(codegen_stamp)', | 690 '<(codegen_stamp)', |
| 691 '<@(extra_inputs)', | |
| 679 ], | 692 ], |
| 680 'conditions': [ | 693 'conditions': [ |
| 681 ['native_lib_target != ""', { | 694 ['native_lib_target != ""', { |
| 682 'inputs': [ '<(native_libraries_java_stamp)' ], | 695 'inputs': [ '<(native_libraries_java_stamp)' ], |
| 683 }], | 696 }], |
| 684 ], | 697 ], |
| 685 'outputs': [ | 698 'outputs': [ |
| 686 '<(compile_stamp)', | 699 '<(compile_stamp)', |
| 687 '<(javac_jar_path)', | 700 '<(javac_jar_path)', |
| 688 ], | 701 ], |
| 689 'action': [ | 702 'action': [ |
| 690 'python', '<(DEPTH)/build/android/gyp/javac.py', | 703 'python', '<(DEPTH)/build/android/gyp/javac.py', |
| 691 '--classpath=>(input_jars_paths) <(android_sdk_jar)', | 704 '--classpath=>(input_jars_paths) <(android_sdk_jar)', |
| 692 '--src-gendirs=>(gen_src_dirs)', | 705 '--src-gendirs=>(gen_src_dirs)', |
| 693 '--javac-includes=<(javac_includes)', | 706 '--javac-includes=<(javac_includes)', |
| 694 '--chromium-code=<(chromium_code)', | 707 '--chromium-code=<(chromium_code)', |
| 695 '--jar-path=<(javac_jar_path)', | 708 '--jar-path=<(javac_jar_path)', |
| 696 '--jar-excluded-classes=<(jar_excluded_classes)', | 709 '--jar-excluded-classes=<(jar_excluded_classes)', |
| 697 '--stamp=<(compile_stamp)', | 710 '--stamp=<(compile_stamp)', |
| 711 '<@(extra_args)', | |
| 698 '>@(java_sources)', | 712 '>@(java_sources)', |
| 699 ], | 713 ], |
| 700 }, | 714 }, |
| 701 { | 715 { |
| 702 'action_name': 'instr_jar_<(_target_name)', | 716 'action_name': 'instr_jar_<(_target_name)', |
| 703 'message': 'Instrumenting <(_target_name) jar', | 717 'message': 'Instrumenting <(_target_name) jar', |
| 704 'variables': { | 718 'variables': { |
| 705 'input_path': '<(javac_jar_path)', | 719 'input_path': '<(javac_jar_path)', |
| 706 'output_path': '<(jar_path)', | 720 'output_path': '<(jar_path)', |
| 707 'stamp_path': '<(instr_stamp)', | 721 'stamp_path': '<(instr_stamp)', |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 799 | 813 |
| 800 '--configuration-name', '<(CONFIGURATION_NAME)', | 814 '--configuration-name', '<(CONFIGURATION_NAME)', |
| 801 | 815 |
| 802 '--android-sdk', '<(android_sdk)', | 816 '--android-sdk', '<(android_sdk)', |
| 803 '--android-sdk-tools', '<(android_sdk_tools)', | 817 '--android-sdk-tools', '<(android_sdk_tools)', |
| 804 '--android-sdk-jar', '<(android_sdk_jar)', | 818 '--android-sdk-jar', '<(android_sdk_jar)', |
| 805 | 819 |
| 806 '--input-jars-paths=>(proguard_input_jar_paths)', | 820 '--input-jars-paths=>(proguard_input_jar_paths)', |
| 807 '--proguard-configs=>(proguard_flags_paths)', | 821 '--proguard-configs=>(proguard_flags_paths)', |
| 808 | 822 |
| 823 | |
| 809 '--test-jar-path', '<(test_jar_path)', | 824 '--test-jar-path', '<(test_jar_path)', |
| 810 '--obfuscated-jar-path', '<(obfuscated_jar_path)', | 825 '--obfuscated-jar-path', '<(obfuscated_jar_path)', |
| 811 | 826 |
| 812 '--proguard-jar-path', '<(android_sdk_root)/tools/proguard/lib/proguard. jar', | 827 '--proguard-jar-path', '<(android_sdk_root)/tools/proguard/lib/proguard. jar', |
| 813 | 828 |
| 814 '--stamp', '<(obfuscate_stamp)', | 829 '--stamp', '<(obfuscate_stamp)', |
| 815 | 830 |
| 816 '>@(additional_obfuscate_options)', | 831 '>@(additional_obfuscate_options)', |
| 817 ], | 832 ], |
| 818 }, | 833 }, |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 953 '-DEMMA_INSTRUMENT=<(emma_instrument)', | 968 '-DEMMA_INSTRUMENT=<(emma_instrument)', |
| 954 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', | 969 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', |
| 955 | 970 |
| 956 '-Dbasedir=.', | 971 '-Dbasedir=.', |
| 957 '-buildfile', | 972 '-buildfile', |
| 958 '<(DEPTH)/build/android/ant/apk-package.xml', | 973 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 959 ] | 974 ] |
| 960 }, | 975 }, |
| 961 ], | 976 ], |
| 962 } | 977 } |
| OLD | NEW |