Skip to content

Implement custom output directory for all build commands #114538

@eliasyishak

Description

@eliasyishak

Use Case

Users would like to be able to specify where the build artifacts are sent to outside of the standard build directory within a flutter project.

Example: automating web builds so that users can have a daily build based on business rules that are placed in a directory that a cron job checks

Proposal

Similar to what has been completed for web and aar builds, add functionality to all build commands to allow user to specify custom output directory for build artificacts.

All relevant build subcommands can be found in: https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/commands/build.dart#L24-#L44

Commands to be refactored

  • BuildAarCommand
  • BuildApkCommand
  • BuildIOSCommand
  • BuildIOSFrameworkCommand
  • BuildMacOSFrameworkCommand
  • BuildIOSArchiveCommand
  • BuildBundleCommand
  • BuildWebCommand
  • BuildMacosCommand
  • BuildLinuxCommand
  • BuildWindowsCommand

Commands that are unable to be refactored easily ❌

  • BuildAppBundleCommand – configuration for build directory is hard coded in a flutter project's android/build.gradle; additional refactoring would be necessary to pass a directory from tools cli args to grade file

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy