Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Upgrade to Flutter v3.22.x #1803

Merged
merged 26 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions .github/workflows/build-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ on:
type: choice
options:
- 'any'
- '3.22.x'
- '3.19.x'
- '3.16.x'
- '3.13.x'
flutter_channel:
description: 'Flutter Channel'
required: false
Expand Down Expand Up @@ -61,7 +60,7 @@ on:
inputs:
flutter_version:
required: false
default: '3.19.3'
default: '3.22.3'
type: string
flutter_channel:
required: false
Expand Down Expand Up @@ -102,7 +101,7 @@ jobs:
timeout-minutes: 30
if: inputs.enable_web
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand All @@ -118,13 +117,34 @@ jobs:
with:
path: ./packages/audioplayers/example/build/web

# TODO(gustl22): Remove, when min supported flutter version is 3.22.x, so can integrate wasm test in the default 'web' build.
web-wasm:
runs-on: ubuntu-latest
timeout-minutes: 30
if: inputs.enable_web
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: 3.22.3
- uses: bluefireteam/melos-action@main

- name: Example app - Build Web app in WASM
working-directory: ./packages/audioplayers/example
run: flutter build web --wasm
- name: Upload pages artifact
if: inputs.upload_pages_artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./packages/audioplayers/example/build/web

android:
runs-on: ubuntu-latest
timeout-minutes: 60
if: inputs.enable_android
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
# AGP8 needs JDK 17
distribution: 'temurin'
Expand All @@ -144,7 +164,7 @@ jobs:
timeout-minutes: 30
if: inputs.enable_ios
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand All @@ -160,7 +180,7 @@ jobs:
timeout-minutes: 30
if: inputs.enable_macos
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand All @@ -176,7 +196,7 @@ jobs:
timeout-minutes: 30
if: inputs.enable_windows
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand All @@ -192,7 +212,7 @@ jobs:
timeout-minutes: 30
if: inputs.enable_linux
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ on:
type: choice
options:
- 'any'
- '3.22.x'
- '3.19.x'
- '3.16.x'
- '3.13.x'
flutter_channel:
description: 'Flutter Channel'
required: false
Expand Down Expand Up @@ -61,7 +60,7 @@ on:
inputs:
flutter_version:
required: false
default: '3.19.3'
default: '3.22.3'
type: string
flutter_channel:
required: false
Expand Down Expand Up @@ -102,7 +101,7 @@ jobs:
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Full git history needed for `super-linter`
fetch-depth: 0
Expand All @@ -112,8 +111,8 @@ jobs:
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- run: melos run format-check
- run: melos run analyze -- ${{ inputs.fatal_warnings && '--fatal-infos' || '--no-fatal-warnings --no-fatal-infos' }}
- run: melos format --set-exit-if-changed
- run: melos analyze ${{ inputs.fatal_warnings && '--fatal-infos' || '--no-fatal-warnings' }}
- run: melos run test

- name: Lint Code Base
Expand All @@ -137,7 +136,7 @@ jobs:
timeout-minutes: 30
if: inputs.enable_web
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand Down Expand Up @@ -183,14 +182,14 @@ jobs:
timeout-minutes: 90
if: inputs.enable_android
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Enable KVM group perms
# see: https://github.com/actions/runner-images/discussions/7191
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
# AGP8 needs JDK 17
distribution: 'temurin'
Expand Down Expand Up @@ -236,7 +235,7 @@ jobs:
timeout-minutes: 60
if: inputs.enable_ios
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand All @@ -255,12 +254,12 @@ jobs:
( cd server; dart run bin/server.dart ) &
flutter test -d $UDID integration_test/lib_test.dart --dart-define USE_LOCAL_SERVER=true

ios:
ios-17:
runs-on: macos-14
timeout-minutes: 60
if: inputs.enable_ios
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand All @@ -286,7 +285,7 @@ jobs:
timeout-minutes: 30
if: inputs.enable_macos
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand All @@ -300,14 +299,15 @@ jobs:
( cd server; dart run bin/server.dart ) &
flutter test -d macos integration_test/platform_test.dart --dart-define USE_LOCAL_SERVER=true
flutter test -d macos integration_test/lib_test.dart --dart-define USE_LOCAL_SERVER=true
flutter test -d macos integration_test/app_test.dart --dart-define USE_LOCAL_SERVER=true
# TODO: Integration tests on macOS 13 currently time out.
# flutter test -d macos integration_test/app_test.dart --dart-define USE_LOCAL_SERVER=true

macos:
macos-14:
runs-on: macos-14
timeout-minutes: 30
if: false # TODO: Tests on macOS 14 currently fail.
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand All @@ -328,7 +328,7 @@ jobs:
timeout-minutes: 30
if: inputs.enable_windows
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand Down Expand Up @@ -373,7 +373,7 @@ jobs:
timeout-minutes: 30
if: inputs.enable_linux
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
Expand Down
14 changes: 1 addition & 13 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,9 @@ command:

scripts:
lint:
run: melos run analyze && melos run format
run: melos analyze && melos format
description: Run all static analysis checks.

analyze:
run: melos exec -c 10 flutter analyze
description: Run `flutter analyze` for all packages.

format:
run: melos exec dart format . --fix
description: Run `dart format` for all packages.

format-check:
run: melos exec dart format . --set-exit-if-changed
description: Run `dart format` checks for all packages.

dartdoc:
run: melos exec dart doc
description: Run `dart doc` for all non-example packages.
Expand Down
30 changes: 15 additions & 15 deletions packages/audioplayers/example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file should be version controlled and should not be manually edited.

version:
revision: "12fccda598477eddd19f93040a1dba24f915b9be"
revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1"
channel: "stable"

project_type: app
Expand All @@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
- platform: android
create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
- platform: ios
create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
- platform: linux
create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
- platform: macos
create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
- platform: web
create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
- platform: windows
create_revision: 12fccda598477eddd19f93040a1dba24f915b9be
base_revision: 12fccda598477eddd19f93040a1dba24f915b9be
create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1
base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1

# User provided section

Expand Down
Loading