Skip to content

[flutter_tools] Support target-platform agnostic BuildTargets in tool extensions #194810

Open

Description

@bkonyi

Currently, ExtensionBuildTarget and BuildTarget in package:flutter_tools_core and package:flutter_tools_extension require a single targetPlatform string per flutter build <subcommand> target (see #193984).

Built-in build commands such as flutter build linux are registered as a single subcommand that works across host architectures and supports cross-compiling via --target-platform. We should update BuildTarget and ExtensionBuildTarget so a single build target can support multiple target platforms (or be target-platform agnostic), pass the selected target platform in ExtensionBuildContext, and provide a BuiltInPlaceholders.targetArchitecture placeholder for outputDir patterns.

Metadata

Metadata

Assignees

Labels

P2t: extensionsteam-tooltriaged-tool

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions