-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathMakefile
More file actions
83 lines (64 loc) · 2.66 KB
/
Copy pathMakefile
File metadata and controls
83 lines (64 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Flutter command - use 'fvm flutter' if using FVM, otherwise 'flutter'
FLUTTER ?= fvm flutter
# Dart command - use 'fvm dart' if using FVM, otherwise 'dart'
DART ?= fvm dart
.PHONY: help clean get codegen release-android release-ios release-apk release-appbundle release-ipa ios-test ios-beta ios-release-candidate ios-production android-release-candidate
help:
@echo "Available targets:"
@echo " clean - Clean the project"
@echo " get - Get dependencies"
@echo " codegen - Run code generation"
@echo " release-android - Build Android release APK"
@echo " release-ios - Build iOS release app"
@echo " release-apk - Build Android release APK"
@echo " release-appbundle - Build Android release App Bundle"
@echo " release-ipa - Build iOS release IPA"
@echo ""
@echo "Fastlane iOS targets:"
@echo " ios-test - Run tests via fastlane"
@echo " ios-beta - Build and deploy to TestFlight"
@echo " ios-production - Promote TestFlight build to App Store"
clean:
$(FLUTTER) clean
get:
$(FLUTTER) pub get
codegen:
$(DART) run build_runner build --delete-conflicting-outputs
# Release builds (with WASM module removal for pdfrx)
release-apk: get codegen
$(DART) run pdfrx:remove_wasm_modules
$(FLUTTER) build apk --release
release-appbundle: get codegen
$(DART) run pdfrx:remove_wasm_modules
$(FLUTTER) build appbundle --release
release-ipa: get codegen
$(DART) run pdfrx:remove_wasm_modules
$(FLUTTER) build ipa --release
# Fastlane android targets
android-beta:
cd android && bundle exec fastlane beta
android-release-candidate:
cd android && bundle exec fastlane release-candidate
android-production:
cd android && bundle exec fastlane production
# Fastlane iOS targets
ios-beta:
cd ios && bundle exec fastlane beta
ios-release-candidate:
cd ios && bundle exec fastlane release-candidate
ios-production:
cd ios && bundle exec fastlane production
# Combined Deployment Targets
.PHONY: deploy-beta deploy-release-candidate deploy-production coverage
# Beta: Deploy to TestFlight beta and Play Store internal
deploy-beta: ios-beta android-beta
# Release Candidate: Promote both iOS and Android to Release Candidate
deploy-release-candidate: ios-release-candidate android-release-candidate
# Production: Promote both iOS and Android to production
deploy-production: ios-production android-production
# Runs tests with coverage and generates HTML coverage report,
# excluding all generated *.g.dart files (Riverpod, Freezed, JSON, etc.)
coverage:
$(FLUTTER) test --coverage
lcov --remove coverage/lcov.info '**/*.g.dart' -o coverage/lcov.info
genhtml coverage/lcov.info -o coverage/html