.gitpod.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. image:
  2. file: .gitpod.Dockerfile
  3. tasks:
  4. - before: sudo mount -t tmpfs shm -osize=4096m /dev/shm
  5. - init: |
  6. flutter channel beta
  7. flutter upgrade
  8. # flutter config --enable-web
  9. flutter config --android-sdk /home/gitpod/androidsdk
  10. yes | flutter doctor --android-licenses
  11. # flutter doctor
  12. # flutter pub get
  13. # flutter build -v bundle
  14. # flutter build -v web
  15. # flutter build -v appbundle
  16. # flutter build -v apk
  17. # - command: |
  18. # # Gitpod is not able to run emulators within a worspace at this stage as
  19. # # Google Kubernetes Engine does not support Nested Virtualization.
  20. # #
  21. # # If running Gitpod on your own infrastructure or via the Dockerfile locally
  22. # # on infrastructure that exposes vmx or svm then this command will launch
  23. # # the emulator.
  24. # #
  25. # # $ emulator -avd avd28 -no-audio -no-window
  26. # #
  27. # # Until this restriction is mitigated you can run native mobile apps in your
  28. # # browser via https://appetize.io/
  29. # if [[ -z "$APPETIZE_API_TOKEN" ]]; then
  30. # echo "Appetize API token not set. Run:"
  31. # echo ""
  32. # echo " gp env APPETIZE_API_TOKEN=your_token"
  33. # echo ""
  34. # echo "and restart this workspace in order to get an app preview."
  35. # echo ""
  36. # echo "Request your token here: https://appetize.io/docs#request-api-token"
  37. # else
  38. # curl -sS --http1.1 "https://$APPETIZE_API_TOKEN@api.appetize.io/v1/apps/$APPETIZE_PUBLICKEY" \
  39. # -F "file=@/workspace/template-flutter/build/app/outputs/flutter-apk/app.apk" \
  40. # -F platform=android \
  41. # -F "buttonText=Start App" \
  42. # -F "postSessionButtonText=Start App" \
  43. # > .appetize.json
  44. # APPETIZE_PUBLICKEY=$(jq -r .publicKey .appetize.json)
  45. # gp env "APPETIZE_PUBLICKEY=$APPETIZE_PUBLICKEY"
  46. # export APPETIZE_PUBLICKEY
  47. # python -m webbrowser "https://appetize.io/embed/$APPETIZE_PUBLICKEY?device=pixel4&autoplay=true"
  48. # fi
  49. # flutter devices
  50. # flutter run --web-port 8080
  51. ports:
  52. - port: 5900
  53. onOpen: ignore
  54. # vnc
  55. - port: 6080
  56. onOpen: open-preview
  57. # flutter
  58. - port: 8080
  59. onOpen: open-preview
  60. vscode:
  61. extensions:
  62. - dart-code.flutter