Skip to content

Commit

Permalink
deps!: Update min Flutter to v3.13.0, compatibility with v3.16.8 (#1715)
Browse files Browse the repository at this point in the history
# Description

Update minimum required Flutter version to 3.13.0 as Linux requires at
least that version to work properly due to a bug.
Therefore we also only test against 3.13.0 and higher (here 3.16.8).
Also remove `dartdoc` dependency introduced in
7ca5058 as the package is integrated in
dart SDK since v5.0.0.

Fix pump Linux, introduced in
flutter/flutter#135266
(flutter/flutter@5def6f2)
  • Loading branch information
Gustl22 authored Jan 19, 2024
1 parent 00d041d commit e4262f4
Show file tree
Hide file tree
Showing 17 changed files with 96 additions and 115 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/build-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ on:
type: choice
options:
- 'any'
- '3.16.x'
- '3.13.x'
- '3.10.x'
- '3.7.x'
- '3.3.x'
- '3.0.x'
flutter_channel:
description: 'Flutter Channel'
required: false
default: 'stable'
type: choice
options:
- 'stable'
- 'beta'
- 'dev'
- 'master'
enable_android:
description: 'Build Android'
required: false
Expand Down Expand Up @@ -53,7 +60,11 @@ on:
inputs:
flutter_version:
required: false
default: '3.13.0'
default: '3.16.8'
type: string
flutter_channel:
required: false
default: 'stable'
type: string
enable_android:
required: false
Expand Down Expand Up @@ -94,7 +105,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- name: Example app - Build Web app
Expand All @@ -120,7 +131,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- name: Example App - Build Android APK
Expand All @@ -136,7 +147,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- name: Example app - Build iOS
Expand All @@ -152,7 +163,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- name: Example app - Build macOS
Expand All @@ -168,7 +179,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- name: Example app - Build Windows app
Expand All @@ -184,7 +195,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- name: Install Flutter requirements for Linux
Expand Down
34 changes: 23 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ on:
type: choice
options:
- 'any'
- '3.16.x'
- '3.13.x'
- '3.10.x'
- '3.7.x'
- '3.3.x'
flutter_channel:
description: 'Flutter Channel'
required: false
default: 'stable'
type: choice
options:
- 'stable'
- 'beta'
- 'dev'
- 'master'
fatal_warnings:
description: 'Treat warnings as fatal'
required: false
Expand Down Expand Up @@ -52,7 +60,11 @@ on:
inputs:
flutter_version:
required: false
default: '3.13.0'
default: '3.16.8'
type: string
flutter_channel:
required: false
default: 'stable'
type: string
fatal_warnings:
required: false
Expand Down Expand Up @@ -96,7 +108,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- run: melos run format-check
Expand Down Expand Up @@ -128,7 +140,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main
- uses: nanasess/setup-chromedriver@v2

Expand Down Expand Up @@ -179,7 +191,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- name: Download Android emulator image
Expand Down Expand Up @@ -220,7 +232,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- name: List all simulators
Expand Down Expand Up @@ -249,7 +261,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main

- name: Run Flutter integration tests
Expand All @@ -270,7 +282,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main
- name: Start audio server
run: net start audiosrv
Expand Down Expand Up @@ -311,7 +323,7 @@ jobs:
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
channel: 'stable'
channel: ${{ inputs.flutter_channel }}
- uses: bluefireteam/melos-action@main
- name: Install Flutter requirements for Linux
run: |
Expand Down
8 changes: 4 additions & 4 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ scripts:

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

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

dartdoc:
run: melos exec flutter pub run dartdoc
description: Run dartdoc checks for all non-example packages.
run: melos exec dart doc
description: Run `dart doc` for all non-example packages.
packageFilters:
ignore: "*_example"

Expand Down
3 changes: 2 additions & 1 deletion packages/audioplayers/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdk 33
// Allow compatibility with selected Flutter SDK
compileSdk flutter.compileSdkVersion

namespace 'xyz.luan.audioplayers.example'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';

extension LibWidgetTester on WidgetTester {
Future<void> pumpLinux() async {
Future<void> pumpPlatform([
Duration? duration,
EnginePhase phase = EnginePhase.sendSemanticsUpdate,
]) async {
if (!kIsWeb && defaultTargetPlatform == TargetPlatform.linux) {
// FIXME(gustl22): Linux needs additional pump (#1556)
await pump();
// FIXME(1556): Pump on Linux doesn't work with GStreamer bus callback
await Future.delayed(duration ?? Duration.zero);
} else {
await pump(duration, phase);
}
}

Expand Down
Loading

0 comments on commit e4262f4

Please sign in to comment.