chore: upgrade flutter to 3.10.1 (#2619)

* chore: upgrade flutter and dart

* ci: upgrade flutter in cicd

* fix: remove textstyle_extensions from flowy_infra

* ci: upgrade flutter in cicd

* fix: update flutter.toml

* fix: deprecations and ffi

* fix: move json_annotation to dependencies

Must have accidentally moved it to dev_dependencies when upgrading dependencies

* fix: update editor ref and use fold

* chore: try with generate true
This commit is contained in:
Mathias Mogensen
2023-05-28 05:09:39 +01:00
committed by GitHub
parent 45d0d41830
commit cdfb634aa6
53 changed files with 478 additions and 538 deletions

View File

@ -38,7 +38,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.7.5-stable.tar.xz && \
https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.10.1-stable.tar.xz && \
tar -xf flutter.tar.xz && \
rm flutter.tar.xz
RUN flutter config --enable-linux-desktop

View File

@ -1,5 +1,5 @@
echo 'Generating language files'
cd appflowy_flutter
call flutter pub run easy_localization:generate -S assets/translations/
call flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations/ -s en.json
call dart run easy_localization:generate -S assets/translations/
call dart run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations/ -s en.json

View File

@ -2,5 +2,5 @@
#!/usr/bin/env fish
echo 'Generating language files'
cd appflowy_flutter
flutter pub run easy_localization:generate -S assets/translations/
flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json
dart run easy_localization:generate -S assets/translations/
dart run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations -s en.json

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.7.5
if [ "$FLUTTER_VERSION" = "3.7.5" ]; then
echo "Flutter version is already 3.7.5"
# Check if the current version is 3.10.1
if [ "$FLUTTER_VERSION" = "3.10.1" ]; then
echo "Flutter version is already 3.10.1"
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.7.5 of Flutter
git checkout 3.7.5
# Use git to checkout version 3.10.1 of Flutter
git checkout 3.10.1
# Get back to current working directory
cd "$current_dir"
echo "Switched to Flutter version 3.7.5"
echo "Switched to Flutter version 3.10.1"
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.7.5
if [ "$FLUTTER_VERSION" = "3.7.5" ]; then
echo "Flutter version is already 3.7.5"
# Check if the current version is 3.10.1
if [ "$FLUTTER_VERSION" = "3.10.1" ]; then
echo "Flutter version is already 3.10.1"
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.7.5 of Flutter
git checkout 3.7.5
# Use git to checkout version 3.10.1 of Flutter
git checkout 3.10.1
# Get back to current working directory
cd "$current_dir"
echo "Switched to Flutter version 3.7.5"
echo "Switched to Flutter version 3.10.1"
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.7.5
if [ "$FLUTTER_VERSION" = "3.7.5" ]; then
echo "Flutter version is already 3.7.5"
# Check if the current version is 3.10.1
if [ "$FLUTTER_VERSION" = "3.10.1" ]; then
echo "Flutter version is already 3.10.1"
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.7.5 of Flutter
git checkout 3.7.5
# Use git to checkout version 3.10.1 of Flutter
git checkout 3.10.1
# Get back to current working directory
cd "$current_dir"
echo "Switched to Flutter version 3.7.5"
echo "Switched to Flutter version 3.10.1"
fi
# Add pub cache and cargo to PATH

View File

@ -189,8 +189,8 @@ script = [
cd appflowy_flutter
flutter clean
flutter packages pub get
flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
flutter packages pub run build_runner build --delete-conflicting-outputs
dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
dart run build_runner build -d
""",
]
@ -201,8 +201,8 @@ script = [
cd ./appflowy_flutter/
exec cmd.exe /c flutter clean
exec cmd.exe /c flutter packages pub get
exec cmd.exe /c flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
exec cmd.exe /c flutter packages pub run build_runner build --delete-conflicting-outputs
exec cmd.exe /c dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
exec cmd.exe /c dart run build_runner build -d
""",
]
@ -211,8 +211,8 @@ script_runner = "@shell"
script = [
"""
cd appflowy_flutter
flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
flutter packages pub run build_runner build --delete-conflicting-outputs
dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
dart run build_runner build -d
""",
]
@ -221,7 +221,7 @@ script_runner = "@duckscript"
script = [
"""
cd ./appflowy_flutter/
exec cmd.exe /c flutter packages pub run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
exec cmd.exe /c flutter packages pub run build_runner build --delete-conflicting-outputs
exec cmd.exe /c dart run easy_localization:generate -S assets/translations/ -f keys -o locale_keys.g.dart -S assets/translations -s en.json
exec cmd.exe /c dart run build_runner build -d
""",
]