forked from LibertyGlobal/flutter-tvos-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathninja_build.sh
57 lines (40 loc) · 1.17 KB
/
ninja_build.sh
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
#!/bin/bash
set -e
START_TIME=$SECONDS
date
pwd
if [[ "$1" == "clean" ]]; then
echo "Clean build ..."
rm -rf ./out/ios_debug_sim_unopt
rm -rf ./out/ios_debug_unopt
rm -rf ./out/ios_release
rm -rf ./out/host_debug_unopt
rm -rf ./out/host_release
fi
if [[ "$1" == "clean" ]] || [[ ! -d ./out/ios_debug_sim_unopt ]]; then
./flutter/tools/gn --ios --simulator --unoptimized
fi
ninja -C out/ios_debug_sim_unopt
date
if [[ "$1" == "clean" ]] || [[ ! -d ./out/ios_debug_unopt ]]; then
./flutter/tools/gn --ios --unoptimized --no-goma --bitcode
fi
ninja -C out/ios_debug_unopt
date
if [[ "$1" == "clean" ]] || [[ ! -d ./out/ios_release ]]; then
./flutter/tools/gn --ios --runtime-mode=release --no-goma --bitcode
fi
ninja -C out/ios_release
date
if [[ "$1" == "clean" ]] || [[ ! -d ./out/host_debug_unopt ]]; then
./flutter/tools/gn --unoptimized --no-prebuilt-dart-sdk
fi
ninja -C out/host_debug_unopt
date
if [[ "$1" == "clean" ]] || [[ ! -d ./out/host_release ]]; then
./flutter/tools/gn --no-lto --runtime-mode=release --no-prebuilt-dart-sdk
fi
ninja -C out/host_release
date
ELAPSED_TIME=$(($SECONDS - $START_TIME))
echo "Duration: $(($ELAPSED_TIME/60)) min $(($ELAPSED_TIME%60)) sec"