From 13de2f63e0695dd037a83dc8e4bd493efe9315c6 Mon Sep 17 00:00:00 2001 From: --global Date: Fri, 24 May 2024 12:55:21 +0700 Subject: [PATCH] fixup! fixup! TW-1781: fix the ci issue --- .github/workflows/gh-pages.yaml | 3 ++- .github/workflows/tests.yaml | 3 ++- ...s.md => 0022-listen-to-presence-status.md} | 0 docs/adr/0023-upgrade-flutter-3.22.md | 21 +++++++++++++++++++ scripts/code_analyze.sh | 3 ++- 5 files changed, 27 insertions(+), 3 deletions(-) rename docs/adr/{0021-listen-to-presence-status.md => 0022-listen-to-presence-status.md} (100%) create mode 100644 docs/adr/0023-upgrade-flutter-3.22.md diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index df20b22e87..b38fbb6e86 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -56,7 +56,8 @@ jobs: flutter config --enable-web flutter clean flutter pub get - flutter pub run build_runner build --delete-conflicting-outputs && flutter gen-l10n + flutter pub run build_runner build --delete-conflicting-outputs + flutter pub get flutter build web --release --verbose --source-maps --base-href="/${GITHUB_REPOSITORY##*/}/$FOLDER/" echo "$TWAKE_PREVIEW_CONFIG" | yq '.issue_id = strenv(FOLDER)' > ./build/web/config.json diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index cc83ec4aa0..a6d82f2e22 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -56,7 +56,8 @@ jobs: - name: Run widget test run: | - flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs && flutter gen-l10n + flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs + flutter pub get flutter test # integration_test: diff --git a/docs/adr/0021-listen-to-presence-status.md b/docs/adr/0022-listen-to-presence-status.md similarity index 100% rename from docs/adr/0021-listen-to-presence-status.md rename to docs/adr/0022-listen-to-presence-status.md diff --git a/docs/adr/0023-upgrade-flutter-3.22.md b/docs/adr/0023-upgrade-flutter-3.22.md new file mode 100644 index 0000000000..62d2e2683e --- /dev/null +++ b/docs/adr/0023-upgrade-flutter-3.22.md @@ -0,0 +1,21 @@ +# 21. Listen to presence status + +Date: 2024-05-24 + +## Status + +Accepted + +## Context + +We need to upgrade the flutter to have up-to-date performance and features + +## Decision + +- remove `background` and `onBackground` color, now use only `surface` and `onSurface` +- change name from `surfaceVariant` => `surfaceContainerHighest`, `MaterialStateProperty` => `WidgetStateProperty`, `MaterialState` => `WidgetState`, use `super.key` for shorter form (new lint rule) +- Migration from `RawKeyEvent` to `KeyEvent`. [Read more](https://docs.flutter.dev/release/breaking-changes/key-event-migration#deprecated-apis-that-have-an-equivalent) (in conclusion, add ignore_deprecated, because that when i test it again, the up/down not work) +- Upgrade flutter_local_notification from `requestPermission` => `requestNotificationsPermission` [Changelog](https://pub.dev/packages/flutter_local_notifications/changelog#16001), [Readmore](https://developer.android.com/develop/ui/views/notifications/notification-permission?hl=vi) +- Upgrade `url_laucher`, change from `Uri` to `WebUri`, remove `ChromeSafariBrowserSettings` in web +- Upgrade `the index.html` file in web folder +- Upgrade other packages in pubspec.yaml to resolve conflicts \ No newline at end of file diff --git a/scripts/code_analyze.sh b/scripts/code_analyze.sh index befafaa9e4..cde50d8697 100755 --- a/scripts/code_analyze.sh +++ b/scripts/code_analyze.sh @@ -1,4 +1,5 @@ #!/bin/sh -ve -flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs && flutter gen-l10n +flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs dart format --set-exit-if-changed lib/ test/ +flutter pub get flutter analyze