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

[various] bumped Flutter and Dart SDK requirements to 3.13.0 and 3.1.0 respectively #513

Merged
merged 8 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
70 changes: 0 additions & 70 deletions .cirrus.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/scripts/install-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dart pub global activate melos
melos bootstrap
138 changes: 138 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: validate

on:
pull_request:
paths-ignore:
- '**.md'
push:
branches:
- master
paths-ignore:
- '**.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Run Dart Analyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Analyze
uses: invertase/github-action-dart-analyzer@v1
with:
fatal-infos: true
fatal-warnings: true
build_example_android_stable:
name: Build Android example app (stable channel)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Build
run: melos run build:example_android
build_example_android_3_13:
name: Build Android example app (3.13)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.13.0
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Build
run: melos run build:example_android
build_example_ios_stable:
name: Build iOS example app (stable channel)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Build
run: melos run build:example_ios
build_example_ios_3_13:
name: Build iOS example app (3.13)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.13.0
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Build
run: melos run build:example_ios
build_example_macos_stable:
name: Build macOS example app (stable channel)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Build
run: melos run build:example_macos
build_example_macos_3_13:
name: Build macOS example app (3.13)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.13.0
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Build
run: melos run build:example_macos
unit_tests_dart:
name: Run all unit tests (Dart)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Run Tests
run: melos run test:unit --no-select



5 changes: 0 additions & 5 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ analyzer:
# Ignore analyzer hints for updating pubspecs when using Future or
# Stream and not importing dart:async
# Please see https://github.com/flutter/flutter/pull/24528 for details.
sdk_version_async_exported_from_core: ignore
exclude:
- "bin/cache/**"
# the following two are relative to the stocks example and the flutter package respectively
Expand All @@ -47,7 +46,6 @@ linter:
- always_declare_return_types
- always_put_control_body_on_new_line
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
- always_require_non_null_named_parameters
- always_specify_types
- annotate_overrides
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
Expand Down Expand Up @@ -99,12 +97,10 @@ linter:
- hash_and_equals
- implementation_imports
# - invariant_booleans # too many false positives: https://github.com/dart-lang/linter/issues/811
- iterable_contains_unrelated_type
# - join_return_with_assignment # not yet tested
- library_names
- library_prefixes
- lines_longer_than_80_chars
- list_remove_unrelated_type
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
- no_adjacent_strings_in_list
- no_duplicate_case_values
Expand All @@ -130,7 +126,6 @@ linter:
# - prefer_constructors_over_static_methods # not yet tested
- prefer_contains
# - prefer_double_quotes # opposite of prefer_single_quotes
- prefer_equal_for_default_values
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
- prefer_final_fields
# - prefer_final_in_for_each # not yet tested
Expand Down
5 changes: 5 additions & 0 deletions flutter_appauth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 7.0.0-dev.1

* **Breaking change** Bumped minimum Flutter and Dart SDK constraints to 3.13.0 and 3.1.0 respectively
* Updated error handling to expose more details for each platform. Plugin will now throw `FlutterAppAuthUserCancelledException` when an authorization request has been cancelled as a result of the user closing the browser. For other scenarios the plugin will throw `FlutterAppAuthPlatformException`. See the API docs for both classes for more details on the available details. Both exception classes inherit from `PlatformException` so the changes should be backwards compatible.

# 6.0.6

* [iOS][macOS] bumped AppAuth iOS dependency to 1.7.4
Expand Down
8 changes: 4 additions & 4 deletions flutter_appauth/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: flutter_appauth
description: This plugin provides an abstraction around the Android and iOS AppAuth SDKs so it can be used to communicate with OAuth 2.0 and OpenID Connect providers
version: 6.0.6
version: 7.0.0-dev.1
homepage: https://github.com/MaikuB/flutter_appauth/tree/master/flutter_appauth

environment:
sdk: ">=2.17.0 <4.0.0"
flutter: ">=3.0.0"
sdk: ^3.1.0
flutter: ">=3.13.0"

dependencies:
flutter:
sdk: flutter
flutter_appauth_platform_interface: ^6.0.0
flutter_appauth_platform_interface: ^7.0.0-dev.1

flutter:
plugin:
Expand Down
5 changes: 5 additions & 0 deletions flutter_appauth_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [7.0.0-dev.1]

* **Breaking change** Bumped minimum Flutter and Dart SDK constraints to 3.13.0 and 3.1.0 respectively
* Updated error handling to expose more details for each platform. Plugin will now throw `FlutterAppAuthUserCancelledException` when an authorization request has been cancelled as a result of the user closing the browser. For other scenarios the plugin will throw `FlutterAppAuthPlatformException`. See the API docs for both classes for more details on the available details. Both exception classes inherit from `PlatformException` so the changes should be backwards compatible.

## [6.0.0]

* **Breaking change** Aligned minimum Flutter and Dart SDK constraints to 3.0.0 and 2.17 respectively
Expand Down
6 changes: 3 additions & 3 deletions flutter_appauth_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: flutter_appauth_platform_interface
description: A common platform interface for the flutter_appauth plugin.
version: 6.0.0
version: 7.0.0-dev.1
homepage: https://github.com/MaikuB/flutter_appauth/tree/master/flutter_appauth_platform_interface

environment:
sdk: ">=2.17.0 <4.0.0"
flutter: ">=3.0.0"
sdk: ^3.1.0
flutter: ">=3.13.0"

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ void main() {
const MethodChannel channel =
MethodChannel('crossingthestreams.io/flutter_appauth');
final List<MethodCall> log = <MethodCall>[];
channel.setMockMethodCallHandler((MethodCall methodCall) async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
log.add(methodCall);
return null;
});

tearDown(() {
Expand Down
22 changes: 11 additions & 11 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ command:
usePubspecOverrides: true

packages:
- flutter_appauth/*
- flutter_appauth_platform_interface/*
- "**/example/*"
- flutter_appauth
- flutter_appauth_platform_interface
- flutter_appauth/example/

ide:
intellij: false
Expand All @@ -20,34 +20,34 @@ scripts:
test:unit:
description: Run unit tests in a specific package.
run: melos exec --concurrency=1 -- "flutter test"
select-package:
dir-exists:
packageFilters:
dirExists:
- test
build:example_android:
run: |
melos exec -c 1 -- \
"flutter build apk"
description: Build a specific example app for Android.
select-package:
dir-exists:
packageFilters:
dirExists:
- android
scope: "*example*"
build:example_ios:
run: |
melos exec -c 1 -- \
"flutter build ios --no-codesign"
description: Build a specific example app for iOS.
select-package:
dir-exists:
packageFilters:
dirExists:
- ios
scope: "*example*"
build:example_macos:
run: |
melos exec -c 1 -- \
"flutter build macos"
description: Build a specific example app for macOS.
select-package:
dir-exists:
packageFilters:
dirExists:
- macos
scope: "*example*"
clean:
Expand Down
6 changes: 6 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: flutter_appauth_workspace

environment:
sdk: '>=3.0.0 <4.0.0'
dev_dependencies:
melos: ^6.1.0
Loading