| 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 set_sources_assignment_filter([]) | 739 set_sources_assignment_filter([]) |
| 740 if (defined(invoker.testonly)) { | 740 if (defined(invoker.testonly)) { |
| 741 testonly = invoker.testonly | 741 testonly = invoker.testonly |
| 742 } | 742 } |
| 743 | 743 |
| 744 base_path = "$target_gen_dir/$target_name" | 744 base_path = "$target_gen_dir/$target_name" |
| 745 resources_zip = base_path + ".resources.zip" | 745 resources_zip = base_path + ".resources.zip" |
| 746 build_config = base_path + ".build_config" | 746 build_config = base_path + ".build_config" |
| 747 | 747 |
| 748 build_config_target_name = "${target_name}__build_config" | 748 build_config_target_name = "${target_name}__build_config" |
| 749 zip_target_name ="${target_name}__zip" | 749 zip_target_name = "${target_name}__zip" |
| 750 final_target_name = target_name | 750 final_target_name = target_name |
| 751 | 751 |
| 752 write_build_config(build_config_target_name) { | 752 write_build_config(build_config_target_name) { |
| 753 visibility = [ ":$zip_target_name" ] | 753 visibility = [ ":$zip_target_name" ] |
| 754 type = "android_resources" | 754 type = "android_resources" |
| 755 } | 755 } |
| 756 | 756 |
| 757 zip(zip_target_name) { | 757 zip(zip_target_name) { |
| 758 visibility = [ ":$final_target_name" ] | 758 visibility = [ ":$final_target_name" ] |
| 759 | 759 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 791 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
| 792 # will be added to java_files and be included in this library. | 792 # will be added to java_files and be included in this library. |
| 793 # srcjars: List of srcjars to be included in this library, together with the | 793 # srcjars: List of srcjars to be included in this library, together with the |
| 794 # ones obtained from srcjar_deps. | 794 # ones obtained from srcjar_deps. |
| 795 # | 795 # |
| 796 # bypass_platform_checks: Disables checks about cross-platform (Java/Android) | 796 # bypass_platform_checks: Disables checks about cross-platform (Java/Android) |
| 797 # dependencies for this target. This will allow depending on an | 797 # dependencies for this target. This will allow depending on an |
| 798 # android_library target, for example. | 798 # android_library target, for example. |
| 799 # | 799 # |
| 800 # chromium_code: If true, extra analysis warning/errors will be enabled. | 800 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 801 # enable_errorprone: If true, enables the errorprone compiler. |
| 801 # | 802 # |
| 802 # data_deps, testonly | 803 # data_deps, testonly |
| 803 # | 804 # |
| 804 # Example | 805 # Example |
| 805 # java_binary("foo") { | 806 # java_binary("foo") { |
| 806 # java_files = [ "org/chromium/foo/FooMain.java" ] | 807 # java_files = [ "org/chromium/foo/FooMain.java" ] |
| 807 # deps = [ ":bar_java" ] | 808 # deps = [ ":bar_java" ] |
| 808 # main_class = "org.chromium.foo.FooMain" | 809 # main_class = "org.chromium.foo.FooMain" |
| 809 # } | 810 # } |
| 810 template("java_binary") { | 811 template("java_binary") { |
| 811 set_sources_assignment_filter([]) | 812 set_sources_assignment_filter([]) |
| 812 | 813 |
| 813 # TODO(cjhopman): This should not act like a java_library for dependents (i.e. | 814 # TODO(cjhopman): This should not act like a java_library for dependents (i.e. |
| 814 # dependents shouldn't get the jar in their classpath, etc.). | 815 # dependents shouldn't get the jar in their classpath, etc.). |
| 815 java_library_impl(target_name) { | 816 java_library_impl(target_name) { |
| 816 if (defined(invoker.DEPRECATED_java_in_dir)) { | 817 if (defined(invoker.DEPRECATED_java_in_dir)) { |
| 817 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir | 818 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir |
| 818 } | 819 } |
| 819 if (defined(invoker.chromium_code)) { | 820 if (defined(invoker.chromium_code)) { |
| 820 chromium_code = invoker.chromium_code | 821 chromium_code = invoker.chromium_code |
| 821 } | 822 } |
| 822 if (defined(invoker.data_deps)) { | 823 if (defined(invoker.data_deps)) { |
| 823 deps = invoker.data_deps | 824 deps = invoker.data_deps |
| 824 } | 825 } |
| 825 if (defined(invoker.deps)) { | 826 if (defined(invoker.deps)) { |
| 826 deps = invoker.deps | 827 deps = invoker.deps |
| 827 } | 828 } |
| 829 if (defined(invoker.enable_errorprone)) { |
| 830 enable_errorprone = invoker.enable_errorprone |
| 831 } |
| 828 if (defined(invoker.java_files)) { | 832 if (defined(invoker.java_files)) { |
| 829 java_files = invoker.java_files | 833 java_files = invoker.java_files |
| 830 } | 834 } |
| 831 if (defined(invoker.srcjar_deps)) { | 835 if (defined(invoker.srcjar_deps)) { |
| 832 srcjar_deps = invoker.srcjar_deps | 836 srcjar_deps = invoker.srcjar_deps |
| 833 } | 837 } |
| 834 if (defined(invoker.srcjars)) { | 838 if (defined(invoker.srcjars)) { |
| 835 srcjars = invoker.srcjars | 839 srcjars = invoker.srcjars |
| 836 } | 840 } |
| 837 if (defined(invoker.bypass_platform_checks)) { | 841 if (defined(invoker.bypass_platform_checks)) { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 # java_files: List of .java files included in this library. | 916 # java_files: List of .java files included in this library. |
| 913 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 917 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
| 914 # will be added to java_files and be included in this library. | 918 # will be added to java_files and be included in this library. |
| 915 # srcjars: List of srcjars to be included in this library, together with the | 919 # srcjars: List of srcjars to be included in this library, together with the |
| 916 # ones obtained from srcjar_deps. | 920 # ones obtained from srcjar_deps. |
| 917 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 921 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in |
| 918 # this directory will be included in the library. This is only supported to | 922 # this directory will be included in the library. This is only supported to |
| 919 # ease the gyp->gn conversion and will be removed in the future. | 923 # ease the gyp->gn conversion and will be removed in the future. |
| 920 # | 924 # |
| 921 # chromium_code: If true, extra analysis warning/errors will be enabled. | 925 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 926 # enable_errorprone: If true, enables the errorprone compiler. |
| 927 # |
| 922 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 928 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
| 923 # final jar. | 929 # final jar. |
| 924 # | 930 # |
| 925 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 931 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
| 926 # be used to remove unwanted parts of the library. | 932 # be used to remove unwanted parts of the library. |
| 927 # proguard_config: Path to the proguard config for preprocessing. | 933 # proguard_config: Path to the proguard config for preprocessing. |
| 928 # | 934 # |
| 929 # supports_android: If true, Android targets (android_library, android_apk) | 935 # supports_android: If true, Android targets (android_library, android_apk) |
| 930 # may depend on this target. Note: if true, this target must only use the | 936 # may depend on this target. Note: if true, this target must only use the |
| 931 # subset of Java available on Android. | 937 # subset of Java available on Android. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 960 } | 966 } |
| 961 if (defined(invoker.chromium_code)) { | 967 if (defined(invoker.chromium_code)) { |
| 962 chromium_code = invoker.chromium_code | 968 chromium_code = invoker.chromium_code |
| 963 } | 969 } |
| 964 if (defined(invoker.data_deps)) { | 970 if (defined(invoker.data_deps)) { |
| 965 deps = invoker.data_deps | 971 deps = invoker.data_deps |
| 966 } | 972 } |
| 967 if (defined(invoker.deps)) { | 973 if (defined(invoker.deps)) { |
| 968 deps = invoker.deps | 974 deps = invoker.deps |
| 969 } | 975 } |
| 976 if (defined(invoker.enable_errorprone)) { |
| 977 enable_errorprone = invoker.enable_errorprone |
| 978 } |
| 970 if (defined(invoker.jar_excluded_patterns)) { | 979 if (defined(invoker.jar_excluded_patterns)) { |
| 971 jar_excluded_patterns = invoker.jar_excluded_patterns | 980 jar_excluded_patterns = invoker.jar_excluded_patterns |
| 972 } | 981 } |
| 973 if (defined(invoker.java_files)) { | 982 if (defined(invoker.java_files)) { |
| 974 java_files = invoker.java_files | 983 java_files = invoker.java_files |
| 975 } | 984 } |
| 976 if (defined(invoker.proguard_config)) { | 985 if (defined(invoker.proguard_config)) { |
| 977 proguard_config = invoker.proguard_config | 986 proguard_config = invoker.proguard_config |
| 978 } | 987 } |
| 979 if (defined(invoker.proguard_preprocess)) { | 988 if (defined(invoker.proguard_preprocess)) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 # java_files: List of .java files included in this library. | 1060 # java_files: List of .java files included in this library. |
| 1052 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 1061 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
| 1053 # will be added to java_files and be included in this library. | 1062 # will be added to java_files and be included in this library. |
| 1054 # srcjars: List of srcjars to be included in this library, together with the | 1063 # srcjars: List of srcjars to be included in this library, together with the |
| 1055 # ones obtained from srcjar_deps. | 1064 # ones obtained from srcjar_deps. |
| 1056 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 1065 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in |
| 1057 # this directory will be included in the library. This is only supported to | 1066 # this directory will be included in the library. This is only supported to |
| 1058 # ease the gyp->gn conversion and will be removed in the future. | 1067 # ease the gyp->gn conversion and will be removed in the future. |
| 1059 # | 1068 # |
| 1060 # chromium_code: If true, extra analysis warning/errors will be enabled. | 1069 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 1070 # enable_errorprone: If true, enables the errorprone compiler. |
| 1071 # |
| 1061 # jar_excluded_patterns: List of patterns of .class files to exclude from the | 1072 # jar_excluded_patterns: List of patterns of .class files to exclude from the |
| 1062 # final jar. | 1073 # final jar. |
| 1063 # | 1074 # |
| 1064 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 1075 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
| 1065 # be used to remove unwanted parts of the library. | 1076 # be used to remove unwanted parts of the library. |
| 1066 # proguard_config: Path to the proguard config for preprocessing. | 1077 # proguard_config: Path to the proguard config for preprocessing. |
| 1067 # | 1078 # |
| 1068 # dex_path: If set, the resulting .dex.jar file will be placed under this | 1079 # dex_path: If set, the resulting .dex.jar file will be placed under this |
| 1069 # path. | 1080 # path. |
| 1070 # | 1081 # |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1096 } | 1107 } |
| 1097 if (defined(invoker.chromium_code)) { | 1108 if (defined(invoker.chromium_code)) { |
| 1098 chromium_code = invoker.chromium_code | 1109 chromium_code = invoker.chromium_code |
| 1099 } | 1110 } |
| 1100 if (defined(invoker.data_deps)) { | 1111 if (defined(invoker.data_deps)) { |
| 1101 deps = invoker.data_deps | 1112 deps = invoker.data_deps |
| 1102 } | 1113 } |
| 1103 if (defined(invoker.deps)) { | 1114 if (defined(invoker.deps)) { |
| 1104 deps = invoker.deps | 1115 deps = invoker.deps |
| 1105 } | 1116 } |
| 1117 if (defined(invoker.enable_errorprone)) { |
| 1118 enable_errorprone = invoker.enable_errorprone |
| 1119 } |
| 1106 if (defined(invoker.jar_excluded_patterns)) { | 1120 if (defined(invoker.jar_excluded_patterns)) { |
| 1107 jar_excluded_patterns = invoker.jar_excluded_patterns | 1121 jar_excluded_patterns = invoker.jar_excluded_patterns |
| 1108 } | 1122 } |
| 1109 if (defined(invoker.java_files)) { | 1123 if (defined(invoker.java_files)) { |
| 1110 java_files = invoker.java_files | 1124 java_files = invoker.java_files |
| 1111 } | 1125 } |
| 1112 if (defined(invoker.proguard_config)) { | 1126 if (defined(invoker.proguard_config)) { |
| 1113 proguard_config = invoker.proguard_config | 1127 proguard_config = invoker.proguard_config |
| 1114 } | 1128 } |
| 1115 if (defined(invoker.proguard_preprocess)) { | 1129 if (defined(invoker.proguard_preprocess)) { |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2108 template("uiautomator_test") { | 2122 template("uiautomator_test") { |
| 2109 set_sources_assignment_filter([]) | 2123 set_sources_assignment_filter([]) |
| 2110 if (defined(invoker.testonly)) { | 2124 if (defined(invoker.testonly)) { |
| 2111 testonly = invoker.testonly | 2125 testonly = invoker.testonly |
| 2112 } | 2126 } |
| 2113 assert(target_name != "") | 2127 assert(target_name != "") |
| 2114 assert(invoker.deps != [] || true) | 2128 assert(invoker.deps != [] || true) |
| 2115 group(target_name) { | 2129 group(target_name) { |
| 2116 } | 2130 } |
| 2117 } | 2131 } |
| OLD | NEW |