Files
Krow-workspace/makefiles/mobile.mk
Achintha Isuru 9f8b60d571 feat: Update application status handling and improve build configuration
- Added handling for the COMPLETED application status in the CoverageRepositoryImpl to return 'confirmed'.
- Updated mobile client build and run commands in the makefile to include `--dart-define-from-file=../../config.dev.json` for better configuration management.
2026-02-01 13:20:24 -05:00

53 lines
2.1 KiB
Makefile

# --- Mobile App Development ---
.PHONY: mobile-install mobile-info mobile-client-dev-android mobile-staff-dev-android mobile-client-build mobile-staff-build
MOBILE_DIR := apps/mobile
# Device ID for running mobile apps (override with DEVICE=<id>)
# Find your device ID with: flutter devices
DEVICE ?= android
# --- General ---
mobile-install: install-melos
@echo "--> Bootstrapping mobile workspace (Melos)..."
@cd $(MOBILE_DIR) && melos bootstrap
@echo "--> Generating localization files..."
@cd $(MOBILE_DIR) && melos run gen:l10n
mobile-info:
@echo "--> Fetching mobile command info..."
@cd $(MOBILE_DIR) && melos run info
# --- Client App ---
mobile-client-dev-android:
@echo "--> Running client app on Android (device: $(DEVICE))..."
@cd $(MOBILE_DIR) && melos run start:client -- -d $(DEVICE) --dart-define-from-file=../../config.dev.json
mobile-client-build:
@if [ -z "$(PLATFORM)" ]; then \
echo "ERROR: PLATFORM is required (e.g. make mobile-client-build PLATFORM=apk)"; exit 1; \
fi
$(eval MODE ?= release)
@echo "--> Building client app for $(PLATFORM) in $(MODE) mode..."
@cd $(MOBILE_DIR) && \
melos exec --scope="core_localization" -- "dart run slang" && \
melos exec --scope="core_localization" -- "dart run build_runner build --delete-conflicting-outputs" && \
melos exec --scope="krowwithus_client" -- "flutter build $(PLATFORM) --$(MODE) --dart-define-from-file=../../config.dev.json"
# --- Staff App ---
mobile-staff-dev-android:
@echo "--> Running staff app on Android (device: $(DEVICE))..."
@cd $(MOBILE_DIR) && melos run start:staff -- -d $(DEVICE)
mobile-staff-build:
@if [ -z "$(PLATFORM)" ]; then \
echo "ERROR: PLATFORM is required (e.g. make mobile-staff-build PLATFORM=apk)"; exit 1; \
fi
$(eval MODE ?= release)
@echo "--> Building staff app for $(PLATFORM) in $(MODE) mode..."
@cd $(MOBILE_DIR) && \
melos exec --scope="core_localization" -- "dart run slang" && \
melos exec --scope="core_localization" -- "dart run build_runner build --delete-conflicting-outputs" && \
melos exec --scope="krowwithus_staff" -- "flutter build $(PLATFORM) --$(MODE)"