| 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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 # ] | 678 # ] |
| 679 # } | 679 # } |
| 680 template("android_library") { | 680 template("android_library") { |
| 681 if (defined(invoker.testonly)) { testonly = invoker.testonly } | 681 if (defined(invoker.testonly)) { testonly = invoker.testonly } |
| 682 | 682 |
| 683 assert(defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir) | 683 assert(defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir) |
| 684 || defined(invoker.srcjars) || defined(invoker.srcjar_deps)) | 684 || defined(invoker.srcjars) || defined(invoker.srcjar_deps)) |
| 685 _base_path = "$target_gen_dir/$target_name" | 685 _base_path = "$target_gen_dir/$target_name" |
| 686 _build_config = _base_path + ".build_config" | 686 _build_config = _base_path + ".build_config" |
| 687 _jar_path = _base_path + ".jar" | 687 _jar_path = _base_path + ".jar" |
| 688 _dex_path = _base_path + ".dex.jar" | 688 if (defined(invoker.dex_path)) { |
| 689 _dex_path = invoker.dex_path |
| 690 } else { |
| 691 _dex_path = _base_path + ".dex.jar" |
| 692 } |
| 689 | 693 |
| 690 write_build_config("${target_name}__build_config") { | 694 write_build_config("${target_name}__build_config") { |
| 691 type = "android_library" | 695 type = "android_library" |
| 692 | 696 |
| 693 deps = [] | 697 deps = [] |
| 694 if (defined(invoker.deps)) { | 698 if (defined(invoker.deps)) { |
| 695 deps += invoker.deps | 699 deps += invoker.deps |
| 696 } | 700 } |
| 697 | 701 |
| 698 build_config = _build_config | 702 build_config = _build_config |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 } else if (defined(invoker.DEPRECATED_java_in_dir)) { | 1072 } else if (defined(invoker.DEPRECATED_java_in_dir)) { |
| 1069 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir | 1073 DEPRECATED_java_in_dir = invoker.DEPRECATED_java_in_dir |
| 1070 } else { | 1074 } else { |
| 1071 java_files = [] | 1075 java_files = [] |
| 1072 } | 1076 } |
| 1073 srcjar_deps = _srcjar_deps | 1077 srcjar_deps = _srcjar_deps |
| 1074 dex_path = base_path + ".dex.jar" | 1078 dex_path = base_path + ".dex.jar" |
| 1075 } | 1079 } |
| 1076 | 1080 |
| 1077 if (_dist_jar_path != "") { | 1081 if (_dist_jar_path != "") { |
| 1082 final_deps += [ ":${_template_name}__create_dist_jar" ] |
| 1078 # TODO(cjhopman): This is only ever needed to calculate the list of tests to | 1083 # TODO(cjhopman): This is only ever needed to calculate the list of tests to |
| 1079 # run. See build/android/pylib/instrumentation/test_jar.py. We should be | 1084 # run. See build/android/pylib/instrumentation/test_jar.py. We should be |
| 1080 # able to just do that calculation at build time instead. | 1085 # able to just do that calculation at build time instead. |
| 1081 action("${_template_name}__create_dist_jar") { | 1086 action("${_template_name}__create_dist_jar") { |
| 1082 script = "//build/android/gyp/create_dist_jar.py" | 1087 script = "//build/android/gyp/create_dist_jar.py" |
| 1083 depfile = "$target_gen_dir/$target_name.d" | 1088 depfile = "$target_gen_dir/$target_name.d" |
| 1084 inputs = [ build_config ] | 1089 inputs = [ build_config ] |
| 1085 outputs = [ | 1090 outputs = [ |
| 1086 depfile, | 1091 depfile, |
| 1087 _dist_jar_path, | 1092 _dist_jar_path, |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1241 "//testing/android/java/src/org/chromium/native_test/ChromeNativeTestActiv
ity.java" | 1246 "//testing/android/java/src/org/chromium/native_test/ChromeNativeTestActiv
ity.java" |
| 1242 ] | 1247 ] |
| 1243 android_manifest = "//testing/android/java/AndroidManifest.xml" | 1248 android_manifest = "//testing/android/java/AndroidManifest.xml" |
| 1244 unittests_outputs = [ unittests_binary ] | 1249 unittests_outputs = [ unittests_binary ] |
| 1245 native_libs = [unittests_outputs[0]] | 1250 native_libs = [unittests_outputs[0]] |
| 1246 deps = [ "//base:base_java" ] | 1251 deps = [ "//base:base_java" ] |
| 1247 if (defined(invoker.deps)) { | 1252 if (defined(invoker.deps)) { |
| 1248 deps += invoker.deps | 1253 deps += invoker.deps |
| 1249 } | 1254 } |
| 1250 datadeps = [ | 1255 datadeps = [ |
| 1256 "//tools/android/forwarder2", |
| 1251 "//tools/android/md5sum", | 1257 "//tools/android/md5sum", |
| 1252 ] | 1258 ] |
| 1253 } | 1259 } |
| 1254 } | 1260 } |
| 1255 | 1261 |
| 1256 # Generate .java files from .aidl files. | 1262 # Generate .java files from .aidl files. |
| 1257 # | 1263 # |
| 1258 # This target will store the .java files in a srcjar and should be included in | 1264 # This target will store the .java files in a srcjar and should be included in |
| 1259 # an android_library or android_apk's srcjar_deps. | 1265 # an android_library or android_apk's srcjar_deps. |
| 1260 # | 1266 # |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1457 } | 1463 } |
| 1458 | 1464 |
| 1459 # TODO(GYP): implement this. | 1465 # TODO(GYP): implement this. |
| 1460 template("uiautomator_test") { | 1466 template("uiautomator_test") { |
| 1461 if (defined(invoker.testonly)) { testonly = invoker.testonly } | 1467 if (defined(invoker.testonly)) { testonly = invoker.testonly } |
| 1462 assert(target_name != "") | 1468 assert(target_name != "") |
| 1463 assert(invoker.deps != [] || true) | 1469 assert(invoker.deps != [] || true) |
| 1464 group(target_name) { | 1470 group(target_name) { |
| 1465 } | 1471 } |
| 1466 } | 1472 } |
| OLD | NEW |