Add mobile hot reload and restart commands to Makefile; update NEXT_SPRINT_TASKS with clarification point

This commit is contained in:
Achintha Isuru
2026-02-03 12:25:46 -05:00
parent c2cb0bd82a
commit 11ad6c47d1
3 changed files with 21 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
# --- Mobile App Development ---
.PHONY: mobile-install mobile-info mobile-client-dev-android mobile-staff-dev-android mobile-client-build mobile-staff-build
.PHONY: mobile-install mobile-info mobile-client-dev-android mobile-staff-dev-android mobile-client-build mobile-staff-build mobile-hot-reload mobile-hot-restart
MOBILE_DIR := apps/mobile
@@ -19,6 +19,21 @@ mobile-info:
@echo "--> Fetching mobile command info..."
@cd $(MOBILE_DIR) && melos run info
# --- Hot Reload & Restart ---
mobile-hot-reload:
@echo "--> Triggering hot reload for running Flutter app..."
@cd $(MOBILE_DIR) && echo "r" | nc localhost 54321 2>/dev/null || \
(cd apps/client && flutter attach --pid-file /tmp/flutter_client.pid && echo "r") || \
(cd apps/staff && flutter attach --pid-file /tmp/flutter_staff.pid && echo "r") || \
echo "❌ No running Flutter app found. Start an app first with mobile-client-dev-android or mobile-staff-dev-android"
mobile-hot-restart:
@echo "--> Triggering hot restart for running Flutter app..."
@cd $(MOBILE_DIR) && echo "R" | nc localhost 54321 2>/dev/null || \
(cd apps/client && flutter attach --pid-file /tmp/flutter_client.pid && echo "R") || \
(cd apps/staff && flutter attach --pid-file /tmp/flutter_staff.pid && echo "R") || \
echo "❌ No running Flutter app found. Start an app first with mobile-client-dev-android or mobile-staff-dev-android"
# --- Client App ---
mobile-client-dev-android: dataconnect-generate-sdk
@echo "--> Running client app on Android (device: $(DEVICE))..."