| OLD | NEW |
| 1 | 1 |
| 2 # Creates a zip archive of the inputs. | 2 # Creates a zip archive of the inputs. |
| 3 # If base_dir is provided, the archive paths will be relative to it. | 3 # If base_dir is provided, the archive paths will be relative to it. |
| 4 template("zip") { | 4 template("zip") { |
| 5 assert(defined(invoker.inputs)) | 5 assert(defined(invoker.inputs)) |
| 6 assert(defined(invoker.output)) | 6 assert(defined(invoker.output)) |
| 7 | 7 |
| 8 rebase_inputs = rebase_path(invoker.inputs) | 8 rebase_inputs = rebase_path(invoker.inputs) |
| 9 rebase_output = rebase_path(invoker.output) | 9 rebase_output = rebase_path(invoker.output) |
| 10 action(target_name) { | 10 action(target_name) { |
| 11 script = "//build/android/gn/zip.py" | 11 script = "//build/android/gn/zip.py" |
| 12 depfile = "$target_gen_dir/$target_name.d" |
| 12 source_prereqs = invoker.inputs | 13 source_prereqs = invoker.inputs |
| 13 outputs = [invoker.output] | 14 outputs = [depfile, invoker.output] |
| 14 args = [ | 15 args = [ |
| 16 "--depfile", rebase_path(depfile, root_build_dir), |
| 15 "--inputs=$rebase_inputs", | 17 "--inputs=$rebase_inputs", |
| 16 "--output=$rebase_output", | 18 "--output=$rebase_output", |
| 17 ] | 19 ] |
| 18 if (defined(invoker.base_dir)) { | 20 if (defined(invoker.base_dir)) { |
| 19 args += [ | 21 args += [ |
| 20 "--base-dir", rebase_path(invoker.base_dir) | 22 "--base-dir", rebase_path(invoker.base_dir) |
| 21 ] | 23 ] |
| 22 } | 24 } |
| 23 } | 25 } |
| 24 } | 26 } |
| 25 | 27 |
| OLD | NEW |