-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
105 lines (87 loc) · 2.9 KB
/
Makefile
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.PHONY: clean get analyze format build-runner watch test build-ios build-ios-all build-android build-android-all run dev-setup rebuild check create-podspec help
# Clean build files
clean:
@echo "Cleaning..."
@rm -rf build
@rm -rf .dart_tool
@fvm flutter clean
# Get packages
get:
@echo "Getting packages..."
@fvm flutter pub get
# Analyze code
analyze:
@echo "Analyzing..."
@fvm flutter analyze
# Format code
format:
@echo "Formatting..."
@dart format lib
@dart format test
@dart fix --apply
# Generate files
build-runner:
@echo "Generating files..."
@fvm flutter pub run build_runner build --delete-conflicting-outputs
# Watch files and generate
watch:
@echo "Watching files..."
@fvm flutter pub run build_runner watch --delete-conflicting-outputs
# Run tests
test:
@echo "Running tests..."
@fvm flutter test
# Build iOS
build-ios:
@echo "Building iOS..."
@cd ios && pod install
@cd ..
@make create-podspec
@fvm flutter build ios
# Build Android
build-android:
@echo "Building Android..."
@fvm flutter build apk
# Run app
run:
@echo "Running app..."
@fvm flutter run
# All-in-one development setup
dev-setup: clean get build-runner
# Run all checks
check: format analyze test
# Build Android --all
build-android-all: clean get build-runner build-android
# Build iOS --all
build-ios-all: clean get build-runner build-ios
# Rebuild everything
rebuild: clean get build-runner check build-ios build-android
# Unity関連の変数
UNITY_LIBRARY_PATH = ios/UnityLibrary
PODSPEC_PATH = $(UNITY_LIBRARY_PATH)/UnityFramework.podspec
TEMPLATE_PATH = scripts/templates/UnityFramework.podspec.template
# Podspecファイルの作成
create-podspec:
@echo "Creating UnityFramework.podspec..."
@mkdir -p $(UNITY_LIBRARY_PATH)
@cp $(TEMPLATE_PATH) $(PODSPEC_PATH)
@echo "UnityFramework.podspec created successfully"
# Help
help:
@echo "Available commands:"
@echo " make dev-setup - 開発環境のセットアップ(clean, get, build-runner)"
@echo " make get - パッケージの取得"
@echo " make analyze - コードの分析"
@echo " make format - コードのフォーマット"
@echo " make build-runner - コードファイルの生成"
@echo " make watch - コードファイルの監視と生成"
@echo " make check - すべてのチェックを実行(format, analyze, test)"
@echo " make test - テストの実行"
@echo " make build-ios - iOSアプリのビルド"
@echo " make build-ios-all - iOSアプリのビルド(clean, get, build-runner, build-ios)"
@echo " make build-android - Androidアプリのビルド"
@echo " make build-android-all - Androidアプリのビルド(clean, get, build-runner, build-android)"
@echo " make run - アプリの実行"
@echo " make rebuild - すべてのビルド"
@echo " make clean - ビルドファイルのクリーンアップ"
@echo " make create-podspec - UnityFramework.podspecの作成"