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("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
7 import("//build/config/zip.gni") | 7 import("//build/config/zip.gni") |
8 import("//third_party/ijar/ijar.gni") | 8 import("//third_party/ijar/ijar.gni") |
9 | 9 |
10 assert(is_android) | 10 assert(is_android) |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 # build/android/gyp/util/build_utils.py:ExpandFileArgs | 345 # build/android/gyp/util/build_utils.py:ExpandFileArgs |
346 template("write_build_config") { | 346 template("write_build_config") { |
347 action(target_name) { | 347 action(target_name) { |
348 set_sources_assignment_filter([]) | 348 set_sources_assignment_filter([]) |
349 type = invoker.type | 349 type = invoker.type |
350 build_config = invoker.build_config | 350 build_config = invoker.build_config |
351 | 351 |
352 assert(type == "android_apk" || type == "java_library" || | 352 assert(type == "android_apk" || type == "java_library" || |
353 type == "android_resources" || type == "deps_dex" || | 353 type == "android_resources" || type == "deps_dex" || |
354 type == "android_assets" || type == "resource_rewriter" || | 354 type == "android_assets" || type == "resource_rewriter" || |
355 type == "java_binary") | 355 type == "java_binary" || type == "group") |
356 | 356 |
357 deps = [] | 357 deps = [] |
358 forward_variables_from(invoker, | 358 forward_variables_from(invoker, |
359 [ | 359 [ |
360 "deps", | 360 "deps", |
361 "testonly", | 361 "testonly", |
362 "visibility", | 362 "visibility", |
363 ]) | 363 ]) |
364 | 364 |
365 script = "//build/android/gyp/write_build_config.py" | 365 script = "//build/android/gyp/write_build_config.py" |
(...skipping 22 matching lines...) Expand all Loading... |
388 "--possible-deps-configs=$rebase_possible_deps_configs", | 388 "--possible-deps-configs=$rebase_possible_deps_configs", |
389 "--build-config", | 389 "--build-config", |
390 rebase_path(build_config, root_build_dir), | 390 rebase_path(build_config, root_build_dir), |
391 ] | 391 ] |
392 | 392 |
393 is_java = type == "java_library" || type == "java_binary" | 393 is_java = type == "java_library" || type == "java_binary" |
394 is_apk = type == "android_apk" | 394 is_apk = type == "android_apk" |
395 is_android_assets = type == "android_assets" | 395 is_android_assets = type == "android_assets" |
396 is_android_resources = type == "android_resources" | 396 is_android_resources = type == "android_resources" |
397 is_deps_dex = type == "deps_dex" | 397 is_deps_dex = type == "deps_dex" |
| 398 is_group = type == "group" |
398 | 399 |
399 supports_android = | 400 supports_android = is_apk || is_android_assets || is_android_resources || |
400 is_apk || is_android_assets || is_android_resources || is_deps_dex || | 401 is_deps_dex || is_group || |
401 (is_java && defined(invoker.supports_android) && | 402 (is_java && defined(invoker.supports_android) && |
402 invoker.supports_android) | 403 invoker.supports_android) |
403 requires_android = | 404 requires_android = |
404 is_apk || is_android_assets || is_android_resources || is_deps_dex || | 405 is_apk || is_android_assets || is_android_resources || is_deps_dex || |
405 (is_java && defined(invoker.requires_android) && | 406 (is_java && defined(invoker.requires_android) && |
406 invoker.requires_android) | 407 invoker.requires_android) |
407 | 408 |
408 assert(!requires_android || supports_android, | 409 assert(!requires_android || supports_android, |
409 "requires_android requires" + " supports_android") | 410 "requires_android requires" + " supports_android") |
410 | 411 |
411 # Mark these variables as used. | 412 # Mark these variables as used. |
412 assert(is_java || true) | 413 assert(is_java || true) |
413 assert(is_apk || true) | 414 assert(is_apk || true) |
414 assert(is_android_resources || true) | 415 assert(is_android_resources || true) |
415 assert(is_deps_dex || true) | 416 assert(is_deps_dex || true) |
| 417 assert(is_group || true) |
416 | 418 |
417 if (is_java || is_apk) { | 419 if (is_java || is_apk) { |
418 args += [ | 420 args += [ |
419 "--jar-path", | 421 "--jar-path", |
420 rebase_path(invoker.jar_path, root_build_dir), | 422 rebase_path(invoker.jar_path, root_build_dir), |
421 ] | 423 ] |
422 } | 424 } |
423 | 425 |
424 if (is_apk || is_deps_dex || (is_java && supports_android)) { | 426 if (is_apk || is_deps_dex || (is_java && supports_android)) { |
425 args += [ | 427 args += [ |
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2141 ] | 2143 ] |
2142 args = [ | 2144 args = [ |
2143 "--depfile", | 2145 "--depfile", |
2144 rebase_path(depfile, root_build_dir), | 2146 rebase_path(depfile, root_build_dir), |
2145 "--script-output-path", | 2147 "--script-output-path", |
2146 rebase_path(generated_script, root_build_dir), | 2148 rebase_path(generated_script, root_build_dir), |
2147 ] | 2149 ] |
2148 args += test_runner_args | 2150 args += test_runner_args |
2149 } | 2151 } |
2150 } | 2152 } |
OLD | NEW |