diff options
Diffstat (limited to 'build/config/android/internal_rules.gni')
-rw-r--r-- | build/config/android/internal_rules.gni | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni new file mode 100644 index 0000000..b3114ef --- /dev/null +++ b/build/config/android/internal_rules.gni @@ -0,0 +1,25 @@ + +# 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) + ] + } + } +} + |