forked from jiyuujin/template_flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitpod.yml
47 lines (45 loc) · 1.6 KB
/
.gitpod.yml
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
image:
file: .gitpod.dockerfile
tasks:
- before: sudo mount -t tmpfs shm -osize=4096m /dev/shm
- init: |
flutter upgrade
flutter config --enable-web
flutter config --android-sdk /home/gitpod/androidsdk
yes | flutter doctor --android-licenses
flutter doctor
flutter pub get
flutter build -v bundle
flutter build -v web
flutter build -v appbundle
flutter build -v apk
- command: |
if [[ -z "$APPETIZE_API_TOKEN" ]]; then
echo "Appetize API token not set. Run:"
echo ""
echo " gp env APPETIZE_API_TOKEN=your_token"
echo ""
echo "and restart this workspace in order to get an app preview."
echo ""
echo "Request your token here: https://appetize.io/docs#request-api-token"
else
curl -sS --http1.1 "https://[email protected]/v1/apps/$APPETIZE_PUBLICKEY" \
-F "file=@/workspace/template-flutter/build/app/outputs/flutter-apk/app.apk" \
-F platform=android \
-F "buttonText=Start App" \
-F "postSessionButtonText=Start App" \
> .appetize.json
APPETIZE_PUBLICKEY=$(jq -r .publicKey .appetize.json)
gp env "APPETIZE_PUBLICKEY=$APPETIZE_PUBLICKEY"
export APPETIZE_PUBLICKEY
python -m webbrowser "https://appetize.io/embed/$APPETIZE_PUBLICKEY?device=pixel4&autoplay=true"
fi
flutter devices
flutter run --web-port 8080
ports:
- port: 5900
onOpen: ignore
- port: 6080
onOpen: open-preview
- port: 8080
onOpen: open-preview