fuchsia_package

Builds a fuchsia package.

This rule produces a fuchsia package which can be published to a package server and loaded on a device.

This macro will expand out into several fuchsia tasks that can be run by a bazel invocation. Given a package definition, the following targets will be created.

fuchsia_package(
    name = "pkg",
    components = [":my_component"],
    tools = [":my_tool"]
)
  • pkg.help: Calling run on this target will show the valid macro-expanded targets
  • pkg.publish: Calling run on this target will publish the package
  • pkg.my_component: Calling run on this target will call ffx component run with the component url if it is fuchsia_component instance and will call ffx driver register if it is a fuchsia_driver_component.
  • pkg.my_tool: Calling run on this target will call ffx driver run-tool if the tool is a fuchsia_driver_tool

PARAMETERS

Name Description Default
name The target name. -
package_name An optional name to use for this package, defaults to name. None
archive_name An optional name for the generated archive. The extension .far will be
appended if the name does not already end in this. Defaults to package_name.
None
package_repository_name Optional name of the repository to place this package in. None
disable_repository_name Optional name of the repository that contains the pre-existing
driver we want to disable. This is only used when we want to disable a pre-existing driver
so we can register another driver.
None
platform Optionally override the platform to build the package for. None
fuchsia_api_level The API level to build for. None
components A list of components to add to this package. The dependencies
of these targets will have their debug symbols stripped and added to
the build-id directory.
[]
resources A list of additional resources to add to this package. These
resources will not have debug symbols stripped.
[]
tools Additional tools that should be added to this package. []
subpackages Additional subpackages that should be added to this package. []
tags Standard meaning. []
testonly Standard meaning. None
visibility Standard meaning. None
kwargs Extra attributes to pass along to the build rule. -