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 # enable_errorprone: If true, enables the errorprone compiler. |
728 # | 729 # |
729 # datadeps, testonly | 730 # datadeps, testonly |
730 # | 731 # |
731 # Example | 732 # Example |
732 # java_binary("foo") { | 733 # java_binary("foo") { |
733 # java_files = [ "org/chromium/foo/FooMain.java" ] | 734 # java_files = [ "org/chromium/foo/FooMain.java" ] |
734 # deps = [ ":bar_java" ] | 735 # deps = [ ":bar_java" ] |
735 # main_class = "org.chromium.foo.FooMain" | 736 # main_class = "org.chromium.foo.FooMain" |
736 # } | 737 # } |
737 template("java_binary") { | 738 template("java_binary") { |
738 set_sources_assignment_filter([]) | 739 set_sources_assignment_filter([]) |
739 | 740 |
740 # TODO(cjhopman): This should not act like a java_library for dependents (i.e. | 741 # 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.). | 742 # dependents shouldn't get the jar in their classpath, etc.). |
742 java_library_impl(target_name) { | 743 java_library_impl(target_name) { |
743 if (defined(invoker.DEPRECATED_java_in_dir)) { | 744 if (defined(invoker.DEPRECATED_java_in_dir)) { |
744 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir | 745 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir |
745 } | 746 } |
746 if (defined(invoker.chromium_code)) { | 747 if (defined(invoker.chromium_code)) { |
747 chromium_code = invoker.chromium_code | 748 chromium_code = invoker.chromium_code |
748 } | 749 } |
749 if (defined(invoker.datadeps)) { | 750 if (defined(invoker.datadeps)) { |
750 deps = invoker.datadeps | 751 deps = invoker.datadeps |
751 } | 752 } |
752 if (defined(invoker.deps)) { | 753 if (defined(invoker.deps)) { |
753 deps = invoker.deps | 754 deps = invoker.deps |
754 } | 755 } |
| 756 if (defined(invoker.enable_errorprone)) { |
| 757 enable_errorprone = invoker.enable_errorprone |
| 758 } |
755 if (defined(invoker.java_files)) { | 759 if (defined(invoker.java_files)) { |
756 java_files = invoker.java_files | 760 java_files = invoker.java_files |
757 } | 761 } |
758 if (defined(invoker.srcjar_deps)) { | 762 if (defined(invoker.srcjar_deps)) { |
759 srcjar_deps = invoker.srcjar_deps | 763 srcjar_deps = invoker.srcjar_deps |
760 } | 764 } |
761 if (defined(invoker.srcjars)) { | 765 if (defined(invoker.srcjars)) { |
762 srcjars = invoker.srcjars | 766 srcjars = invoker.srcjars |
763 } | 767 } |
764 if (defined(invoker.bypass_platform_checks)) { | 768 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. | 843 # java_files: List of .java files included in this library. |
840 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 844 # 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. | 845 # 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 | 846 # srcjars: List of srcjars to be included in this library, together with the |
843 # ones obtained from srcjar_deps. | 847 # ones obtained from srcjar_deps. |
844 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 848 # 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 | 849 # 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. | 850 # ease the gyp->gn conversion and will be removed in the future. |
847 # | 851 # |
848 # chromium_code: If true, extra analysis warning/errors will be enabled. | 852 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 853 # enable_errorprone: If true, enables the errorprone compiler. |
| 854 # |
849 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 855 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
850 # final jar. | 856 # final jar. |
851 # | 857 # |
852 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 858 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
853 # be used to remove unwanted parts of the library. | 859 # be used to remove unwanted parts of the library. |
854 # proguard_config: Path to the proguard config for preprocessing. | 860 # proguard_config: Path to the proguard config for preprocessing. |
855 # | 861 # |
856 # supports_android: If true, Android targets (android_library, android_apk) | 862 # 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 | 863 # may depend on this target. Note: if true, this target must only use the |
858 # subset of Java available on Android. | 864 # subset of Java available on Android. |
(...skipping 28 matching lines...) Expand all Loading... |
887 } | 893 } |
888 if (defined(invoker.chromium_code)) { | 894 if (defined(invoker.chromium_code)) { |
889 chromium_code = invoker.chromium_code | 895 chromium_code = invoker.chromium_code |
890 } | 896 } |
891 if (defined(invoker.datadeps)) { | 897 if (defined(invoker.datadeps)) { |
892 deps = invoker.datadeps | 898 deps = invoker.datadeps |
893 } | 899 } |
894 if (defined(invoker.deps)) { | 900 if (defined(invoker.deps)) { |
895 deps = invoker.deps | 901 deps = invoker.deps |
896 } | 902 } |
| 903 if (defined(invoker.enable_errorprone)) { |
| 904 enable_errorprone = invoker.enable_errorprone |
| 905 } |
897 if (defined(invoker.jar_excluded_patterns)) { | 906 if (defined(invoker.jar_excluded_patterns)) { |
898 jar_excluded_patterns = invoker.jar_excluded_patterns | 907 jar_excluded_patterns = invoker.jar_excluded_patterns |
899 } | 908 } |
900 if (defined(invoker.java_files)) { | 909 if (defined(invoker.java_files)) { |
901 java_files = invoker.java_files | 910 java_files = invoker.java_files |
902 } | 911 } |
903 if (defined(invoker.proguard_config)) { | 912 if (defined(invoker.proguard_config)) { |
904 proguard_config = invoker.proguard_config | 913 proguard_config = invoker.proguard_config |
905 } | 914 } |
906 if (defined(invoker.proguard_preprocess)) { | 915 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. | 987 # java_files: List of .java files included in this library. |
979 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 988 # 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. | 989 # 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 | 990 # srcjars: List of srcjars to be included in this library, together with the |
982 # ones obtained from srcjar_deps. | 991 # ones obtained from srcjar_deps. |
983 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 992 # 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 | 993 # 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. | 994 # ease the gyp->gn conversion and will be removed in the future. |
986 # | 995 # |
987 # chromium_code: If true, extra analysis warning/errors will be enabled. | 996 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 997 # enable_errorprone: If true, enables the errorprone compiler. |
| 998 # |
988 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 999 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
989 # final jar. | 1000 # final jar. |
990 # | 1001 # |
991 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 1002 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
992 # be used to remove unwanted parts of the library. | 1003 # be used to remove unwanted parts of the library. |
993 # proguard_config: Path to the proguard config for preprocessing. | 1004 # proguard_config: Path to the proguard config for preprocessing. |
994 # | 1005 # |
995 # dex_path: If set, the resulting .dex.jar file will be placed under this | 1006 # dex_path: If set, the resulting .dex.jar file will be placed under this |
996 # path. | 1007 # path. |
997 # | 1008 # |
(...skipping 25 matching lines...) Expand all Loading... |
1023 } | 1034 } |
1024 if (defined(invoker.chromium_code)) { | 1035 if (defined(invoker.chromium_code)) { |
1025 chromium_code = invoker.chromium_code | 1036 chromium_code = invoker.chromium_code |
1026 } | 1037 } |
1027 if (defined(invoker.datadeps)) { | 1038 if (defined(invoker.datadeps)) { |
1028 deps = invoker.datadeps | 1039 deps = invoker.datadeps |
1029 } | 1040 } |
1030 if (defined(invoker.deps)) { | 1041 if (defined(invoker.deps)) { |
1031 deps = invoker.deps | 1042 deps = invoker.deps |
1032 } | 1043 } |
| 1044 if (defined(invoker.enable_errorprone)) { |
| 1045 enable_errorprone = invoker.enable_errorprone |
| 1046 } |
1033 if (defined(invoker.jar_excluded_patterns)) { | 1047 if (defined(invoker.jar_excluded_patterns)) { |
1034 jar_excluded_patterns = invoker.jar_excluded_patterns | 1048 jar_excluded_patterns = invoker.jar_excluded_patterns |
1035 } | 1049 } |
1036 if (defined(invoker.java_files)) { | 1050 if (defined(invoker.java_files)) { |
1037 java_files = invoker.java_files | 1051 java_files = invoker.java_files |
1038 } | 1052 } |
1039 if (defined(invoker.proguard_config)) { | 1053 if (defined(invoker.proguard_config)) { |
1040 proguard_config = invoker.proguard_config | 1054 proguard_config = invoker.proguard_config |
1041 } | 1055 } |
1042 if (defined(invoker.proguard_preprocess)) { | 1056 if (defined(invoker.proguard_preprocess)) { |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1803 template("uiautomator_test") { | 1817 template("uiautomator_test") { |
1804 set_sources_assignment_filter([]) | 1818 set_sources_assignment_filter([]) |
1805 if (defined(invoker.testonly)) { | 1819 if (defined(invoker.testonly)) { |
1806 testonly = invoker.testonly | 1820 testonly = invoker.testonly |
1807 } | 1821 } |
1808 assert(target_name != "") | 1822 assert(target_name != "") |
1809 assert(invoker.deps != [] || true) | 1823 assert(invoker.deps != [] || true) |
1810 group(target_name) { | 1824 group(target_name) { |
1811 } | 1825 } |
1812 } | 1826 } |
OLD | NEW |