upgraded flutter to v2.8.1

This commit is contained in:
Thibault Deckers 2021-12-19 22:37:59 +09:00
parent 5198f07e3d
commit cd8ffb63bc
10 changed files with 56 additions and 66 deletions

View file

@ -15,7 +15,7 @@ jobs:
- uses: subosito/flutter-action@v1 - uses: subosito/flutter-action@v1
with: with:
channel: stable channel: stable
flutter-version: '2.8.0' flutter-version: '2.8.1'
- name: Clone the repository. - name: Clone the repository.
uses: actions/checkout@v2 uses: actions/checkout@v2

View file

@ -17,7 +17,7 @@ jobs:
- uses: subosito/flutter-action@v1 - uses: subosito/flutter-action@v1
with: with:
channel: stable channel: stable
flutter-version: '2.8.0' flutter-version: '2.8.1'
# Workaround for this Android Gradle Plugin issue (supposedly fixed in AGP 4.1): # Workaround for this Android Gradle Plugin issue (supposedly fixed in AGP 4.1):
# https://issuetracker.google.com/issues/144111441 # https://issuetracker.google.com/issues/144111441
@ -52,12 +52,12 @@ jobs:
rm release.keystore.asc rm release.keystore.asc
mkdir outputs mkdir outputs
(cd scripts/; ./apply_flavor_play.sh) (cd scripts/; ./apply_flavor_play.sh)
flutter build appbundle -t lib/main_play.dart --flavor play --bundle-sksl-path shaders_2.8.0.sksl.json flutter build appbundle -t lib/main_play.dart --flavor play --bundle-sksl-path shaders_2.8.1.sksl.json
cp build/app/outputs/bundle/playRelease/*.aab outputs cp build/app/outputs/bundle/playRelease/*.aab outputs
flutter build apk -t lib/main_play.dart --flavor play --bundle-sksl-path shaders_2.8.0.sksl.json flutter build apk -t lib/main_play.dart --flavor play --bundle-sksl-path shaders_2.8.1.sksl.json
cp build/app/outputs/apk/play/release/*.apk outputs cp build/app/outputs/apk/play/release/*.apk outputs
(cd scripts/; ./apply_flavor_izzy.sh) (cd scripts/; ./apply_flavor_izzy.sh)
flutter build apk -t lib/main_izzy.dart --flavor izzy --split-per-abi --bundle-sksl-path shaders_2.8.0.sksl.json flutter build apk -t lib/main_izzy.dart --flavor izzy --split-per-abi --bundle-sksl-path shaders_2.8.1.sksl.json
cp build/app/outputs/apk/izzy/release/*.apk outputs cp build/app/outputs/apk/izzy/release/*.apk outputs
rm $AVES_STORE_FILE rm $AVES_STORE_FILE
env: env:

View file

@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file.
### Changed ### Changed
- upgraded Flutter to stable v2.8.0 - upgraded Flutter to stable v2.8.1
## <a id="v1.5.7"></a>[v1.5.7] - 2021-12-01 ## <a id="v1.5.7"></a>[v1.5.7] - 2021-12-01

View file

@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.6.0' ext.kotlin_version = '1.6.10'
repositories { repositories {
google() google()
mavenCentral() mavenCentral()

View file

@ -283,7 +283,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
]; ];
} }
// key is expected by test driver (e.g. 'menu-sort', 'menu-group', 'menu-map') // key is expected by test driver (e.g. 'menu-configureView', 'menu-map')
Key _getActionKey(EntrySetAction action) => Key('menu-${action.name}'); Key _getActionKey(EntrySetAction action) => Key('menu-${action.name}');
Widget _toActionButton(EntrySetAction action, {required bool enabled}) { Widget _toActionButton(EntrySetAction action, {required bool enabled}) {

View file

@ -78,7 +78,7 @@ class _TileViewDialogState<S, G, L> extends State<TileViewDialog<S, G, L>> with
final tabs = <Tuple2<Tab, Widget>>[ final tabs = <Tuple2<Tab, Widget>>[
if (sortOptions.isNotEmpty) if (sortOptions.isNotEmpty)
Tuple2( Tuple2(
_buildTab(context, AIcons.sort, l10n.viewDialogTabSort), _buildTab(context, const Key('tab-sort'), AIcons.sort, l10n.viewDialogTabSort),
Column( Column(
children: sortOptions.entries children: sortOptions.entries
.map((kv) => _buildRadioListTile<S>( .map((kv) => _buildRadioListTile<S>(
@ -92,7 +92,7 @@ class _TileViewDialogState<S, G, L> extends State<TileViewDialog<S, G, L>> with
), ),
if (groupOptions.isNotEmpty) if (groupOptions.isNotEmpty)
Tuple2( Tuple2(
_buildTab(context, AIcons.group, l10n.viewDialogTabGroup, color: canGroup ? null : Theme.of(context).disabledColor), _buildTab(context, const Key('tab-group'), AIcons.group, l10n.viewDialogTabGroup, color: canGroup ? null : Theme.of(context).disabledColor),
Column( Column(
children: groupOptions.entries children: groupOptions.entries
.map((kv) => _buildRadioListTile<G>( .map((kv) => _buildRadioListTile<G>(
@ -106,7 +106,7 @@ class _TileViewDialogState<S, G, L> extends State<TileViewDialog<S, G, L>> with
), ),
if (layoutOptions.isNotEmpty) if (layoutOptions.isNotEmpty)
Tuple2( Tuple2(
_buildTab(context, AIcons.layout, l10n.viewDialogTabLayout), _buildTab(context, const Key('tab-layout'), AIcons.layout, l10n.viewDialogTabLayout),
Column( Column(
children: layoutOptions.entries children: layoutOptions.entries
.map((kv) => _buildRadioListTile<L>( .map((kv) => _buildRadioListTile<L>(
@ -176,6 +176,7 @@ class _TileViewDialogState<S, G, L> extends State<TileViewDialog<S, G, L>> with
child: Text(MaterialLocalizations.of(context).cancelButtonLabel), child: Text(MaterialLocalizations.of(context).cancelButtonLabel),
), ),
TextButton( TextButton(
key: const Key('button-apply'),
onPressed: () => Navigator.pop(context, Tuple3(_selectedSort, _selectedGroup, _selectedLayout)), onPressed: () => Navigator.pop(context, Tuple3(_selectedSort, _selectedGroup, _selectedLayout)),
child: Text(l10n.applyButtonLabel), child: Text(l10n.applyButtonLabel),
) )
@ -209,12 +210,13 @@ class _TileViewDialogState<S, G, L> extends State<TileViewDialog<S, G, L>> with
); );
} }
Tab _buildTab(BuildContext context, IconData icon, String text, {Color? color}) { Tab _buildTab(BuildContext context, Key key, IconData icon, String text, {Color? color}) {
// cannot use `IconTheme` over `TabBar` to change size, // cannot use `IconTheme` over `TabBar` to change size,
// because `TabBar` does so internally // because `TabBar` does so internally
final textScaleFactor = MediaQuery.textScaleFactorOf(context); final textScaleFactor = MediaQuery.textScaleFactorOf(context);
final iconSize = IconTheme.of(context).size! * textScaleFactor; final iconSize = IconTheme.of(context).size! * textScaleFactor;
return Tab( return Tab(
key: key,
height: tabBarHeight(context), height: tabBarHeight(context),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

View file

@ -210,7 +210,7 @@ packages:
name: device_info_plus name: device_info_plus
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.1" version: "3.2.0"
device_info_plus_linux: device_info_plus_linux:
dependency: transitive dependency: transitive
description: description:
@ -231,7 +231,7 @@ packages:
name: device_info_plus_platform_interface name: device_info_plus_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.1" version: "2.3.0"
device_info_plus_web: device_info_plus_web:
dependency: transitive dependency: transitive
description: description:
@ -305,35 +305,35 @@ packages:
name: firebase_core name: firebase_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.5" version: "1.10.6"
firebase_core_platform_interface: firebase_core_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_platform_interface name: firebase_core_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.2.2" version: "4.2.3"
firebase_core_web: firebase_core_web:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_web name: firebase_core_web
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.5.2" version: "1.5.3"
firebase_crashlytics: firebase_crashlytics:
dependency: transitive dependency: transitive
description: description:
name: firebase_crashlytics name: firebase_crashlytics
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.4.3" version: "2.4.4"
firebase_crashlytics_platform_interface: firebase_crashlytics_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_crashlytics_platform_interface name: firebase_crashlytics_platform_interface
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.10" version: "3.1.11"
flex_color_picker: flex_color_picker:
dependency: "direct main" dependency: "direct main"
description: description:
@ -397,7 +397,7 @@ packages:
name: flutter_markdown name: flutter_markdown
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.8" version: "0.6.9"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
@ -447,7 +447,7 @@ packages:
name: github name: github
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "8.2.5" version: "8.3.0"
glob: glob:
dependency: transitive dependency: transitive
description: description:
@ -629,7 +629,7 @@ packages:
name: nm name: nm
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.1" version: "0.4.2"
node_preamble: node_preamble:
dependency: transitive dependency: transitive
description: description:
@ -727,7 +727,7 @@ packages:
name: path_provider_linux name: path_provider_linux
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.2" version: "2.1.4"
path_provider_platform_interface: path_provider_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -895,7 +895,7 @@ packages:
name: shared_preferences name: shared_preferences
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.9" version: "2.0.11"
shared_preferences_android: shared_preferences_android:
dependency: transitive dependency: transitive
description: description:
@ -1012,7 +1012,7 @@ packages:
name: sqflite_common name: sqflite_common
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.1+1" version: "2.1.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@ -1261,5 +1261,5 @@ packages:
source: hosted source: hosted
version: "3.1.0" version: "3.1.0"
sdks: sdks:
dart: ">=2.14.0 <3.0.0" dart: ">=2.15.0 <3.0.0"
flutter: ">=2.5.0" flutter: ">=2.5.0"

File diff suppressed because one or more lines are too long

1
shaders_2.8.1.sksl.json Normal file

File diff suppressed because one or more lines are too long

View file

@ -12,6 +12,13 @@ import 'utils/driver_extension.dart';
late FlutterDriver driver; late FlutterDriver driver;
extension ExtraFlutterDriver on FlutterDriver {
Future<void> tapKeyAndWait(String key) async {
await driver.tap(find.byValueKey(key));
await driver.waitUntilNoTransientCallbacks();
}
}
void main() { void main() {
group('[Aves app]', () { group('[Aves app]', () {
setUpAll(() async { setUpAll(() async {
@ -61,8 +68,7 @@ void agreeToTerms() {
await driver.tap(find.byValueKey('terms-checkbox')); await driver.tap(find.byValueKey('terms-checkbox'));
await Future.delayed(const Duration(seconds: 1)); await Future.delayed(const Duration(seconds: 1));
await driver.tap(find.byValueKey('continue-button')); await driver.tapKeyAndWait('continue-button');
await driver.waitUntilNoTransientCallbacks();
// wait for collection loading // wait for collection loading
await driver.waitForCondition(const NoPendingPlatformMessages()); await driver.waitForCondition(const NoPendingPlatformMessages());
@ -71,11 +77,8 @@ void agreeToTerms() {
void visitAbout() { void visitAbout() {
test('[collection] visit about page', () async { test('[collection] visit about page', () async {
await driver.tap(find.byValueKey('appbar-leading-button')); await driver.tapKeyAndWait('appbar-leading-button');
await driver.waitUntilNoTransientCallbacks(); await driver.tapKeyAndWait('drawer-about-button');
await driver.tap(find.byValueKey('drawer-about-button'));
await driver.waitUntilNoTransientCallbacks();
await pressDeviceBackButton(); await pressDeviceBackButton();
await driver.waitUntilNoTransientCallbacks(); await driver.waitUntilNoTransientCallbacks();
@ -84,11 +87,8 @@ void visitAbout() {
void visitSettings() { void visitSettings() {
test('[collection] visit settings page', () async { test('[collection] visit settings page', () async {
await driver.tap(find.byValueKey('appbar-leading-button')); await driver.tapKeyAndWait('appbar-leading-button');
await driver.waitUntilNoTransientCallbacks(); await driver.tapKeyAndWait('drawer-settings-button');
await driver.tap(find.byValueKey('drawer-settings-button'));
await driver.waitUntilNoTransientCallbacks();
await pressDeviceBackButton(); await pressDeviceBackButton();
await driver.waitUntilNoTransientCallbacks(); await driver.waitUntilNoTransientCallbacks();
@ -97,34 +97,27 @@ void visitSettings() {
void sortCollection() { void sortCollection() {
test('[collection] sort', () async { test('[collection] sort', () async {
await driver.tap(find.byValueKey('appbar-menu-button')); await driver.tapKeyAndWait('appbar-menu-button');
await driver.waitUntilNoTransientCallbacks(); await driver.tapKeyAndWait('menu-configureView');
await driver.tapKeyAndWait('tab-sort');
await driver.tap(find.byValueKey('menu-sort')); await driver.tapKeyAndWait(EntrySortFactor.date.toString());
await driver.waitUntilNoTransientCallbacks(); await driver.tapKeyAndWait('button-apply');
await driver.tap(find.byValueKey(EntrySortFactor.date.toString()));
await driver.waitUntilNoTransientCallbacks();
}); });
} }
void groupCollection() { void groupCollection() {
test('[collection] group', () async { test('[collection] group', () async {
await driver.tap(find.byValueKey('appbar-menu-button')); await driver.tapKeyAndWait('appbar-menu-button');
await driver.waitUntilNoTransientCallbacks(); await driver.tapKeyAndWait('menu-configureView');
await driver.tapKeyAndWait('tab-group');
await driver.tap(find.byValueKey('menu-group')); await driver.tapKeyAndWait(EntryGroupFactor.album.toString());
await driver.waitUntilNoTransientCallbacks(); await driver.tapKeyAndWait('button-apply');
await driver.tap(find.byValueKey(EntryGroupFactor.album.toString()));
await driver.waitUntilNoTransientCallbacks();
}); });
} }
void visitMap() { void visitMap() {
test('[collection] visit map', () async { test('[collection] visit map', () async {
await driver.tap(find.byValueKey('appbar-menu-button')); await driver.tapKeyAndWait('appbar-menu-button');
await driver.waitUntilNoTransientCallbacks();
await driver.tap(find.byValueKey('menu-map')); await driver.tap(find.byValueKey('menu-map'));
// wait for heavy Google map initialization // wait for heavy Google map initialization
@ -147,12 +140,9 @@ void visitMap() {
void selectFirstAlbum() { void selectFirstAlbum() {
test('[collection] select first album', () async { test('[collection] select first album', () async {
await driver.tap(find.byValueKey('appbar-leading-button')); await driver.tapKeyAndWait('appbar-leading-button');
await driver.waitUntilNoTransientCallbacks();
// prefix must match `AlbumListPage.routeName` // prefix must match `AlbumListPage.routeName`
await driver.tap(find.byValueKey('/albums-tile')); await driver.tapKeyAndWait('/albums-tile');
await driver.waitUntilNoTransientCallbacks();
// wait for collection loading // wait for collection loading
await driver.waitForCondition(const NoPendingPlatformMessages()); await driver.waitForCondition(const NoPendingPlatformMessages());
@ -170,8 +160,7 @@ void selectFirstAlbum() {
void searchAlbum() { void searchAlbum() {
test('[collection] search album', () async { test('[collection] search album', () async {
await driver.tap(find.byValueKey('menu-searchCollection')); await driver.tapKeyAndWait('menu-searchCollection');
await driver.waitUntilNoTransientCallbacks();
const albumPath = targetPicturesDirEmulated; const albumPath = targetPicturesDirEmulated;
final albumDisplayName = p.split(albumPath).last; final albumDisplayName = p.split(albumPath).last;
@ -263,8 +252,7 @@ void showInfoMetadata() {
await Future.delayed(const Duration(seconds: 1)); await Future.delayed(const Duration(seconds: 1));
print('* back to image'); print('* back to image');
await driver.tap(find.byValueKey('back-button')); await driver.tapKeyAndWait('back-button');
await driver.waitUntilNoTransientCallbacks();
}); });
} }