From 3c02f509b73dcf9acc0f47378c7f5289ac52a23e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 8 Dec 2025 17:12:15 +0000 Subject: [PATCH] fix: add build_runner step to Dockerfile and update CACHEBUST to v4 Add `dart run build_runner build --delete-conflicting-outputs` step before Flutter build to ensure all generated files (Riverpod and Hive) are fresh and properly generated. This ensures no stale or incompatible generated code causes build failures. Also update CACHEBUST to v4 to force Docker to bypass cache and apply all recent fixes. --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 481200f..9a15090 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN flutter config --enable-web # Copy dependency files first for better caching # Note: pubspec.lock will be generated by flutter pub get if missing # Cache buster - INCREMENT THIS VALUE TO FORCE REBUILD ON DEPLOY -ARG CACHEBUST=2025-12-08-v3 +ARG CACHEBUST=2025-12-08-v4 COPY pubspec.yaml ./ # Get dependencies (generates pubspec.lock automatically) @@ -31,6 +31,9 @@ COPY . . # Re-run pub get after copying source to ensure lockfile consistency RUN flutter pub get +# Generate code (for Riverpod and Hive) +RUN dart run build_runner build --delete-conflicting-outputs + # Clean build environment to avoid conflicts RUN flutter clean