Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: build/config/android/rules.gni

Issue 1465383003: [Android] Add ChromiumNetTestSupport.apk for the java EmbeddedTestServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +landmine for GN Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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("//build/config/sanitizers/sanitizers.gni") 8 import("//build/config/sanitizers/sanitizers.gni")
9 import("//build/toolchain/toolchain.gni") 9 import("//build/toolchain/toolchain.gni")
10 import("//third_party/android_platform/config.gni") 10 import("//third_party/android_platform/config.gni")
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 "$root_shlib_dir/{{source_name_part}}$shlib_extension") 1344 "$root_shlib_dir/{{source_name_part}}$shlib_extension")
1345 1345
1346 _native_lib_version_rule = "" 1346 _native_lib_version_rule = ""
1347 if (defined(invoker.native_lib_version_rule)) { 1347 if (defined(invoker.native_lib_version_rule)) {
1348 _native_lib_version_rule = invoker.native_lib_version_rule 1348 _native_lib_version_rule = invoker.native_lib_version_rule
1349 } 1349 }
1350 _native_lib_version_arg = "\"\"" 1350 _native_lib_version_arg = "\"\""
1351 if (defined(invoker.native_lib_version_arg)) { 1351 if (defined(invoker.native_lib_version_arg)) {
1352 _native_lib_version_arg = invoker.native_lib_version_arg 1352 _native_lib_version_arg = invoker.native_lib_version_arg
1353 } 1353 }
1354
1355 _native_libraries_template =
1356 "//base/android/java/templates/NativeLibraries.template"
1357 if (defined(invoker.native_libraries_template)) {
1358 _native_libraries_template = invoker.native_libraries_template
1359 }
1360
1361 _native_libraries_package_name = "org/chromium/base/library_loader"
1362 if (defined(invoker.native_libraries_package_name)) {
1363 _native_libraries_package_name = invoker.native_libraries_package_name
1364 }
1354 } 1365 }
1355 1366
1356 _android_manifest_deps = [] 1367 _android_manifest_deps = []
1357 if (defined(invoker.android_manifest_dep)) { 1368 if (defined(invoker.android_manifest_dep)) {
1358 _android_manifest_deps = [ invoker.android_manifest_dep ] 1369 _android_manifest_deps = [ invoker.android_manifest_dep ]
1359 } 1370 }
1360 _android_manifest = invoker.android_manifest 1371 _android_manifest = invoker.android_manifest
1361 1372
1362 _rebased_build_config = rebase_path(_build_config, root_build_dir) 1373 _rebased_build_config = rebase_path(_build_config, root_build_dir)
1363 _create_abi_split = 1374 _create_abi_split =
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 } 1440 }
1430 _srcjar_deps += [ ":$process_resources_target" ] 1441 _srcjar_deps += [ ":$process_resources_target" ]
1431 1442
1432 if (_native_libs != []) { 1443 if (_native_libs != []) {
1433 _enable_chromium_linker_tests = false 1444 _enable_chromium_linker_tests = false
1434 if (defined(invoker.enable_chromium_linker_tests)) { 1445 if (defined(invoker.enable_chromium_linker_tests)) {
1435 _enable_chromium_linker_tests = invoker.enable_chromium_linker_tests 1446 _enable_chromium_linker_tests = invoker.enable_chromium_linker_tests
1436 } 1447 }
1437 1448
1438 java_cpp_template("${_template_name}__native_libraries_java") { 1449 java_cpp_template("${_template_name}__native_libraries_java") {
1439 package_name = "org/chromium/base/library_loader" 1450 package_name = _native_libraries_package_name
1440 sources = [ 1451 sources = [
1441 "//base/android/java/templates/NativeLibraries.template", 1452 _native_libraries_template,
1442 ] 1453 ]
1443 inputs = [ 1454 inputs = [
1444 _build_config, 1455 _build_config,
1445 ] 1456 ]
1446 deps = [ 1457 deps = [
1447 ":$build_config_target", 1458 ":$build_config_target",
1448 ] 1459 ]
1449 if (_native_lib_version_rule != "") { 1460 if (_native_lib_version_rule != "") {
1450 deps += [ _native_lib_version_rule ] 1461 deps += [ _native_lib_version_rule ]
1451 } 1462 }
1452 1463
1453 defines = [ 1464 defines = [
1454 "NATIVE_LIBRARIES_LIST=" + 1465 "NATIVE_LIBRARIES_LIST=" +
1455 "@FileArg($_rebased_build_config:native:java_libraries_list)", 1466 "@FileArg($_rebased_build_config:native:java_libraries_list)",
1456 "NATIVE_LIBRARIES_VERSION_NUMBER=$_native_lib_version_arg", 1467 "NATIVE_LIBRARIES_VERSION_NUMBER=$_native_lib_version_arg",
1457 ] 1468 ]
1458 if (_use_chromium_linker) { 1469 if (_use_chromium_linker) {
1459 defines += [ "ENABLE_CHROMIUM_LINKER" ] 1470 defines += [ "ENABLE_CHROMIUM_LINKER" ]
1460 } 1471 }
1461 if (_load_library_from_apk) { 1472 if (_load_library_from_apk) {
1462 defines += [ "ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE" ] 1473 defines += [ "ENABLE_CHROMIUM_LINKER_LIBRARY_IN_ZIP_FILE" ]
1463 } 1474 }
1464 if (_enable_chromium_linker_tests) { 1475 if (_enable_chromium_linker_tests) {
1465 defines += [ "ENABLE_CHROMIUM_LINKER_TESTS" ] 1476 defines += [ "ENABLE_CHROMIUM_LINKER_TESTS" ]
1466 } 1477 }
1467 } 1478 }
1468 _srcjar_deps += [ ":${_template_name}__native_libraries_java" ] 1479 _srcjar_deps += [ ":${_template_name}__native_libraries_java" ]
1480 } else if (defined(invoker.native_libraries_template) &&
1481 invoker.native_libraries_template != "") {
1482 java_cpp_template("${_template_name}__empty_native_libraries_java") {
1483 assert(defined(invoker.native_libraries_package_name))
1484 package_name = invoker.native_libraries_package_name
1485 sources = [
1486 invoker.native_libraries_template,
1487 ]
1488 inputs = [
1489 _build_config,
1490 ]
1491 deps = [
1492 ":$build_config_target",
1493 ]
1494 }
1495 _srcjar_deps += [ ":${_template_name}__empty_native_libraries_java" ]
1469 } 1496 }
1470 1497
1471 java_target = "${_template_name}__java" 1498 java_target = "${_template_name}__java"
1472 java_library_impl(java_target) { 1499 java_library_impl(java_target) {
1473 forward_variables_from(invoker, [ "run_findbugs" ]) 1500 forward_variables_from(invoker, [ "run_findbugs" ])
1474 supports_android = true 1501 supports_android = true
1475 requires_android = true 1502 requires_android = true
1476 override_build_config = _build_config 1503 override_build_config = _build_config
1477 deps = _android_manifest_deps + [ ":$build_config_target" ] 1504 deps = _android_manifest_deps + [ ":$build_config_target" ]
1478 1505
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 forward_variables_from(invoker, [ "isolate_file" ]) 1930 forward_variables_from(invoker, [ "isolate_file" ])
1904 test_name = invoker.target_name 1931 test_name = invoker.target_name
1905 test_type = "instrumentation" 1932 test_type = "instrumentation"
1906 apk_target = ":$_apk_target_name" 1933 apk_target = ":$_apk_target_name"
1907 } 1934 }
1908 1935
1909 android_apk(_apk_target_name) { 1936 android_apk(_apk_target_name) {
1910 deps = [] 1937 deps = []
1911 data_deps = [] 1938 data_deps = []
1912 forward_variables_from(invoker, "*") 1939 forward_variables_from(invoker, "*")
1913 deps += [ "//testing/android/broker:broker_java" ] 1940 deps += [
1941 "//base:base_java",
1942 "//testing/android/broker:broker_java",
1943 ]
1914 data_deps += [ 1944 data_deps += [
1915 "//testing/android/driver:driver_apk", 1945 "//testing/android/driver:driver_apk",
1916 "//tools/android/forwarder2", 1946 "//tools/android/forwarder2",
1917 "//tools/android/md5sum", 1947 "//tools/android/md5sum",
1918 ] 1948 ]
1919 1949
1950 native_libraries_template =
1951 "//base/test/android/java/templates/NativeTestLibraries.template"
1952 native_libraries_package_name = "org.chromium.base.test.library_loader"
1953
1920 run_findbugs = 1954 run_findbugs =
1921 defined(invoker.run_findbugs) && invoker.run_findbugs && 1955 defined(invoker.run_findbugs) && invoker.run_findbugs &&
1922 (defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir)) 1956 (defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir))
1923 } 1957 }
1924 1958
1925 group(target_name) { 1959 group(target_name) {
1926 public_deps = [ 1960 public_deps = [
1927 ":$_apk_target_name", 1961 ":$_apk_target_name",
1928 ":$_test_runner_target_name", 1962 ":$_test_runner_target_name",
1929 ] 1963 ]
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2236 } 2270 }
2237 2271
2238 android_library(target_name) { 2272 android_library(target_name) {
2239 java_files = [] 2273 java_files = []
2240 srcjar_deps = [ ":${_template_name}__protoc_java" ] 2274 srcjar_deps = [ ":${_template_name}__protoc_java" ]
2241 deps = [ 2275 deps = [
2242 "//third_party/android_protobuf:protobuf_nano_javalib", 2276 "//third_party/android_protobuf:protobuf_nano_javalib",
2243 ] 2277 ]
2244 } 2278 }
2245 } 2279 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698