| # Copyright 2017 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/android/rules.gni") |
| |
| template("manifest_processor_template") { |
| set_sources_assignment_filter([]) |
| forward_variables_from(invoker, [ "testonly" ]) |
| |
| assert(defined(invoker.input)) |
| assert(defined(invoker.output)) |
| |
| action(target_name) { |
| forward_variables_from(invoker, |
| [ |
| "visibility", |
| "deps", |
| ]) |
| sources = [ |
| invoker.config_file, |
| invoker.input, |
| ] |
| script = "//chrome/android/webapk/shell_apk/manifest_processor.py" |
| |
| outputs = [ |
| invoker.output, |
| ] |
| |
| args = [ |
| "--template", |
| rebase_path(invoker.input, root_build_dir), |
| "--config_file", |
| rebase_path(invoker.config_file, root_build_dir), |
| "--output", |
| rebase_path(invoker.output, root_build_dir), |
| ] |
| if (defined(invoker.extra_variables)) { |
| extra_variables = invoker.extra_variables |
| args += [ "--extra_variables=${extra_variables}" ] |
| } |
| } |
| } |