output_files
A rule that provides file(s) specific via DefaultInfo from a given target's DefaultInfo or OutputGroupInfo.
See also select_file from bazel-skylib.
Rules
output_files
A rule that provides file(s) specific via DefaultInfo from a given target's DefaultInfo or OutputGroupInfo
Example usage (generated):
load("@aspect_bazel_lib//lib:output_files.bzl", "output_files")
output_files(
# A unique name for this target.
name = "",
# the target to look in for requested paths in its' DefaultInfo or OutputGroupInfo
target = "",
# the paths of the file(s), relative to their roots, to provide via DefaultInfo from the given target's DefaultInfo or OutputGroupInfo
paths = [],
)
name
Required name.
A unique name for this target.
target
Required label.
the target to look in for requested paths in its' DefaultInfo or OutputGroupInfo
paths
Required list of strings.
the paths of the file(s), relative to their roots, to provide via DefaultInfo from the given target's DefaultInfo or OutputGroupInfo
output_group
Optional string.
Default: ""
if set, we look in the specified output group for paths instead of DefaultInfo
Macros and Functions
make_output_files
Helper function to generate a output_files target and return its label.
Example usage (generated):
load("@aspect_bazel_lib//lib:output_files.bzl", "make_output_files")
make_output_files(
# unique name for the generated `output_files` target
name = "",
# `target` attribute passed to generated `output_files` target
target = None,
# `paths` attribute passed to generated `output_files` target
paths = None,
)
name
Required.
unique name for the generated output_files
target
target
Required.
target
attribute passed to generated output_files
target
paths
Required.
paths
attribute passed to generated output_files
target
kwargs
Optional.
parameters to pass to generated output_files
target