Skip to content

[Tool] Improve flutter build output #120127

@loic-sharma

Description

@loic-sharma

Work

  • Make the Windows build print the build duration in seconds
  • Make Windows builds print the build output path & size
  • Make web builds print the build output path & size

Use case

Building a Flutter app creates a bunch of files and directories in the build directory. Currently, it is difficult to find the build output on web and Windows.

The console output for building an APK contains the APK path:

> flutter build apk

💪 Building with sound null safety 💪

Running Gradle task 'assembleRelease'...                           74.0s
✓  Built build\app\outputs\flutter-apk\app-release.apk (19.8MB).

However, the console output for building a Windows or web app does not:

> flutter build windows

💪 Building with sound null safety 💪

Building Windows application...
> flutter build web

💪 Building with sound null safety 💪

Compiling lib\main.dart for the Web...                             25.1s

Proposal

  1. Make the Windows build print the build duration in seconds
  2. Make the Windows and web builds print the build output path & size

Example:

> flutter build windows

💪 Building with sound null safety 💪

Building Windows application...                             99.9s
✓  Built build\windows\runner\Release\app.exe (19.8MB).
> flutter build web

💪 Building with sound null safety 💪

Compiling lib\main.dart for the Web...                             25.1s
✓  Built build\web\main.dart.js (19.8MB).

/cc @christopherfujino

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: buildBuilding flutter applications with the toolplatform-webWeb applications specificallyplatform-windowsBuilding on or for Windows specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions