-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·52 lines (42 loc) · 1.4 KB
/
build.sh
File metadata and controls
executable file
·52 lines (42 loc) · 1.4 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
#!/bin/bash
OS=$(uname)
if [ "$OS" == "Darwin" ]; then
echo "Building App Store IPA"
elif [ "$OS" == "Linux" ]; then
echo "Building selfsigned APK and AAB files"
else
echo "Unsupported operating system: $OS"
fi
echo ">>> flutter clean"
flutter clean
echo ">>> pub get"
flutter pub get
echo ">>> pub upgrade"
flutter pub upgrade --major-versions
echo " pub outdated"
flutter pub outdated
echo ""
read -p "Press enter to continue..."
sleep 1
mkdir artifacts
echo ">>> generate localization files"
dart run intl_utils:generate
if [ "$OS" == "Darwin" ]; then
echo ">>> build IPA"
flutter build ipa
mv build/ios/ipa/Lanis.ipa artifacts/Lanis.ipa
open artifacts
elif [ "$OS" == "Linux" ]; then
echo ">>> build appbundle"
flutter build appbundle --dart-define=cronetHttpNoPlay=true
mv build/app/outputs/bundle/release/app-release.aab artifacts/app-release.aab
echo ">>> build apk"
flutter build apk --split-per-abi --dart-define=cronetHttpNoPlay=true
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk artifacts/app-armeabi-v7a-release-selfsigned.apk
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk artifacts/app-arm64-v8a-release-selfsigned.apk
mv build/app/outputs/flutter-apk/app-x86_64-release.apk artifacts/app-x86_64-release-selfsigned.apk
xdg-open artifacts
# Kill left over gradle daemons
pkill -f '.GradleDaemon.'
fi
echo "done."