Buck: filegroup()

filegroup()

This rule provides access to a set of files.

Arguments

  • name (required) #

    The name of the rule.

  • srcs (required) #

    The set of files to include in this rule.

  • visibility (defaults to []) #

    List of build target patterns that identify the build rules that can include this rule as a dependency, for example, by listing it in their deps or exported_deps attributes. For more information, see visibility.

  • licenses (defaults to []) #

    Set of license files for this library. To get the list of license files for a given build rule and all of its dependencies, you can use buck query.

  • labels (defaults to []) #

    Set of arbitrary strings which allow you to annotate a build rule with tags that can be searched for over an entire dependency tree using buck query attrfilter.

Examples

In this example a target exports .xml files from all subdirectories in resources.

filegroup(
  name = 'example',
  srcs = glob(['resources/**/*.xml']),
)