forked from WebTrit/webtrit_phone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (46 loc) · 1.51 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
# Variables
BUILD_TYPE ?= debug
BUILD_PLATFORM ?= apk
BUILD_FLOW ?= classic
DART_DEFINE_FILE = --dart-define-from-file=dart_define.json
CONFIGURATOR = dart run ../webtrit_phone_tools/bin/webtrit_phone_tools.dart
KEYSTORES_PATH = --keystores-path=../webtrit_phone_keystores
# Determine Flutter flags based on build type
ifeq ($(BUILD_TYPE), release)
FLUTTER_FLAGS = $(DART_DEFINE_FILE) --release
else
FLUTTER_FLAGS = $(DART_DEFINE_FILE)
endif
# Rules
.PHONY: run build configure configure-clean create-demo-classic create-ios create-apk create-appbundle
## Run the Flutter application
run:
flutter run $(FLUTTER_FLAGS)
## Build the Flutter application
build:
flutter build $(BUILD_PLATFORM) $(FLUTTER_FLAGS)
## Configure application resources
configure:
$(CONFIGURATOR) configurator-resources --applicationId=$(id) $(KEYSTORES_PATH) --$(BUILD_FLOW)
$(CONFIGURATOR) configurator-generate
## Create demo configuration
configure-demo:
$(CONFIGURATOR) configurator-resources --applicationId=$(id) $(KEYSTORES_PATH) --demo
$(CONFIGURATOR) configurator-generate
## Create classic configuration
configure-classic:
$(CONFIGURATOR) configurator-resources --applicationId=$(id) $(KEYSTORES_PATH) --classic
$(CONFIGURATOR) configurator-generate
## Create iOS build
build-ios:
flutter build ios $(FLUTTER_FLAGS)
## Create APK build
build-apk:
flutter build apk $(FLUTTER_FLAGS)
## Create App Bundle build
build-appbundle:
flutter build appbundle $(FLUTTER_FLAGS)
## Clean git files
clean-git:
git reset --hard HEAD
git clean -df