blob: 2339f182d7a24274dd8d228cf55d70c1d222f60d [file]
# Copyright 2019 The Fuchsia 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.gni")
# Define pkg_resolver configuration data to be included in the
# config-data package.
#
# enable_dynamic_configuration
# [bool] enable editing package URL rewrite rules and repository configs.
#
template("pkg_resolver_config") {
cfg = {
forward_variables_from(invoker, [ "enable_dynamic_configuration" ])
assert(defined(enable_dynamic_configuration),
"enable_dynamic_configuration must be defined")
}
config_path = "$target_gen_dir/pkg_resolver_config.json"
write_file(config_path, cfg, "json")
config_data(target_name) {
for_pkg = "pkg-resolver"
outputs = [ "config.json" ]
sources = [ config_path ]
forward_variables_from(invoker, [ "deps" ])
}
}