Notes about “flutter assemble”

Monday, 15 May 2023

flutter assemble provides a low level API to interact with the flutter tool build system. It was implemented in PR #32816.

Example invocation that generates flutter_assets directory and arm64-v8 directory containing app.so:

flutter assemble android_aot_bundle_release_android-arm64 \
    --define BuildMode=release \
    --define TargetPlatform=android-arm64 \
    --output ~/Desktop

Invocation that generates flutter_assets with debug contents:

flutter assemble debug_android_application \
    --define BuildMode=debug \
    --define TargetPlatform=android-arm64 \
    --output ~/Desktop

Invocation spied from running ./gradlew :app:assembleDebug --info:

/home/bartek/flutter/bin/flutter --quiet assemble \
    --no-version-check \
    --depfile /home/bartek/dev/discover_rudy/build/app/intermediates/flutter/debug/flutter_build.d \
    --output /home/bartek/dev/discover_rudy/build/app/intermediates/flutter/debug \
    -dTargetFile=lib/main.dart \
    -dTargetPlatform=android \
    -dBuildMode=debug \
    -dTrackWidgetCreation=true \
    debug_android_application

flutter assemble is called by the Flutter Gradle Plugin, here.


2024-11-12 – Liminal spaces
2024-08-18 – frp (Fast Reverse Proxy) instead of ngrok
2024-08-16 – Cirrus CI is the best CI system out there
2024-08-14 – Going to Berlin for Droidcon/Fluttercon
2024-06-25 – I was awarded Google Open Source Peer Bonus
2024-06-04 – My journey to Google I/O ’24
2024-05-11 – GitHub Actions beg for a supply chain attack
2024-03-19 – Writing a custom Dart VM service extension (part 1)
2024-02-08 – On using smartphone for things that make sense
2023-11-30 – Semantics in Flutter - under the hood
2023-11-25 – Flutter Engine notes
2023-09-17 – Creating and managing Android Virtual Devices using the terminal
2023-05-27 – Suckless Android SDK setup
2023-05-26 – Let’s start over
2023-05-21 – Short thought on “The Zen of Unix”
2023-05-15 – Notes about “flutter assemble”
2019-01-07 – Google Code-in 2018