-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitpod.yml
68 lines (64 loc) · 2.27 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
image:
file: .gitpod.Dockerfile
tasks:
- before: sudo mount -t tmpfs shm -osize=4096m /dev/shm
- init: |
flutter channel beta
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: |
# Gitpod is not able to run emulators within a worspace at this stage as
# Google Kubernetes Engine does not support Nested Virtualization.
#
# If running Gitpod on your own infrastructure or via the Dockerfile locally
# on infrastructure that exposes vmx or svm then this command will launch
# the emulator.
#
# $ emulator -avd avd28 -no-audio -no-window
#
# Until this restriction is mitigated you can run native mobile apps in your
# browser via https://appetize.io/
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://$APPETIZE_API_TOKEN@api.appetize.io/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
- command: |
dart pub get
ports:
- port: 5900
onOpen: ignore
# vnc
- port: 6080
onOpen: open-preview
# flutter
- port: 8080
onOpen: open-preview
vscode:
extensions:
- dart-code.flutter