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.