Repository navigation
Commit 4dae650
authored
Fix Dart Analyze and Android CI on Flutter 3.50 (#1291)
## Problem
CI uses the unpinned `stable` Flutter channel, which is now 3.50.0. Two
jobs fail on `main` since then, and so on every PR.
**Dart Analyze.** Flutter 3.50 deprecates
`package:flutter/material.dart` in favor of the `material_ui` package.
`flutter analyze` reports 22 `deprecated_member_use` infos (6 in `lib/`,
16 in `example/`) and treats infos as fatal.
**Android.** `flutter build apk` in `example/` stops with:
```
Your project's Gradle version (9.1.0) is lower than Flutter's minimum supported version of 9.3.1
```
Flutter 3.50 also rejects the example's Android Gradle plugin (9.0.1,
needs 9.1.1 or newer) and Kotlin Gradle plugin (2.3.20, needs 2.4.10 or
newer).
## Change
**Analyze**
- Five of the six `lib/` files never used anything from Material. They
now import `package:flutter/widgets.dart`.
- `screen_select_dialog.dart` keeps the Material import with
`ignore_for_file: deprecated_member_use`. `ScreenSelectDialog` extends
`Dialog`, which is public API. The ignore is file level because the
import sorter moves a line level ignore away from the import.
- The example keeps Material and ignores the info on each import.
Moving to `material_ui` is not an option yet. Every version of it needs
Flutter 3.44 or newer (3.47 from 1.4.0 on), and this package supports
3.38. It would also add `cupertino_ui`, `flutter_localizations` and
`intl ^0.20.2` as dependencies.
**Android**
- Gradle wrapper 9.1.0 to 9.5.0
- Android Gradle plugin 9.0.1 to 9.3.1
- Kotlin Gradle plugin 2.3.20 to 2.4.20
These are the versions the Flutter 3.50 app template uses. The minimums
(9.3.1, 9.1.1, 2.4.10) would build but warn.
## Testing
Locally on macOS with JDK 17.
- Flutter 3.50.0: `flutter analyze`, `dart analyze web/`, `dart format .
--set-exit-if-changed`, the import sorter, `check_version`, `flutter
test`, and `flutter build apk` in `example/`
- Flutter 3.47.1: `flutter build apk` in `example/`
- Flutter 3.38.1: `flutter analyze lib`
Not tested: the example Android build on Flutter 3.38 with the new
versions.
## Notes
- The changeset is there because `lib/` changed. Nothing changes for
users, so it can be dropped if it is noise in the changelog.
- Flutter 3.50 warns that the example app and the `flutter_background`
and `flutter_webrtc` plugins apply the Kotlin Gradle plugin, and that a
future Flutter will fail on it. Not addressed here.1 parent d27f700 commit 4dae650
25 files changed
Lines changed: 32 additions & 24 deletions
File tree
- .changes
- example
- android
- gradle/wrapper
- lib
- pages
- widgets
- lib/src
- track
- local
- types
- widgets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments