Browse Source

update flutter sdk version

liuyuqi-dellpc 2 years ago
parent
commit
059f6d99ce

+ 1 - 1
android-studio/.devcontainer/Dockerfile2

@@ -15,7 +15,7 @@ RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/
 
 USER vscode
 WORKDIR /home/vscode
-ARG FLUTTER_VERSION="2.5.1"
+ARG FLUTTER_VERSION="2.10.5"
 ENV ANDROID_HOME=/home/vscode/androidsdk \
     FLUTTER_HOME=/home/vscode/flutter
 

+ 10 - 8
android-studio/.gitpod.Dockerfile

@@ -5,13 +5,15 @@ SHELL ["/bin/bash", "-c"]
 # 采用 commandlinetools 安装,android 30
 USER root
 ENV ANDROID_HOME=/home/gitpod/androidsdk \
-    FLUTTER_VERSION=2.2.3-stable
+    FLUTTER_VERSION=3.0.5-stable
 
 # Install Open JDK
-USER root
-RUN apt update \
-    && apt install openjdk-8-jdk -y \
-    && update-java-alternatives --set java-1.8.0-openjdk-amd64
+# USER root
+# RUN apt update \
+#     && apt install openjdk-8-jdk -y \
+#     && update-java-alternatives --set java-1.8.0-openjdk-amd64
+USER gitpod
+RUN yes | sdk install java 11.0.16-amzn && sdk default java 11.0.16-amzn
 
 # Install SDK Manager commandlinetools
 USER gitpod
@@ -27,9 +29,9 @@ RUN echo "export ANDROID_HOME=$ANDROID_HOME" >> /home/gitpod/.bashrc \
 
 # Install Android Image version 30
 USER gitpod
-RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-30" "emulator"
-RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-30;google_apis;x86_64"
-RUN echo no | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n avd28 -k "system-images;android-30;google_apis;x86_64"
+RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-31" "emulator"
+RUN yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "system-images;android-31;google_apis;x86_64"
+RUN echo no | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n avd28 -k "system-images;android-31;google_apis;x86_64"
 
 
 # Install Google Chrome

+ 1 - 1
flutter/.devcontainer/Dockerfile

@@ -1,2 +1,2 @@
 
-FROM jianboy/flutter-dev-container:2.10.5
+FROM jianboy/flutter-dev-container:3.0.5

+ 2 - 3
flutter/.devcontainer/Dockerfile2

@@ -1,8 +1,7 @@
 # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/java-8/.devcontainer/base.Dockerfile
 
 # [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye
-ARG VARIANT="bullseye"
-FROM mcr.microsoft.com/vscode/devcontainers/java:0-8-${VARIANT}
+FROM mcr.microsoft.com/azure-functions/java:4-java11-core-tools
 
 # [Option] Install Maven
 ARG INSTALL_MAVEN="false"
@@ -15,7 +14,7 @@ RUN if [ "${INSTALL_MAVEN}" = "true" ]; then su vscode -c "umask 0002 && . /usr/
 
 USER vscode
 WORKDIR /home/vscode
-ARG FLUTTER_VERSION="2.10.5"
+ARG FLUTTER_VERSION="3.0.5"
 ENV ANDROID_HOME=/home/vscode/androidsdk \
     FLUTTER_HOME=/home/vscode/flutter
 

+ 1 - 1
flutter/.devcontainer/devcontainer.json

@@ -22,7 +22,7 @@
 		"java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current",
 		"java.configuration.runtimes": [{
 			"default": true,
-			"name": "JavaSE-1.8",
+			"name": "JavaSE-11",
 			"path": "/usr/local/sdkman/candidates/java/current"
 		}]
 	},

+ 1 - 1
flutter/.github/workflows/android-build.yml

@@ -28,7 +28,7 @@ jobs:
         uses: subosito/flutter-action@v1.5.3
         with:
           channel: "stable"
-          flutter-version: "2.5.2"
+          flutter-version: "3.0.5"
       
       - name: Cache Dependencies
         id: cache

+ 1 - 1
flutter/.github/workflows/ios-build.yml

@@ -32,7 +32,7 @@ jobs:
         uses: subosito/flutter-action@v1.5.3
         with:
           channel: "stable"
-          flutter-version: "2.5.2"
+          flutter-version: "3.0.5"
       
       - name: Cache Dependencies
         id: cache

+ 1 - 1
flutter/.github/workflows/main.yml

@@ -28,7 +28,7 @@ jobs:
         uses: subosito/flutter-action@v1.5.3
         with:
           channel: "stable"
-          flutter-version: "2.5.2"
+          flutter-version: "3.0.5"
       
       - name: Cache Dependencies
         id: cache

+ 12 - 3
flutter/.github/workflows/pc-build.yml

@@ -17,7 +17,10 @@ jobs:
       - uses: actions/checkout@v2.3.4
 
       - name: Setup Flutter SDK
-        uses: subosito/flutter-action@v1.4.0
+        uses: subosito/flutter-action@v1.5.3
+        with:
+          channel: "stable"
+          flutter-version: "3.0.5"
 
       - name: Install Linux build tools
         run: sudo apt-get update && sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
@@ -44,7 +47,10 @@ jobs:
       - uses: actions/checkout@v2.3.4
 
       - name: Setup Flutter SDK
-        uses: subosito/flutter-action@v1.4.0
+        uses: subosito/flutter-action@v1.5.3
+        with:
+          channel: "stable"
+          flutter-version: "3.0.5"
 
       - name: Set Up XCode
         uses: devbotsxyz/xcode-select@v1.1.0
@@ -71,7 +77,10 @@ jobs:
       - uses: actions/checkout@v2.3.4
 
       - name: Setup Flutter SDK
-        uses: subosito/flutter-action@v1.4.0
+        uses: subosito/flutter-action@v1.5.3
+        with:
+          channel: "stable"
+          flutter-version: "3.0.5"
 
       - name: Enable desktop
         run: flutter config --enable-windows-desktop

+ 6 - 6
flutter/.gitpod.Dockerfile

@@ -3,14 +3,14 @@ SHELL ["/bin/bash", "-c"]
 
 # insall flutter and android sdk/ndk/avd/java/gradle 
 ENV ANDROID_HOME=/home/gitpod/androidsdk \
-    FLUTTER_VERSION=2.2.3-stable
+    FLUTTER_VERSION=3.0.5-stable
 ENV ANDROID_VERSION=30
 
-# Install dart
-USER root
-RUN curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
-    && curl -fsSL https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list \
-    && install-packages build-essential dart libkrb5-dev gcc make gradle android-tools-adb android-tools-fastboot
+# # Install dart
+# USER root
+# RUN curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
+#     && curl -fsSL https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list \
+#     && install-packages build-essential dart libkrb5-dev gcc make gradle android-tools-adb android-tools-fastboot
 
 # Install flutter
 USER gitpod

+ 1 - 1
flutter/.gitpod.yml

@@ -20,7 +20,7 @@ tasks:
       # flutter build -v bundle
       # flutter build -v web
       # flutter build -v appbundle
-      flutter build -v apk
+      #flutter build -v apk
       
   - command: |
       # Gitpod is not able to run emulators within a worspace at this stage as