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 | 6 |
7 assert(is_android) | 7 assert(is_android) |
8 | 8 |
9 | 9 |
10 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) | 10 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 ] | 66 ] |
67 } | 67 } |
68 | 68 |
69 if (type == "android_resources" || type == "android_apk") { | 69 if (type == "android_resources" || type == "android_apk") { |
70 assert(defined(invoker.resources_zip)) | 70 assert(defined(invoker.resources_zip)) |
71 args += [ | 71 args += [ |
72 "--resources-zip", rebase_path(invoker.resources_zip, root_build_dir), | 72 "--resources-zip", rebase_path(invoker.resources_zip, root_build_dir), |
73 ] | 73 ] |
74 } | 74 } |
75 | 75 |
| 76 if (type == "android_apk") { |
| 77 if (defined(invoker.native_libs)) { |
| 78 rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir) |
| 79 rebased_android_readelf = rebase_path(android_readelf, root_build_dir) |
| 80 args += [ |
| 81 "--native-libs=$rebased_native_libs", |
| 82 "--readelf-path=$rebased_android_readelf", |
| 83 ] |
| 84 } |
| 85 } |
| 86 |
76 if (defined(invoker.srcjar)) { | 87 if (defined(invoker.srcjar)) { |
77 args += [ | 88 args += [ |
78 "--srcjar", rebase_path(invoker.srcjar, root_build_dir) | 89 "--srcjar", rebase_path(invoker.srcjar, root_build_dir) |
79 ] | 90 ] |
80 } | 91 } |
81 } | 92 } |
82 } | 93 } |
83 | 94 |
84 | 95 |
85 # Creates a zip archive of the inputs. | 96 # Creates a zip archive of the inputs. |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 args += [ | 519 args += [ |
509 "--all-resources-zip-out", rebase_path(all_resources_zip, root_build_dir
) | 520 "--all-resources-zip-out", rebase_path(all_resources_zip, root_build_dir
) |
510 ] | 521 ] |
511 } | 522 } |
512 | 523 |
513 if (defined(invoker.args)) { | 524 if (defined(invoker.args)) { |
514 args += invoker.args | 525 args += invoker.args |
515 } | 526 } |
516 } | 527 } |
517 } | 528 } |
| 529 |
| 530 template("copy_ex") { |
| 531 action(target_name) { |
| 532 script = "//build/android/gyp/copy_ex.py" |
| 533 depfile = "$target_gen_dir/$target_name.d" |
| 534 outputs = [ |
| 535 depfile, |
| 536 ] |
| 537 |
| 538 inputs = [] |
| 539 if (defined(invoker.inputs)) { |
| 540 inputs += invoker.inputs |
| 541 } |
| 542 |
| 543 args = [ |
| 544 "--depfile", rebase_path(depfile, root_build_dir), |
| 545 "--dest", rebase_path(invoker.dest, root_build_dir), |
| 546 ] |
| 547 if (defined(invoker.args)) { |
| 548 args += invoker.args |
| 549 } |
| 550 if (defined(invoker.clear_dir) && invoker.clear_dir) { |
| 551 args += ["--clear"] |
| 552 } |
| 553 } |
| 554 } |
OLD | NEW |