Buck: apple_resource()


This is liable to change in the future.

An apple_resource() rule contains sets of resource directories, files and file variants that can be bundled in an application bundle. This rule does not have any output on its own and can be built only as a dependency (either direct or transitive) of an apple_bundle() rule.


  • name (required) #

    The name of the rule.

  • dirs (required) #

    Set of paths of resource directories that should be placed in an application bundle.

  • files (required) #

    Set of paths of resource files that should be placed in an application bundle.

  • variants (defaults to []) #

    Set of paths of resource file variants that should be placed in an application bundle. The files mentioned here should be placed in a directory named $VARIANT_NAME.lproj, where $VARIANT_NAME is the name of the variant (e.g. Base, en). This argument makes it possible to use different resource files based on the active locale.

  • resources_from_deps (defaults to []) #

    Set of build targets whose transitive apple_resources should be considered as part of the current resource when collecting resources for bundles. Usually, an apple_bundle collects all apple_resource rules transitively reachable through apple_library rules. This field allows for resources which are not reachable using the above traversal strategy to be considered for inclusion in the bundle.

  • visibility (defaults to []) #

    List of build target patterns that identify the build rules that can include this rule in its deps.

  • 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.


  name = 'Images',
  files = glob([
  dirs = [