English
Common commands
Everything you do day to day goes through tool/task.dart, run from the repository root:
bash
fvm dart tool/task.dart <command>Command reference
| Command | What it does |
|---|---|
run | flutter run; extra arguments go after -- |
build-apk | Builds the Android APK |
build-ios | Builds for iOS |
analyze | Generated-output consistency + layer check + flutter analyze |
check-layers | Runs only the layer check |
test | Runs the affected packages (see below) |
test-mobile | Runs only the tests in mobile/ |
build-runner | Runs build_runner across the workspace and formats the result |
gen-rust | Regenerates the Rust FFI bindings |
i18n | Regenerates the slang copy |
pigeon | Regenerates moodiary_native platform bindings |
migrations | Generates drift schema snapshots and migration step helpers |
gen | gen-rust + i18n + pigeon |
deps | Prints the package dependency graph |
clean | Clears the build hook cache |
Running and building
bash
fvm dart tool/task.dart run -- --flavor production # Android
fvm dart tool/task.dart run # iOS; select an iOS device
fvm dart tool/task.dart build-apk # defaults to production
fvm dart tool/task.dart build-apk -- --flavor alpha --release
fvm dart tool/task.dart build-iosTesting
bash
fvm dart tool/task.dart test # default: branch changes since the merge-base with origin/develop
fvm dart tool/task.dart test --diff=origin/develop
fvm dart tool/task.dart test --all # the whole repository, which is what CI uses- "Affected" means the packages that changed relative to the baseline, plus everything that transitively depends on them.
- All selected test directories run in one
flutter testprocess from the root. The default baseline falls back toHEADif the merge-base is unavailable; uncommitted and untracked files are included. - Root
pubspec.yaml/pubspec.lockchanges select the whole repository. - See Testing for build-hook details.
WARNING
Running flutter test directly in the repository root finds no tests at all. Always go through task.dart.
Code generation
bash
fvm dart tool/task.dart build-runner # riverpod_generator / freezed / json_serializable / drift
fvm dart tool/task.dart gen-rust # after changing rust/src/api
fvm dart tool/task.dart i18n # after changing i18n/flutter or mui stringsSee Code generation for the details.
Checks on the Rust side
bash
for d in packages/foundation/*/rust; do
(cd "$d" && cargo clippy --all-targets -- -D warnings && cargo test)
doneNote the glob over packages/foundation/*/rust: iterating over a hand-written list of package names makes it easy to miss fast_core.
Melos
Use fvm dart run melos bs (melos bootstrap) to sync shared dependencies, run pub get, and rebuild the IDE module files; melos list and melos run <script> --category <layer> let you filter by layer. For everyday code generation, checks and tests, stick to task.dart — it guards the order in which things run.