feat: upgrade to flutter 3.16 (#4119)

* feat: upgrade to flutter 3.16

* chore: adjust flutter 3.16 new api

* chore: code format

* fix: ci lint

* chore: code format

* chore: dart format
This commit is contained in:
Lucas.Xu
2023-12-08 20:01:54 +07:00
committed by GitHub
parent 6338ca1417
commit ef49cb6577
140 changed files with 575 additions and 605 deletions

View File

@ -39,7 +39,7 @@ RUN source ~/.cargo/env && \
RUN sudo pacman -S --noconfirm git tar gtk3
RUN curl -sSfL \
--output flutter.tar.xz \
https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.13.9-stable.tar.xz && \
https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.16.2-stable.tar.xz && \
tar -xf flutter.tar.xz && \
rm flutter.tar.xz
RUN flutter config --enable-linux-desktop

View File

@ -44,9 +44,9 @@ printMessage "Setting up Flutter"
# Get the current Flutter version
FLUTTER_VERSION=$(flutter --version | grep -oE 'Flutter [^ ]+' | grep -oE '[^ ]+$')
# Check if the current version is 3.13.9
if [ "$FLUTTER_VERSION" = "3.13.9" ]; then
echo "Flutter version is already 3.13.9"
# Check if the current version is 3.16.2
if [ "$FLUTTER_VERSION" = "3.16.2" ]; then
echo "Flutter version is already 3.16.2"
else
# Get the path to the Flutter SDK
FLUTTER_PATH=$(which flutter)
@ -55,12 +55,12 @@ else
current_dir=$(pwd)
cd $FLUTTER_PATH
# Use git to checkout version 3.13.9 of Flutter
git checkout 3.13.9
# Use git to checkout version 3.16.2 of Flutter
git checkout 3.16.2
# Get back to current working directory
cd "$current_dir"
echo "Switched to Flutter version 3.13.9"
echo "Switched to Flutter version 3.16.2"
fi
# Enable linux desktop

View File

@ -38,9 +38,9 @@ fi
printMessage "Setting up Flutter"
# Get the current Flutter version
FLUTTER_VERSION=$(flutter --version | grep -oP 'Flutter \K\S+')
# Check if the current version is 3.13.9
if [ "$FLUTTER_VERSION" = "3.13.9" ]; then
echo "Flutter version is already 3.13.9"
# Check if the current version is 3.16.2
if [ "$FLUTTER_VERSION" = "3.16.2" ]; then
echo "Flutter version is already 3.16.2"
else
# Get the path to the Flutter SDK
FLUTTER_PATH=$(which flutter)
@ -49,12 +49,12 @@ else
current_dir=$(pwd)
cd $FLUTTER_PATH
# Use git to checkout version 3.13.9 of Flutter
git checkout 3.13.9
# Use git to checkout version 3.16.2 of Flutter
git checkout 3.16.2
# Get back to current working directory
cd "$current_dir"
echo "Switched to Flutter version 3.13.9"
echo "Switched to Flutter version 3.16.2"
fi
# Enable linux desktop

View File

@ -41,9 +41,9 @@ printMessage "Setting up Flutter"
# Get the current Flutter version
FLUTTER_VERSION=$(flutter --version | grep -oE 'Flutter [^ ]+' | grep -oE '[^ ]+$')
# Check if the current version is 3.13.9
if [ "$FLUTTER_VERSION" = "3.13.9" ]; then
echo "Flutter version is already 3.13.9"
# Check if the current version is 3.16.2
if [ "$FLUTTER_VERSION" = "3.16.2" ]; then
echo "Flutter version is already 3.16.2"
else
# Get the path to the Flutter SDK
FLUTTER_PATH=$(which flutter)
@ -52,12 +52,12 @@ else
current_dir=$(pwd)
cd $FLUTTER_PATH
# Use git to checkout version 3.13.9 of Flutter
git checkout 3.13.9
# Use git to checkout version 3.16.2 of Flutter
git checkout 3.16.2
# Get back to current working directory
cd "$current_dir"
echo "Switched to Flutter version 3.13.9"
echo "Switched to Flutter version 3.16.2"
fi
# Enable linux desktop

View File

@ -48,9 +48,9 @@ fi
printMessage "Setting up Flutter"
# Get the current Flutter version
FLUTTER_VERSION=$(flutter --version | grep -oP 'Flutter \K\S+')
# Check if the current version is 3.13.9
if [ "$FLUTTER_VERSION" = "3.13.9" ]; then
echo "Flutter version is already 3.13.9"
# Check if the current version is 3.16.2
if [ "$FLUTTER_VERSION" = "3.16.2" ]; then
echo "Flutter version is already 3.16.2"
else
# Get the path to the Flutter SDK
FLUTTER_PATH=$(which flutter)
@ -59,12 +59,12 @@ else
current_dir=$(pwd)
cd $FLUTTER_PATH
# Use git to checkout version 3.13.9 of Flutter
git checkout 3.13.9
# Use git to checkout version 3.16.2 of Flutter
git checkout 3.16.2
# Get back to current working directory
cd "$current_dir"
echo "Switched to Flutter version 3.13.9"
echo "Switched to Flutter version 3.16.2"
fi
# Add pub cache and cargo to PATH

View File

@ -166,7 +166,7 @@ script = [
fi
mkdir -p ${output_path}
product=${PRODUCT_NAME}-arm64-v8a-release.${PRODUCT_EXT}
product=${PRODUCT_NAME}.${PRODUCT_EXT}
cp -R ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/appflowy_flutter/build/${TARGET_OS}/Build/Products/${FLUTTER_OUTPUT_DIR}/${product} \
${output_path}/${product}
""",