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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 package_output_dir = "${base_output_dir}/${jni_package}" | 42 package_output_dir = "${base_output_dir}/${jni_package}" |
43 jni_output_dir = "${package_output_dir}/jni" | 43 jni_output_dir = "${package_output_dir}/jni" |
44 | 44 |
45 jni_generator_include = "//base/android/jni_generator/jni_generator_helper.h" | 45 jni_generator_include = "//base/android/jni_generator/jni_generator_helper.h" |
46 | 46 |
47 foreach_target_name = "${target_name}__jni_gen" | 47 foreach_target_name = "${target_name}__jni_gen" |
48 action_foreach(foreach_target_name) { | 48 action_foreach(foreach_target_name) { |
49 script = "//base/android/jni_generator/jni_generator.py" | 49 script = "//base/android/jni_generator/jni_generator.py" |
50 depfile = "$target_gen_dir/$target_name.{{source_name_part}}.d" | 50 depfile = "$target_gen_dir/$target_name.{{source_name_part}}.d" |
51 sources = invoker.sources | 51 sources = invoker.sources |
52 inputs = [ | |
53 jni_generator_include, | |
54 ] | |
55 outputs = [ | 52 outputs = [ |
56 depfile, | 53 depfile, |
57 "${jni_output_dir}/{{source_name_part}}_jni.h", | 54 "${jni_output_dir}/{{source_name_part}}_jni.h", |
58 ] | 55 ] |
59 | 56 |
60 args = [ | 57 args = [ |
61 "--depfile", | 58 "--depfile", |
62 rebase_path(depfile, root_build_dir), | 59 rebase_path(depfile, root_build_dir), |
63 "--input_file={{source}}", | 60 "--input_file={{source}}", |
64 "--optimize_generation=1", | 61 "--optimize_generation=1", |
65 "--ptr_type=long", | 62 "--ptr_type=long", |
66 "--output_dir", | 63 "--output_dir", |
67 rebase_path(jni_output_dir, root_build_dir), | 64 rebase_path(jni_output_dir, root_build_dir), |
68 "--includes", | 65 "--includes", |
69 rebase_path(jni_generator_include, "//"), | 66 rebase_path(jni_generator_include, jni_output_dir), |
70 "--native_exports_optional", | 67 "--native_exports_optional", |
71 ] | 68 ] |
72 if (defined(invoker.jni_generator_jarjar_file)) { | 69 if (defined(invoker.jni_generator_jarjar_file)) { |
73 args += [ | 70 args += [ |
74 "--jarjar", | 71 "--jarjar", |
75 rebase_path(jni_generator_jarjar_file, root_build_dir), | 72 rebase_path(jni_generator_jarjar_file, root_build_dir), |
76 ] | 73 ] |
77 } | 74 } |
78 } | 75 } |
79 | 76 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 classname = _classname_list[0] | 156 classname = _classname_list[0] |
160 jni_target_name = "${target_name}__jni_${classname}" | 157 jni_target_name = "${target_name}__jni_${classname}" |
161 jni_actions += [ ":$jni_target_name" ] | 158 jni_actions += [ ":$jni_target_name" ] |
162 action(jni_target_name) { | 159 action(jni_target_name) { |
163 # The sources aren't compiled so don't check their dependencies. | 160 # The sources aren't compiled so don't check their dependencies. |
164 check_includes = false | 161 check_includes = false |
165 depfile = "$target_gen_dir/$target_name.d" | 162 depfile = "$target_gen_dir/$target_name.d" |
166 script = "//base/android/jni_generator/jni_generator.py" | 163 script = "//base/android/jni_generator/jni_generator.py" |
167 sources = [ | 164 sources = [ |
168 jar_file, | 165 jar_file, |
169 jni_generator_include, | |
170 ] | 166 ] |
171 outputs = [ | 167 outputs = [ |
172 depfile, | 168 depfile, |
173 "${jni_output_dir}/${classname}_jni.h", | 169 "${jni_output_dir}/${classname}_jni.h", |
174 ] | 170 ] |
175 | 171 |
176 args = [ | 172 args = [ |
177 "--depfile", | 173 "--depfile", |
178 rebase_path(depfile, root_build_dir), | 174 rebase_path(depfile, root_build_dir), |
179 "--jar_file", | 175 "--jar_file", |
180 rebase_path(jar_file, root_build_dir), | 176 rebase_path(jar_file, root_build_dir), |
181 "--input_file", | 177 "--input_file", |
182 class, | 178 class, |
183 "--optimize_generation=1", | 179 "--optimize_generation=1", |
184 "--ptr_type=long", | 180 "--ptr_type=long", |
185 "--output_dir", | 181 "--output_dir", |
186 rebase_path(jni_output_dir, root_build_dir), | 182 rebase_path(jni_output_dir, root_build_dir), |
187 "--includes", | 183 "--includes", |
188 rebase_path(jni_generator_include, root_build_dir), | 184 rebase_path(jni_generator_include, jni_output_dir), |
189 "--native_exports_optional", | 185 "--native_exports_optional", |
190 ] | 186 ] |
191 } | 187 } |
192 } | 188 } |
193 | 189 |
194 config("jni_includes_${target_name}") { | 190 config("jni_includes_${target_name}") { |
195 include_dirs = [ base_output_dir ] | 191 include_dirs = [ base_output_dir ] |
196 } | 192 } |
197 | 193 |
198 group(target_name) { | 194 group(target_name) { |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 # | 722 # |
727 # bypass_platform_checks: Disables checks about cross-platform (Java/Android) | 723 # bypass_platform_checks: Disables checks about cross-platform (Java/Android) |
728 # dependencies for this target. This will allow depending on an | 724 # dependencies for this target. This will allow depending on an |
729 # android_library target, for example. | 725 # android_library target, for example. |
730 # | 726 # |
731 # chromium_code: If true, extra analysis warning/errors will be enabled. | 727 # chromium_code: If true, extra analysis warning/errors will be enabled. |
732 # | 728 # |
733 # datadeps, testonly | 729 # datadeps, testonly |
734 # | 730 # |
735 # Example | 731 # Example |
736 # java_library("foo") { | 732 # java_binary("foo") { |
737 # java_files = [ "org/chromium/foo/FooMain.java" ] | 733 # java_files = [ "org/chromium/foo/FooMain.java" ] |
738 # deps = [ ":bar_java" ] | 734 # deps = [ ":bar_java" ] |
739 # main_class = "org.chromium.foo.FooMain" | 735 # main_class = "org.chromium.foo.FooMain" |
740 # } | 736 # } |
741 template("java_binary") { | 737 template("java_binary") { |
742 set_sources_assignment_filter([]) | 738 set_sources_assignment_filter([]) |
743 | 739 |
744 # TODO(cjhopman): This should not act like a java_library for dependents (i.e. | 740 # TODO(cjhopman): This should not act like a java_library for dependents (i.e. |
745 # dependents shouldn't get the jar in their classpath, etc.). | 741 # dependents shouldn't get the jar in their classpath, etc.). |
746 java_library_impl(target_name) { | 742 java_library_impl(target_name) { |
(...skipping 22 matching lines...) Expand all Loading... |
769 bypass_platform_checks = invoker.bypass_platform_checks | 765 bypass_platform_checks = invoker.bypass_platform_checks |
770 } | 766 } |
771 if (defined(invoker.testonly)) { | 767 if (defined(invoker.testonly)) { |
772 testonly = invoker.testonly | 768 testonly = invoker.testonly |
773 } | 769 } |
774 | 770 |
775 main_class = invoker.main_class | 771 main_class = invoker.main_class |
776 } | 772 } |
777 } | 773 } |
778 | 774 |
779 # Declare an java library target | 775 # Declare a Junit executable target |
| 776 # |
| 777 # This target creates an executable from java code for running as a junit test |
| 778 # suite. The executable will be in the output folder's /bin/ directory. |
780 # | 779 # |
781 # Variables | 780 # Variables |
782 # deps: Specifies the dependencies of this target. Java targets in this list | 781 # deps: Specifies the dependencies of this target. Java targets in this list |
| 782 # will be included in the executable (and the javac classpath). |
| 783 # |
| 784 # java_files: List of .java files included in this library. |
| 785 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
| 786 # will be added to java_files and be included in this library. |
| 787 # srcjars: List of srcjars to be included in this library, together with the |
| 788 # ones obtained from srcjar_deps. |
| 789 # |
| 790 # chromium_code: If true, extra analysis warning/errors will be enabled. |
| 791 # |
| 792 # Example |
| 793 # junit_binary("foo") { |
| 794 # java_files = [ "org/chromium/foo/FooTest.java" ] |
| 795 # deps = [ ":bar_java" ] |
| 796 # } |
| 797 template("junit_binary") { |
| 798 set_sources_assignment_filter([]) |
| 799 |
| 800 java_binary(target_name) { |
| 801 bypass_platform_checks = true |
| 802 main_class = "org.chromium.testing.local.JunitTestMain" |
| 803 testonly = true |
| 804 |
| 805 if (defined(invoker.DEPRECATED_java_in_dir)) { |
| 806 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir |
| 807 } |
| 808 if (defined(invoker.chromium_code)) { |
| 809 chromium_code = invoker.chromium_code |
| 810 } |
| 811 deps = [ |
| 812 "//testing/android/junit:junit_test_support", |
| 813 "//third_party/junit", |
| 814 "//third_party/mockito:mockito_java", |
| 815 "//third_party/robolectric:robolectric_java", |
| 816 "//third_party/robolectric:android-all-4.3_r2-robolectric-0", |
| 817 ] |
| 818 if (defined(invoker.deps)) { |
| 819 deps += invoker.deps |
| 820 } |
| 821 if (defined(invoker.java_files)) { |
| 822 java_files = invoker.java_files |
| 823 } |
| 824 if (defined(invoker.srcjar_deps)) { |
| 825 srcjar_deps = invoker.srcjar_deps |
| 826 } |
| 827 if (defined(invoker.srcjars)) { |
| 828 srcjars = invoker.srcjars |
| 829 } |
| 830 } |
| 831 } |
| 832 |
| 833 # Declare a java library target |
| 834 # |
| 835 # Variables |
| 836 # deps: Specifies the dependencies of this target. Java targets in this list |
783 # will be added to the javac classpath. | 837 # will be added to the javac classpath. |
784 # | 838 # |
785 # java_files: List of .java files included in this library. | 839 # java_files: List of .java files included in this library. |
786 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 840 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
787 # will be added to java_files and be included in this library. | 841 # will be added to java_files and be included in this library. |
788 # srcjars: List of srcjars to be included in this library, together with the | 842 # srcjars: List of srcjars to be included in this library, together with the |
789 # ones obtained from srcjar_deps. | 843 # ones obtained from srcjar_deps. |
790 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 844 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in |
791 # this directory will be included in the library. This is only supported to | 845 # this directory will be included in the library. This is only supported to |
792 # ease the gyp->gn conversion and will be removed in the future. | 846 # ease the gyp->gn conversion and will be removed in the future. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 if (defined(invoker.jar_path)) { | 921 if (defined(invoker.jar_path)) { |
868 jar_path = invoker.jar_path | 922 jar_path = invoker.jar_path |
869 } | 923 } |
870 | 924 |
871 if (defined(invoker.supports_android) && invoker.supports_android) { | 925 if (defined(invoker.supports_android) && invoker.supports_android) { |
872 supports_android = true | 926 supports_android = true |
873 } | 927 } |
874 } | 928 } |
875 } | 929 } |
876 | 930 |
877 # Declare an java library target for a prebuilt jar | 931 # Declare a java library target for a prebuilt jar |
878 # | 932 # |
879 # Variables | 933 # Variables |
880 # deps: Specifies the dependencies of this target. Java targets in this list | 934 # deps: Specifies the dependencies of this target. Java targets in this list |
881 # will be added to the javac classpath. | 935 # will be added to the javac classpath. |
882 # jar_path: Path to the prebuilt jar. | 936 # jar_path: Path to the prebuilt jar. |
883 # proguard_preprocess: If true, proguard preprocessing will be run. This can | 937 # proguard_preprocess: If true, proguard preprocessing will be run. This can |
884 # be used to remove unwanted parts of the library. | 938 # be used to remove unwanted parts of the library. |
885 # proguard_config: Path to the proguard config for preprocessing. | 939 # proguard_config: Path to the proguard config for preprocessing. |
886 # | 940 # |
887 # Example | 941 # Example |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 # (and so not through builtin targets like 'action', 'group', etc). | 1154 # (and so not through builtin targets like 'action', 'group', etc). |
1101 # java_files: List of .java files to include in the apk. | 1155 # java_files: List of .java files to include in the apk. |
1102 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars | 1156 # srcjar_deps: List of srcjar dependencies. The .java files in the srcjars |
1103 # will be added to java_files and be included in this apk. | 1157 # will be added to java_files and be included in this apk. |
1104 # apk_name: Name for final apk. | 1158 # apk_name: Name for final apk. |
1105 # final_apk_path: Path to final built apk. Default is | 1159 # final_apk_path: Path to final built apk. Default is |
1106 # $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name. | 1160 # $root_out_dir/apks/$apk_name.apk. Setting this will override apk_name. |
1107 # native_libs: List paths of native libraries to include in this apk. If these | 1161 # native_libs: List paths of native libraries to include in this apk. If these |
1108 # libraries depend on other shared_library targets, those dependencies will | 1162 # libraries depend on other shared_library targets, those dependencies will |
1109 # also be included in the apk. | 1163 # also be included in the apk. |
| 1164 # apk_under_test: For an instrumentation test apk, this is the target of the |
| 1165 # tested apk. |
1110 # testonly: Marks this target as "test-only". | 1166 # testonly: Marks this target as "test-only". |
1111 # | 1167 # |
1112 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 1168 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in |
1113 # this directory will be included in the library. This is only supported to | 1169 # this directory will be included in the library. This is only supported to |
1114 # ease the gyp->gn conversion and will be removed in the future. | 1170 # ease the gyp->gn conversion and will be removed in the future. |
1115 # | 1171 # |
1116 # Example | 1172 # Example |
1117 # android_apk("foo_apk") { | 1173 # android_apk("foo_apk") { |
1118 # android_manifest = "AndroidManifest.xml" | 1174 # android_manifest = "AndroidManifest.xml" |
1119 # java_files = [ | 1175 # java_files = [ |
(...skipping 11 matching lines...) Expand all Loading... |
1131 # native_lib_path | 1187 # native_lib_path |
1132 # ] | 1188 # ] |
1133 # } | 1189 # } |
1134 template("android_apk") { | 1190 template("android_apk") { |
1135 set_sources_assignment_filter([]) | 1191 set_sources_assignment_filter([]) |
1136 if (defined(invoker.testonly)) { | 1192 if (defined(invoker.testonly)) { |
1137 testonly = invoker.testonly | 1193 testonly = invoker.testonly |
1138 } | 1194 } |
1139 | 1195 |
1140 assert(defined(invoker.final_apk_path) || defined(invoker.apk_name)) | 1196 assert(defined(invoker.final_apk_path) || defined(invoker.apk_name)) |
| 1197 assert(defined(invoker.android_manifest)) |
1141 gen_dir = "$target_gen_dir/$target_name" | 1198 gen_dir = "$target_gen_dir/$target_name" |
1142 base_path = "$gen_dir/$target_name" | 1199 base_path = "$gen_dir/$target_name" |
1143 _build_config = "$base_path.build_config" | 1200 _build_config = "$target_gen_dir/$target_name.build_config" |
1144 resources_zip_path = "$base_path.resources.zip" | 1201 resources_zip_path = "$base_path.resources.zip" |
1145 all_resources_zip_path = "$base_path.resources.all.zip" | 1202 all_resources_zip_path = "$base_path.resources.all.zip" |
1146 jar_path = "$base_path.jar" | 1203 jar_path = "$base_path.jar" |
1147 final_dex_path = "$gen_dir/classes.dex" | 1204 final_dex_path = "$gen_dir/classes.dex" |
1148 _template_name = target_name | 1205 _template_name = target_name |
1149 _final_apk_path = "" | 1206 _final_apk_path = "" |
1150 if (defined(invoker.final_apk_path)) { | 1207 if (defined(invoker.final_apk_path)) { |
1151 _final_apk_path = invoker.final_apk_path | 1208 _final_apk_path = invoker.final_apk_path |
1152 } else if (defined(invoker.apk_name)) { | 1209 } else if (defined(invoker.apk_name)) { |
1153 _final_apk_path = "$root_build_dir/apks/" + invoker.apk_name + ".apk" | 1210 _final_apk_path = "$root_build_dir/apks/" + invoker.apk_name + ".apk" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 invoker.enable_relocation_packing) { | 1273 invoker.enable_relocation_packing) { |
1217 _enable_relocation_packing = true | 1274 _enable_relocation_packing = true |
1218 } | 1275 } |
1219 | 1276 |
1220 _native_lib_version_name = "" | 1277 _native_lib_version_name = "" |
1221 if (defined(invoker.native_lib_version_name)) { | 1278 if (defined(invoker.native_lib_version_name)) { |
1222 _native_lib_version_name = invoker.native_lib_version_name | 1279 _native_lib_version_name = invoker.native_lib_version_name |
1223 } | 1280 } |
1224 } | 1281 } |
1225 | 1282 |
| 1283 _android_manifest = invoker.android_manifest |
1226 _rebased_build_config = rebase_path(_build_config, root_build_dir) | 1284 _rebased_build_config = rebase_path(_build_config, root_build_dir) |
1227 | 1285 |
1228 write_build_config("${_template_name}__build_config") { | 1286 write_build_config("${_template_name}__build_config") { |
1229 type = "android_apk" | 1287 type = "android_apk" |
1230 dex_path = final_dex_path | 1288 dex_path = final_dex_path |
1231 resources_zip = resources_zip_path | 1289 resources_zip = resources_zip_path |
1232 build_config = _build_config | 1290 build_config = _build_config |
| 1291 android_manifest = _android_manifest |
1233 | 1292 |
1234 if (defined(invoker.deps)) { | 1293 if (defined(invoker.deps)) { |
1235 deps = invoker.deps | 1294 deps = invoker.deps |
1236 } | 1295 } |
1237 | 1296 |
| 1297 if (defined(invoker.apk_under_test)) { |
| 1298 apk_under_test = invoker.apk_under_test |
| 1299 } |
| 1300 |
1238 native_libs = _native_libs | 1301 native_libs = _native_libs |
1239 } | 1302 } |
1240 | 1303 |
1241 final_deps = [] | 1304 final_deps = [] |
1242 | 1305 |
1243 final_deps += [ ":${_template_name}__process_resources" ] | 1306 final_deps += [ ":${_template_name}__process_resources" ] |
1244 process_resources("${_template_name}__process_resources") { | 1307 process_resources("${_template_name}__process_resources") { |
1245 srcjar_path = "${target_gen_dir}/${target_name}.srcjar" | 1308 srcjar_path = "${target_gen_dir}/${target_name}.srcjar" |
1246 android_manifest = invoker.android_manifest | 1309 android_manifest = _android_manifest |
1247 resource_dirs = [ "//build/android/ant/empty/res" ] | 1310 resource_dirs = [ "//build/android/ant/empty/res" ] |
1248 zip_path = resources_zip_path | 1311 zip_path = resources_zip_path |
1249 generate_constant_ids = true | 1312 generate_constant_ids = true |
1250 build_config = _build_config | 1313 build_config = _build_config |
1251 } | 1314 } |
1252 _srcjar_deps += [ ":${_template_name}__process_resources" ] | 1315 _srcjar_deps += [ ":${_template_name}__process_resources" ] |
1253 | 1316 |
1254 if (_native_libs != []) { | 1317 if (_native_libs != []) { |
1255 _enable_chromium_linker_tests = false | 1318 _enable_chromium_linker_tests = false |
1256 if (defined(invoker.enable_chromium_linker_tests)) { | 1319 if (defined(invoker.enable_chromium_linker_tests)) { |
(...skipping 25 matching lines...) Expand all Loading... |
1282 } | 1345 } |
1283 } | 1346 } |
1284 _srcjar_deps += [ ":${_template_name}__native_libraries_java" ] | 1347 _srcjar_deps += [ ":${_template_name}__native_libraries_java" ] |
1285 } | 1348 } |
1286 | 1349 |
1287 final_deps += [ ":${_template_name}__java" ] | 1350 final_deps += [ ":${_template_name}__java" ] |
1288 java_library_impl("${_template_name}__java") { | 1351 java_library_impl("${_template_name}__java") { |
1289 supports_android = true | 1352 supports_android = true |
1290 requires_android = true | 1353 requires_android = true |
1291 override_build_config = _build_config | 1354 override_build_config = _build_config |
1292 android_manifest = invoker.android_manifest | 1355 android_manifest = _android_manifest |
1293 chromium_code = true | 1356 chromium_code = true |
1294 if (defined(invoker.java_files)) { | 1357 if (defined(invoker.java_files)) { |
1295 java_files = invoker.java_files | 1358 java_files = invoker.java_files |
1296 } else if (defined(invoker.DEPRECATED_java_in_dir)) { | 1359 } else if (defined(invoker.DEPRECATED_java_in_dir)) { |
1297 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir | 1360 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir |
1298 } else { | 1361 } else { |
1299 java_files = [] | 1362 java_files = [] |
1300 } | 1363 } |
1301 srcjar_deps = _srcjar_deps | 1364 srcjar_deps = _srcjar_deps |
1302 dex_path = base_path + ".dex.jar" | 1365 dex_path = base_path + ".dex.jar" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 rebased_gdbserver = rebase_path([ android_gdbserver ], root_build_dir) | 1453 rebased_gdbserver = rebase_path([ android_gdbserver ], root_build_dir) |
1391 inputs += [ android_gdbserver ] | 1454 inputs += [ android_gdbserver ] |
1392 args += [ "--libraries=$rebased_gdbserver" ] | 1455 args += [ "--libraries=$rebased_gdbserver" ] |
1393 } | 1456 } |
1394 } | 1457 } |
1395 } | 1458 } |
1396 | 1459 |
1397 final_deps += [ ":${_template_name}__create" ] | 1460 final_deps += [ ":${_template_name}__create" ] |
1398 create_apk("${_template_name}__create") { | 1461 create_apk("${_template_name}__create") { |
1399 apk_path = _final_apk_path | 1462 apk_path = _final_apk_path |
1400 android_manifest = invoker.android_manifest | 1463 android_manifest = _android_manifest |
1401 resources_zip = all_resources_zip_path | 1464 resources_zip = all_resources_zip_path |
1402 dex_path = final_dex_path | 1465 dex_path = final_dex_path |
1403 load_library_from_apk = _load_library_from_apk | 1466 load_library_from_apk = _load_library_from_apk |
1404 | 1467 |
1405 version_code = "1" | 1468 version_code = "1" |
1406 if (defined(invoker.version_code)) { | 1469 if (defined(invoker.version_code)) { |
1407 version_code = invoker.version_code | 1470 version_code = invoker.version_code |
1408 } | 1471 } |
1409 | 1472 |
1410 version_name = "Developer Build" | 1473 version_name = "Developer Build" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 unittests_binary = "lib" + test_suite_name + ".so" | 1546 unittests_binary = "lib" + test_suite_name + ".so" |
1484 } | 1547 } |
1485 | 1548 |
1486 if (defined(invoker.apk_name)) { | 1549 if (defined(invoker.apk_name)) { |
1487 apk_name = invoker.apk_name | 1550 apk_name = invoker.apk_name |
1488 } else { | 1551 } else { |
1489 apk_name = test_suite_name | 1552 apk_name = test_suite_name |
1490 } | 1553 } |
1491 | 1554 |
1492 android_apk(target_name) { | 1555 android_apk(target_name) { |
1493 _apk_name = apk_name | 1556 final_apk_path = "$root_build_dir/${apk_name}_apk/${apk_name}-debug.apk" |
1494 final_apk_path = "$root_build_dir/${_apk_name}_apk/${_apk_name}-debug.apk" | |
1495 java_files = [ | 1557 java_files = [ |
1496 "//testing/android/java/src/org/chromium/native_test/ChromeNativeTestActiv
ity.java", | 1558 "//testing/android/native_test/java/src/org/chromium/native_test/ChromeNat
iveTestActivity.java", |
1497 "//testing/android/java/src/org/chromium/native_test/ChromeNativeTestInstr
umentationTestRunner.java", | 1559 "//testing/android/native_test/java/src/org/chromium/native_test/ChromeNat
iveTestInstrumentationTestRunner.java", |
1498 ] | 1560 ] |
1499 android_manifest = "//testing/android/java/AndroidManifest.xml" | 1561 android_manifest = "//testing/android/native_test/java/AndroidManifest.xml" |
1500 native_libs = [ unittests_binary ] | 1562 native_libs = [ unittests_binary ] |
1501 if (defined(invoker.asset_location)) { | 1563 if (defined(invoker.asset_location)) { |
1502 asset_location = invoker.asset_location | 1564 asset_location = invoker.asset_location |
1503 } | 1565 } |
1504 deps = [ | 1566 deps = [ |
1505 "//base:base_java", | 1567 "//base:base_java", |
1506 "//build/android/pylib/remote/device/dummy:remote_device_dummy_apk", | 1568 "//build/android/pylib/remote/device/dummy:remote_device_dummy_apk", |
1507 ] | 1569 ] |
1508 if (defined(invoker.deps)) { | 1570 if (defined(invoker.deps)) { |
1509 deps += invoker.deps | 1571 deps += invoker.deps |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 template("uiautomator_test") { | 1802 template("uiautomator_test") { |
1741 set_sources_assignment_filter([]) | 1803 set_sources_assignment_filter([]) |
1742 if (defined(invoker.testonly)) { | 1804 if (defined(invoker.testonly)) { |
1743 testonly = invoker.testonly | 1805 testonly = invoker.testonly |
1744 } | 1806 } |
1745 assert(target_name != "") | 1807 assert(target_name != "") |
1746 assert(invoker.deps != [] || true) | 1808 assert(invoker.deps != [] || true) |
1747 group(target_name) { | 1809 group(target_name) { |
1748 } | 1810 } |
1749 } | 1811 } |
OLD | NEW |