| |
| # Creates a zip archive of the inputs. |
| # If base_dir is provided, the archive paths will be relative to it. |
| template("zip") { |
| assert(defined(invoker.inputs)) |
| assert(defined(invoker.output)) |
| |
| rebase_inputs = rebase_path(invoker.inputs) |
| rebase_output = rebase_path(invoker.output) |
| action(target_name) { |
| script = "//build/android/gn/zip.py" |
| source_prereqs = invoker.inputs |
| outputs = [invoker.output] |
| args = [ |
| "--inputs=$rebase_inputs", |
| "--output=$rebase_output", |
| ] |
| if (defined(invoker.base_dir)) { |
| args += [ |
| "--base-dir", rebase_path(invoker.base_dir) |
| ] |
| } |
| } |
| } |
| |