| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//base/android/linker/config.gni") | 5 import("//base/android/linker/config.gni") |
| 6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
| 7 import("//build/config/android/internal_rules.gni") | 7 import("//build/config/android/internal_rules.gni") |
| 8 import("//tools/grit/grit_rule.gni") | 8 import("//tools/grit/grit_rule.gni") |
| 9 import("//tools/relocation_packer/config.gni") | 9 import("//tools/relocation_packer/config.gni") |
| 10 | 10 |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 718 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
| 719 # will be added to java_files and be included in this library. | 719 # will be added to java_files and be included in this library. |
| 720 # srcjars: List of srcjars to be included in this library, together with the | 720 # srcjars: List of srcjars to be included in this library, together with the |
| 721 # ones obtained from srcjar_deps. | 721 # ones obtained from srcjar_deps. |
| 722 # | 722 # |
| 723 # bypass_platform_checks: Disables checks about cross-platform (Java/Android) | 723 # bypass_platform_checks: Disables checks about cross-platform (Java/Android) |
| 724 # dependencies for this target. This will allow depending on an | 724 # dependencies for this target. This will allow depending on an |
| 725 # android_library target, for example. | 725 # android_library target, for example. |
| 726 # | 726 # |
| 727 # chromium_code: If true, extra analysis warning/errors will be enabled. | 727 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 728 # disable_errorprone: If true, disables the errorprone compiler. Typically |
| 729 # only used on targets that crash with errorprone or when building the |
| 730 # errorprone compiler itself. |
| 728 # | 731 # |
| 729 # datadeps, testonly | 732 # datadeps, testonly |
| 730 # | 733 # |
| 731 # Example | 734 # Example |
| 732 # java_binary("foo") { | 735 # java_binary("foo") { |
| 733 # java_files = [ "org/chromium/foo/FooMain.java" ] | 736 # java_files = [ "org/chromium/foo/FooMain.java" ] |
| 734 # deps = [ ":bar_java" ] | 737 # deps = [ ":bar_java" ] |
| 735 # main_class = "org.chromium.foo.FooMain" | 738 # main_class = "org.chromium.foo.FooMain" |
| 736 # } | 739 # } |
| 737 template("java_binary") { | 740 template("java_binary") { |
| 738 set_sources_assignment_filter([]) | 741 set_sources_assignment_filter([]) |
| 739 | 742 |
| 740 # TODO(cjhopman): This should not act like a java_library for dependents (i.e. | 743 # TODO(cjhopman): This should not act like a java_library for dependents (i.e. |
| 741 # dependents shouldn't get the jar in their classpath, etc.). | 744 # dependents shouldn't get the jar in their classpath, etc.). |
| 742 java_library_impl(target_name) { | 745 java_library_impl(target_name) { |
| 743 if (defined(invoker.DEPRECATED_java_in_dir)) { | 746 if (defined(invoker.DEPRECATED_java_in_dir)) { |
| 744 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir | 747 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir |
| 745 } | 748 } |
| 746 if (defined(invoker.chromium_code)) { | 749 if (defined(invoker.chromium_code)) { |
| 747 chromium_code = invoker.chromium_code | 750 chromium_code = invoker.chromium_code |
| 748 } | 751 } |
| 749 if (defined(invoker.datadeps)) { | 752 if (defined(invoker.datadeps)) { |
| 750 deps = invoker.datadeps | 753 deps = invoker.datadeps |
| 751 } | 754 } |
| 752 if (defined(invoker.deps)) { | 755 if (defined(invoker.deps)) { |
| 753 deps = invoker.deps | 756 deps = invoker.deps |
| 754 } | 757 } |
| 758 if (defined(invoker.disable_errorprone)) { |
| 759 disable_errorprone = invoker.disable_errorprone |
| 760 } |
| 755 if (defined(invoker.java_files)) { | 761 if (defined(invoker.java_files)) { |
| 756 java_files = invoker.java_files | 762 java_files = invoker.java_files |
| 757 } | 763 } |
| 758 if (defined(invoker.srcjar_deps)) { | 764 if (defined(invoker.srcjar_deps)) { |
| 759 srcjar_deps = invoker.srcjar_deps | 765 srcjar_deps = invoker.srcjar_deps |
| 760 } | 766 } |
| 761 if (defined(invoker.srcjars)) { | 767 if (defined(invoker.srcjars)) { |
| 762 srcjars = invoker.srcjars | 768 srcjars = invoker.srcjars |
| 763 } | 769 } |
| 764 if (defined(invoker.bypass_platform_checks)) { | 770 if (defined(invoker.bypass_platform_checks)) { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 # java_files: List of .java files included in this library. | 845 # java_files: List of .java files included in this library. |
| 840 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 846 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
| 841 # will be added to java_files and be included in this library. | 847 # will be added to java_files and be included in this library. |
| 842 # srcjars: List of srcjars to be included in this library, together with the | 848 # srcjars: List of srcjars to be included in this library, together with the |
| 843 # ones obtained from srcjar_deps. | 849 # ones obtained from srcjar_deps. |
| 844 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 850 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in |
| 845 # this directory will be included in the library. This is only supported to | 851 # this directory will be included in the library. This is only supported to |
| 846 # ease the gyp->gn conversion and will be removed in the future. | 852 # ease the gyp->gn conversion and will be removed in the future. |
| 847 # | 853 # |
| 848 # chromium_code: If true, extra analysis warning/errors will be enabled. | 854 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 855 # disable_errorprone: If true, disables the errorprone compiler. Typically |
| 856 # only used on targets that crash with errorprone or when building the |
| 857 # errorprone compiler itself. |
| 858 # |
| 849 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 859 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
| 850 # final jar. | 860 # final jar. |
| 851 # | 861 # |
| 852 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 862 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
| 853 # be used to remove unwanted parts of the library. | 863 # be used to remove unwanted parts of the library. |
| 854 # proguard_config: Path to the proguard config for preprocessing. | 864 # proguard_config: Path to the proguard config for preprocessing. |
| 855 # | 865 # |
| 856 # supports_android: If true, Android targets (android_library, android_apk) | 866 # supports_android: If true, Android targets (android_library, android_apk) |
| 857 # may depend on this target. Note: if true, this target must only use the | 867 # may depend on this target. Note: if true, this target must only use the |
| 858 # subset of Java available on Android. | 868 # subset of Java available on Android. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 887 } | 897 } |
| 888 if (defined(invoker.chromium_code)) { | 898 if (defined(invoker.chromium_code)) { |
| 889 chromium_code = invoker.chromium_code | 899 chromium_code = invoker.chromium_code |
| 890 } | 900 } |
| 891 if (defined(invoker.datadeps)) { | 901 if (defined(invoker.datadeps)) { |
| 892 deps = invoker.datadeps | 902 deps = invoker.datadeps |
| 893 } | 903 } |
| 894 if (defined(invoker.deps)) { | 904 if (defined(invoker.deps)) { |
| 895 deps = invoker.deps | 905 deps = invoker.deps |
| 896 } | 906 } |
| 907 if (defined(invoker.disable_errorprone)) { |
| 908 disable_errorprone = invoker.disable_errorprone |
| 909 } |
| 897 if (defined(invoker.jar_excluded_patterns)) { | 910 if (defined(invoker.jar_excluded_patterns)) { |
| 898 jar_excluded_patterns = invoker.jar_excluded_patterns | 911 jar_excluded_patterns = invoker.jar_excluded_patterns |
| 899 } | 912 } |
| 900 if (defined(invoker.java_files)) { | 913 if (defined(invoker.java_files)) { |
| 901 java_files = invoker.java_files | 914 java_files = invoker.java_files |
| 902 } | 915 } |
| 903 if (defined(invoker.proguard_config)) { | 916 if (defined(invoker.proguard_config)) { |
| 904 proguard_config = invoker.proguard_config | 917 proguard_config = invoker.proguard_config |
| 905 } | 918 } |
| 906 if (defined(invoker.proguard_preprocess)) { | 919 if (defined(invoker.proguard_preprocess)) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 # java_files: List of .java files included in this library. | 991 # java_files: List of .java files included in this library. |
| 979 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 992 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
| 980 # will be added to java_files and be included in this library. | 993 # will be added to java_files and be included in this library. |
| 981 # srcjars: List of srcjars to be included in this library, together with the | 994 # srcjars: List of srcjars to be included in this library, together with the |
| 982 # ones obtained from srcjar_deps. | 995 # ones obtained from srcjar_deps. |
| 983 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 996 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in |
| 984 # this directory will be included in the library. This is only supported to | 997 # this directory will be included in the library. This is only supported to |
| 985 # ease the gyp->gn conversion and will be removed in the future. | 998 # ease the gyp->gn conversion and will be removed in the future. |
| 986 # | 999 # |
| 987 # chromium_code: If true, extra analysis warning/errors will be enabled. | 1000 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 1001 # disable_errorprone: If true, disables the errorprone compiler. Typically |
| 1002 # only used on targets that crash with errorprone or when building the |
| 1003 # errorprone compiler itself. |
| 1004 # |
| 988 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 1005 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
| 989 # final jar. | 1006 # final jar. |
| 990 # | 1007 # |
| 991 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 1008 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
| 992 # be used to remove unwanted parts of the library. | 1009 # be used to remove unwanted parts of the library. |
| 993 # proguard_config: Path to the proguard config for preprocessing. | 1010 # proguard_config: Path to the proguard config for preprocessing. |
| 994 # | 1011 # |
| 995 # dex_path: If set, the resulting .dex.jar file will be placed under this | 1012 # dex_path: If set, the resulting .dex.jar file will be placed under this |
| 996 # path. | 1013 # path. |
| 997 # | 1014 # |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1023 } | 1040 } |
| 1024 if (defined(invoker.chromium_code)) { | 1041 if (defined(invoker.chromium_code)) { |
| 1025 chromium_code = invoker.chromium_code | 1042 chromium_code = invoker.chromium_code |
| 1026 } | 1043 } |
| 1027 if (defined(invoker.datadeps)) { | 1044 if (defined(invoker.datadeps)) { |
| 1028 deps = invoker.datadeps | 1045 deps = invoker.datadeps |
| 1029 } | 1046 } |
| 1030 if (defined(invoker.deps)) { | 1047 if (defined(invoker.deps)) { |
| 1031 deps = invoker.deps | 1048 deps = invoker.deps |
| 1032 } | 1049 } |
| 1050 if (defined(invoker.disable_errorprone)) { |
| 1051 disable_errorprone = invoker.disable_errorprone |
| 1052 } |
| 1033 if (defined(invoker.jar_excluded_patterns)) { | 1053 if (defined(invoker.jar_excluded_patterns)) { |
| 1034 jar_excluded_patterns = invoker.jar_excluded_patterns | 1054 jar_excluded_patterns = invoker.jar_excluded_patterns |
| 1035 } | 1055 } |
| 1036 if (defined(invoker.java_files)) { | 1056 if (defined(invoker.java_files)) { |
| 1037 java_files = invoker.java_files | 1057 java_files = invoker.java_files |
| 1038 } | 1058 } |
| 1039 if (defined(invoker.proguard_config)) { | 1059 if (defined(invoker.proguard_config)) { |
| 1040 proguard_config = invoker.proguard_config | 1060 proguard_config = invoker.proguard_config |
| 1041 } | 1061 } |
| 1042 if (defined(invoker.proguard_preprocess)) { | 1062 if (defined(invoker.proguard_preprocess)) { |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 | 1568 |
| 1549 if (defined(invoker.apk_name)) { | 1569 if (defined(invoker.apk_name)) { |
| 1550 apk_name = invoker.apk_name | 1570 apk_name = invoker.apk_name |
| 1551 } else { | 1571 } else { |
| 1552 apk_name = test_suite_name | 1572 apk_name = test_suite_name |
| 1553 } | 1573 } |
| 1554 | 1574 |
| 1555 android_apk(target_name) { | 1575 android_apk(target_name) { |
| 1556 final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk" | 1576 final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk" |
| 1557 java_files = [ | 1577 java_files = [ |
| 1558 "//testing/android/native_test/java/src/org/chromium/native_test/NativeTes
tActivity.java", | 1578 "//testing/android/native_test/java/src/org/chromium/native_test/ChromeNat
iveTestActivity.java", |
| 1559 "//testing/android/native_test/java/src/org/chromium/native_test/NativeTes
tInstrumentationTestRunner.java", | 1579 "//testing/android/native_test/java/src/org/chromium/native_test/ChromeNat
iveTestInstrumentationTestRunner.java", |
| 1560 ] | 1580 ] |
| 1561 android_manifest = "//testing/android/native_test/java/AndroidManifest.xml" | 1581 android_manifest = "//testing/android/native_test/java/AndroidManifest.xml" |
| 1562 native_libs = [ unittests_binary ] | 1582 native_libs = [ unittests_binary ] |
| 1563 if (defined(invoker.asset_location)) { | 1583 if (defined(invoker.asset_location)) { |
| 1564 asset_location = invoker.asset_location | 1584 asset_location = invoker.asset_location |
| 1565 } | 1585 } |
| 1566 deps = [ | 1586 deps = [ |
| 1567 "//base:base_java", | 1587 "//base:base_java", |
| 1568 "//build/android/pylib/remote/device/dummy:remote_device_dummy_apk", | 1588 "//build/android/pylib/remote/device/dummy:remote_device_dummy_apk", |
| 1569 "//testing/android/appurify_support:appurify_support_java", | 1589 "//testing/android/appurify_support:appurify_support_java", |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1803 template("uiautomator_test") { | 1823 template("uiautomator_test") { |
| 1804 set_sources_assignment_filter([]) | 1824 set_sources_assignment_filter([]) |
| 1805 if (defined(invoker.testonly)) { | 1825 if (defined(invoker.testonly)) { |
| 1806 testonly = invoker.testonly | 1826 testonly = invoker.testonly |
| 1807 } | 1827 } |
| 1808 assert(target_name != "") | 1828 assert(target_name != "") |
| 1809 assert(invoker.deps != [] || true) | 1829 assert(invoker.deps != [] || true) |
| 1810 group(target_name) { | 1830 group(target_name) { |
| 1811 } | 1831 } |
| 1812 } | 1832 } |
| OLD | NEW |