-
Notifications
You must be signed in to change notification settings - Fork 16
/
Justfile
61 lines (52 loc) · 1.57 KB
/
Justfile
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
# VERSION := `sed -n 's/^version: \([^ ]*\).*/\1/p' pubspec.yaml`
# Run Flutter project
dev:
@echo "------------------------------"
@echo "Running Flutter project......"
@flutter run
# Flutter clean
clean:
@echo "------------------------------"
@echo "Cleaning Flutter project......"
@flutter clean
@flutter pub get
# Update Flutter project
update:
@echo "------------------------------"
@echo "Update Flutter project......"
@flutter pub get
@flutter pub outdated
@flutter pub upgrade --major-versions
# Check Flutter project
check:
@echo "------------------------------"
@echo "Checking Flutter project......"
@dart format ./lib
@flutter analyze
# Add a new package
add package:
@echo "------------------------------"
@echo "Add a new package: {{ package }}......"
@flutter pub add {{ package }}
# Build generated files
isar:
@echo "------------------------------"
@echo "Building Isar......."
@flutter pub run build_runner build
# Build Android apk
apk:
@echo "------------------------------"
@echo "Building Android apk......"
@flutter build apk \
--dart-define AmapAndroidApiKey=$AmapAndroidApiKey
# Build Android apks by splitting per abi
apks:
@echo "------------------------------"
@echo "Building Android apks......"
@flutter build apk --split-per-abi \
--dart-define AmapAndroidApiKey=$AmapAndroidApiKey
# Share apks with dufs
share: apks
@echo "------------------------------"
@echo "Share apks with dufs......"
@cd ./build/app/outputs/flutter-apk && dufs -A