Hiro Server — sync after pulling
Run this every time you pull changes or switch branches:Flutter — dev task runner (dev.sh)
device_apps/dev.sh is the primary entry point for all Flutter build and maintenance tasks. It verifies the pinned Flutter version (from .fvmrc) before running anything.
Flutter — run for development
For interactive development (hot reload), useflutter_build.sh directly:
-d <device-id> to target a specific device or emulator. Use ./flutter_build.sh devices to list available targets.
Flutter — build for web
build/web/. To host under a sub-path (e.g. /app/):
You may see Wasm dry-run warnings about
flutter_secure_storage_web using dart:html. These are informational — the standard JavaScript/CanvasKit build succeeds normally. Wasm support for that package is a known upstream limitation.Flutter — build for Android
android-arm64 (arm64-v8a) — the correct ABI for modern 64-bit Android devices. Output is written to build/app/outputs/flutter-apk/.
For a Google Play release bundle or a split-ABI build:
Flutter — code generation (standalone)
During active development, use watch mode so code is regenerated automatically on file save:Always run
./dev.sh --codegen once after flutter pub get on a fresh clone, before attempting any build or run command.android/gradle.properties sets kotlin.incremental=false. This is required when the Flutter Pub cache (C:\Users\...\AppData\Local\Pub\Cache) and the project (D:\...) are on different Windows drives — the Kotlin incremental compiler cannot compute relative paths across drive letters and fails the build otherwise.Troubleshooting
Build fails: 'Error when reading *.freezed.dart' or '*.g.dart'
Build fails: 'Error when reading *.freezed.dart' or '*.g.dart'
The generated source files do not exist yet. Run code generation first, then retry the build:This must be run at least once after a fresh clone and any time you add a new
@freezed model or @riverpod provider.Android build fails: 'this and base files have different roots' (Kotlin cross-drive error)
Android build fails: 'this and base files have different roots' (Kotlin cross-drive error)
This happens on Windows when the Flutter Pub cache is on a different drive than the project (e.g. cache on If you have removed it or are starting from a different branch, add it back and run
C:, project on D:). The Kotlin incremental compiler cannot resolve cross-drive relative paths.The fix is already applied in this repo (android/gradle.properties contains kotlin.incremental=false). If you see this error, verify that line is present:flutter clean before retrying.Android build fails with 'Daemon compilation failed: null' and a long Kotlin stack trace
Android build fails with 'Daemon compilation failed: null' and a long Kotlin stack trace
This is a symptom of the same cross-drive Kotlin incremental cache issue described above. Check that
kotlin.incremental=false is set in android/gradle.properties, then clean and rebuild:Web build shows Wasm warnings about flutter_secure_storage_web
Web build shows Wasm warnings about flutter_secure_storage_web
These warnings are printed by Flutter’s Wasm dry-run check and are expected. The standard JavaScript/CanvasKit web build completes successfully regardless. You can suppress the warnings with
--no-wasm-dry-run, but they do not indicate a real build problem.ModuleNotFoundError when running hirocli after pulling
ModuleNotFoundError when running hirocli after pulling
The server code changed but the installed tool entry-point still points to the old module layout. Run the sync script to reinstall:On Windows, stop the server first (
hirocli stop) so the binary file lock is released before the reinstall.flutter run picks up stale generated code after adding a new model
flutter run picks up stale generated code after adding a new model
Hot reload does not trigger code generation. After adding a new
@freezed model or @riverpod provider, stop the app, run build_runner build, then restart: