From cde971b28918528aaa8f899d0befdf912fb4f513 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Fakouri Date: Thu, 25 May 2023 09:12:43 +0330 Subject: [PATCH 01/18] Create CONTRIBUTING.md --- CONTRIBUTING.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..e8e749dcd --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,19 @@ +# Contributing to Parse SDK for Flutter +We want to make contributing to this project as easy and transparent as possible. + +## Pull Requests +We actively welcome your pull requests. When we get one, we'll run some Parse-specific integration tests on it first. From here, we'll need to get a core member to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process. + +1. Fork the repo and create your branch from `master`. +4. Add unit tests for any new code you add. +3. If you've changed APIs, update the documentation. +4. Ensure the test suite passes. + +## Code of Conduct +This project adheres to the [Contributor Covenant Code of Conduct](https://github.com/parse-community/parse-server/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to honor this code. + +## License +By contributing to Parse SDK Flutter, you agree that your contributions will be licensed under its license. + +[stack-overflow]: http://stackoverflow.com/tags/parse.com +[bug-reports]: https://github.com/parse-community/parse-server From 835a1db0029a66fe80fecdfc4b88584c65dc8f45 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Thu, 25 May 2023 13:17:54 +0200 Subject: [PATCH 02/18] just some styling --- CONTRIBUTING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e8e749dcd..5f35995ba 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,18 +1,22 @@ # Contributing to Parse SDK for Flutter + We want to make contributing to this project as easy and transparent as possible. ## Pull Requests + We actively welcome your pull requests. When we get one, we'll run some Parse-specific integration tests on it first. From here, we'll need to get a core member to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process. 1. Fork the repo and create your branch from `master`. -4. Add unit tests for any new code you add. +2. Add unit tests for any new code you add. 3. If you've changed APIs, update the documentation. 4. Ensure the test suite passes. ## Code of Conduct + This project adheres to the [Contributor Covenant Code of Conduct](https://github.com/parse-community/parse-server/blob/master/CODE_OF_CONDUCT.md). By participating, you are expected to honor this code. ## License + By contributing to Parse SDK Flutter, you agree that your contributions will be licensed under its license. [stack-overflow]: http://stackoverflow.com/tags/parse.com From 4b909e1e2fd91162328660c19aa962958e13dfc4 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Sat, 7 Oct 2023 18:52:33 +0330 Subject: [PATCH 03/18] refactor: Improve flutter support policy. --- .github/workflows/ci.yml | 20 +++---- packages/flutter/README.md | 18 +++--- .../flutter/example/lib/pages/home_page.dart | 59 +++++++++---------- .../flutter/example/lib/pages/login_page.dart | 25 ++++---- packages/flutter/example/pubspec.yaml | 3 +- packages/flutter/pubspec.yaml | 3 +- 6 files changed, 62 insertions(+), 66 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a56e36314..9282a15af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,23 +77,23 @@ jobs: matrix: include: # Flutter framework may contain breaking changes in minor version releases, not following semver. - - name: Flutter 3.10, Ubuntu + - name: Flutter 3.13, Ubuntu os: ubuntu-latest - sdk: 3.10.x - - name: Flutter 3.10, macOS + sdk: 3.13.6 + - name: Flutter 3.13, macOS os: macos-latest - sdk: 3.10.x - - name: Flutter 3.10, Windows + sdk: 3.13.6 + - name: Flutter 3.13, Windows os: windows-latest - sdk: 3.10.x + sdk: 3.13.6 # Only the latest Flutter framework version (above) is tested with all architectures. Previous # Flutter framework versions (below) are only tested with Ubuntu to reduce CI resource usage. - - name: Flutter 3.7 + - name: Flutter 3.10 os: ubuntu-latest - sdk: 3.7.x - - name: Flutter 3.3 + sdk: 3.10.6 + - name: Flutter 3.7 os: ubuntu-latest - sdk: 3.3.x + sdk: 3.7.12 - name: Flutter beta os: ubuntu-latest sdk: beta diff --git a/packages/flutter/README.md b/packages/flutter/README.md index 21ad7ecc6..5aa6c65ef 100644 --- a/packages/flutter/README.md +++ b/packages/flutter/README.md @@ -5,7 +5,7 @@ [![Build Status](https://github.com/parse-community/Parse-SDK-Flutter/workflows/ci/badge.svg?branch=master)](https://github.com/parse-community/Parse-SDK-Flutter/actions?query=workflow%3Aci+branch%3Amaster) [![Coverage](https://img.shields.io/codecov/c/github/parse-community/Parse-SDK-Flutter/master)](https://app.codecov.io/gh/parse-community/Parse-SDK-Flutter/branch/master) -[![pub package](https://img.shields.io/pub/v/parse_server_sdk_flutter.svg)](https://pub.dev/packages/parse_server_sdk_flutter) +[![pub package](https://img.shields.io/pub/v/parse_server_sdk_flutter.svg)](https://pub.dev/packages/parse_server_sdk_flutter) [![Forum](https://img.shields.io/discourse/https/community.parseplatform.org/topics.svg)](https://community.parseplatform.org/c/parse-server) [![Backers on Open Collective](https://opencollective.com/parse-server/backers/badge.svg)][open-collective-link] @@ -28,14 +28,14 @@ This library gives you access to the powerful Parse Server backend from your Flu ## Compatibility -The Parse Flutter SDK is continuously tested with the most recent release of the Flutter framework to ensure compatibility. To give developers time to upgrade their app to the newest Flutter framework, previous Flutter framework releases are supported for at least 1 year after their [release date](https://docs.flutter.dev/release/archive?tab=linux). The Parse Flutter SDK depends on the Parse Dart SDK which may require a higher Dart framework version than the Flutter framework version, in which case the Flutter framework version cannot be supported even though its release date may have been less than a year ago. +The Parse Flutter SDK is continuously tested with the most recent release of the Flutter framework to ensure compatibility. To give developers time to upgrade their app to a newer Flutter framework, previous Flutter framework releases are supported for at least 1 year after the [release date](https://docs.flutter.dev/release/archive?tab=linux) of the next higher significant version. The Parse Flutter SDK depends on the Parse Dart SDK which may require a higher Dart framework version than the Flutter framework version, in which case the specific Flutter framework version cannot be supported. -| Version | End of Support | Compatible | -|--------------|----------------|----------------------------------------------| -| Flutter 3.10 | May 2024 | ❌ No | -| Flutter 3.7 | Apr 2024 | ✅ Yes | -| Flutter 3.3 | Jan 2024 | ✅ Yes | -| Flutter 3.0 | Jul 2023 | ❌ No (Parse Flutter SDK requires Flutter >=3.3.0) | +| Version | Latest Version | End of Support | Compatible | +|--------------|----------------|----------------|------------| +| Flutter 3.13 | 3.13.6 | Sep 2024 | ✅ Yes | +| Flutter 3.10 | 3.10.6 | Jul 2024 | ✅ Yes | +| Flutter 3.7 | 3.7.12 | Apr 2024 | ✅ Yes | +| Flutter 3.3 | 3.3.10 | Dec 2024 | ✅ Yes | ## Getting Started @@ -50,4 +50,4 @@ Find the full documentation in the [Parse Flutter SDK guide][guide]. We want to make contributing to this project as easy and transparent as possible. Please refer to the [Contribution Guidelines](https://github.com/parse-community/Parse-SDK-Flutter/blob/master/CONTRIBUTING.md). [guide]: https://docs.parseplatform.org/flutter/guide/ -[open-collective-link]: https://opencollective.com/parse-server +[open-collective-link]: https://opencollective.com/parse-server \ No newline at end of file diff --git a/packages/flutter/example/lib/pages/home_page.dart b/packages/flutter/example/lib/pages/home_page.dart index 6c5349e64..7323d2fe4 100644 --- a/packages/flutter/example/lib/pages/home_page.dart +++ b/packages/flutter/example/lib/pages/home_page.dart @@ -33,37 +33,34 @@ class _HomePageState extends State { @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async => false, - child: Scaffold( - appBar: AppBar( - automaticallyImplyLeading: false, - title: const Text('Parse Server demo'), - actions: [ - TextButton( - child: const Text('Logout', - style: TextStyle(fontSize: 17.0, color: Colors.white)), - onPressed: () async { - final ParseUser user = await ParseUser.currentUser(); - user.logout(deleteLocalUserData: true); - Navigator.pop(context as dynamic, true); - }) - ], - ), - body: _showDietList(), - floatingActionButton: FloatingActionButton( - onPressed: () async { - final DietPlan dietPlan = - randomDietPlans[Random().nextInt(randomDietPlans.length - 1)]; - final ParseUser user = await ParseUser.currentUser(); - dietPlan.set('user', user); - await widget._dietPlanProvider.add(dietPlan); - setState(() {}); - }, - tooltip: 'Add Diet Plans', - child: const Icon(Icons.add), - )), - ); + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + title: const Text('Parse Server demo'), + actions: [ + TextButton( + child: const Text('Logout', + style: TextStyle(fontSize: 17.0, color: Colors.white)), + onPressed: () async { + final ParseUser user = await ParseUser.currentUser(); + user.logout(deleteLocalUserData: true); + Navigator.pop(context as dynamic, true); + }) + ], + ), + body: _showDietList(), + floatingActionButton: FloatingActionButton( + onPressed: () async { + final DietPlan dietPlan = + randomDietPlans[Random().nextInt(randomDietPlans.length - 1)]; + final ParseUser user = await ParseUser.currentUser(); + dietPlan.set('user', user); + await widget._dietPlanProvider.add(dietPlan); + setState(() {}); + }, + tooltip: 'Add Diet Plans', + child: const Icon(Icons.add), + )); } Widget _showDietList() { diff --git a/packages/flutter/example/lib/pages/login_page.dart b/packages/flutter/example/lib/pages/login_page.dart index ab3a386d8..d68d86bbc 100644 --- a/packages/flutter/example/lib/pages/login_page.dart +++ b/packages/flutter/example/lib/pages/login_page.dart @@ -98,20 +98,17 @@ class _LoginPageState extends State { @override Widget build(BuildContext context) { - return WillPopScope( - onWillPop: () async => false, - child: Scaffold( - appBar: AppBar( - automaticallyImplyLeading: false, - title: const Text('Parse Server demo'), - ), - body: Stack( - children: [ - _showBody(), - _showCircularProgress(), - ], - )), - ); + return Scaffold( + appBar: AppBar( + automaticallyImplyLeading: false, + title: const Text('Parse Server demo'), + ), + body: Stack( + children: [ + _showBody(), + _showCircularProgress(), + ], + )); } Widget _showCircularProgress() { diff --git a/packages/flutter/example/pubspec.yaml b/packages/flutter/example/pubspec.yaml index 0a48d0b20..1a2251ab5 100644 --- a/packages/flutter/example/pubspec.yaml +++ b/packages/flutter/example/pubspec.yaml @@ -5,7 +5,8 @@ publish_to: 'none' version: 1.0.0 environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=2.19.6 <4.0.0" + flutter: ">=3.3.10" dependencies: flutter: diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml index 8f3a18c63..6674b882e 100644 --- a/packages/flutter/pubspec.yaml +++ b/packages/flutter/pubspec.yaml @@ -18,7 +18,8 @@ topics: - backend environment: - sdk: ">=2.18.0 <4.0.0" + sdk: ">=2.19.6 <4.0.0" + flutter: ">=3.3.10" dependencies: flutter: From 7223cfed94c0fef565850643356aed44d1064898 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Mon, 9 Oct 2023 09:15:23 +0330 Subject: [PATCH 04/18] refactor: bump version and add entries in CHANGELOG.md. --- packages/flutter/CHANGELOG.md | 10 ++++++++++ packages/flutter/pubspec.yaml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/flutter/CHANGELOG.md b/packages/flutter/CHANGELOG.md index e0524f152..8f59713ca 100644 --- a/packages/flutter/CHANGELOG.md +++ b/packages/flutter/CHANGELOG.md @@ -1,3 +1,13 @@ +## [7.0.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-6.0.0...flutter-7.0.0) (2023-07-18) + +### BREAKING CHANGES + +* This release removes support for Flutter 3.0 ([#971](https://github.com/parse-community/Parse-SDK-Flutter/pull/971)) + +### Features + +* Add support for Flutter 3.10 and 3.13, remove support for Flutter 3.0 ([#971](https://github.com/parse-community/Parse-SDK-Flutter/pull/971)) + ## [6.0.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-5.1.2...flutter-6.0.0) (2023-08-06) ### BREAKING CHANGES diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml index 6674b882e..d8b155341 100644 --- a/packages/flutter/pubspec.yaml +++ b/packages/flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: parse_server_sdk_flutter description: The Flutter SDK to connect to Parse Server. Build your apps faster with Parse Platform, the complete application stack. -version: 6.0.0 +version: 7.0.0 homepage: https://parseplatform.org repository: https://github.com/parse-community/Parse-SDK-Flutter issue_tracker: https://github.com/parse-community/Parse-SDK-Flutter/issues From 4607d40b637f133d9947c98e6777126f3239e2bb Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Mon, 9 Oct 2023 13:22:39 +0200 Subject: [PATCH 05/18] fix date --- packages/flutter/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/CHANGELOG.md b/packages/flutter/CHANGELOG.md index 8f59713ca..639ba00fc 100644 --- a/packages/flutter/CHANGELOG.md +++ b/packages/flutter/CHANGELOG.md @@ -1,4 +1,4 @@ -## [7.0.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-6.0.0...flutter-7.0.0) (2023-07-18) +## [7.0.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-6.0.0...flutter-7.0.0) (2023-10-09) ### BREAKING CHANGES From ea5b91d91c6b2f6575a7b29ad2c29a98b29f257d Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Thu, 12 Oct 2023 18:32:01 +0330 Subject: [PATCH 06/18] refactor: Improve flutter support policy. --- packages/flutter/example/pubspec.yaml | 4 ---- packages/flutter/pubspec.yaml | 5 +---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/flutter/example/pubspec.yaml b/packages/flutter/example/pubspec.yaml index 1a2251ab5..d3f9bf6c0 100644 --- a/packages/flutter/example/pubspec.yaml +++ b/packages/flutter/example/pubspec.yaml @@ -21,10 +21,6 @@ dependencies: sembast: ^3.4.6+1 shared_preferences: ^2.2.0 -dependency_overrides: - parse_server_sdk: - path: ../../dart - dev_dependencies: flutter_test: sdk: flutter diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml index d8b155341..663f4c5fd 100644 --- a/packages/flutter/pubspec.yaml +++ b/packages/flutter/pubspec.yaml @@ -25,10 +25,7 @@ dependencies: flutter: sdk: flutter - parse_server_sdk: ^5.1.2 - # Uncomment for local testing - #parse_server_sdk: - # path: ../dart + parse_server_sdk: ^5.1.3 # Networking connectivity_plus: ^3.0.6 From 5fa8d4409cfb99632ffd8d2453cb8469c4f08066 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Fri, 13 Oct 2023 11:04:18 +0330 Subject: [PATCH 07/18] fix: Ci separation. --- .github/workflows/{ci.yml => flutter_ci.yml} | 66 +------------------- 1 file changed, 1 insertion(+), 65 deletions(-) rename .github/workflows/{ci.yml => flutter_ci.yml} (54%) diff --git a/.github/workflows/ci.yml b/.github/workflows/flutter_ci.yml similarity index 54% rename from .github/workflows/ci.yml rename to .github/workflows/flutter_ci.yml index 9282a15af..a9a7f9f14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/flutter_ci.yml @@ -1,76 +1,14 @@ -name: ci +name: Flutter CI on: push: branches: - "master" - - "development" paths-ignore: - "**/README.md" pull_request: branches: - "**" jobs: - check-dart: - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - # Dart framework may contain breaking changes in minor version releases, not following semver. - - name: Dart 3.0, Ubuntu - os: ubuntu-latest - sdk: 3.0.0 - - name: Dart 3.0, macOS - os: macos-latest - sdk: 3.0.0 - - name: Dart 3.0, Windows - os: windows-latest - sdk: 3.0.0 - # Only the latest Dart framework version (above) is tested with all architectures. Previous - # Dart framework versions (below) are only tested with Ubuntu to reduce CI resource usage. - - name: Dart 2.19 - os: ubuntu-latest - sdk: 2.19.6 - - name: Dart 2.18 - os: ubuntu-latest - sdk: 2.18.7 - - name: Dart beta - os: ubuntu-latest - sdk: beta - fail-fast: false - name: Test ${{ matrix.name }} - steps: - - name: Checkout code - uses: actions/checkout@v3 - - name: Setup dart - uses: dart-lang/setup-dart@v1.5.0 - with: - sdk: ${{ matrix.sdk }} - - name: Install dependencies - run: dart pub get --directory packages/dart - - name: Run build_runner - run: (cd packages/dart && dart run build_runner build --delete-conflicting-outputs) - - name: Analyze code - run: dart analyze packages/dart --fatal-infos - - name: Lint - run: dart format --output=none --set-exit-if-changed packages/dart - - name: Publish dry run - run: cd packages/dart && dart pub publish --dry-run - - name: Run tests - run: (cd packages/dart && dart test --coverage=coverage) - - name: Convert code coverage - # Needs to be adapted to collect the coverage at all platforms if platform specific code is added. - if: ${{ always() && matrix.os == 'ubuntu-latest' }} - working-directory: packages/dart - run: | - dart pub global activate coverage - dart pub global run coverage:format_coverage -i coverage/test -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on=lib - - name: Upload code coverage - uses: codecov/codecov-action@v2 - # Needs to be adapted to collect the coverage at all platforms if platform specific code is added. - if: ${{ always() && matrix.os == 'ubuntu-latest' }} - with: - files: packages/dart/coverage/lcov.info - fail_ci_if_error: true check-flutter: runs-on: ${{ matrix.os }} strategy: @@ -117,12 +55,10 @@ jobs: - name: Install dependencies on Ubuntu and MacOS if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' run: | - (cd packages/dart && flutter pub get) (cd packages/flutter && flutter pub get) - name: Install dependencies on Windows if: matrix.os == 'windows-latest' run: | - cmd /c "cd packages\dart && flutter pub get" cmd /c "cd packages\flutter && flutter pub get" - name: Analyze code run: flutter analyze packages/flutter --fatal-infos From bb287fc6d352e9402e893cf64581fd1a1316a8f0 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Fri, 13 Oct 2023 11:13:12 +0330 Subject: [PATCH 08/18] fix: Ci separation. --- .github/workflows/flutter_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter_ci.yml b/.github/workflows/flutter_ci.yml index a9a7f9f14..49726e546 100644 --- a/.github/workflows/flutter_ci.yml +++ b/.github/workflows/flutter_ci.yml @@ -1,4 +1,4 @@ -name: Flutter CI +name: flutter-ci on: push: branches: From 23929cf2f27f780beb988026b71f78f4f73e84d3 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Sat, 14 Oct 2023 10:30:12 +0330 Subject: [PATCH 09/18] fix: revert Uncomment. --- packages/flutter/pubspec.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml index 663f4c5fd..4ebb01698 100644 --- a/packages/flutter/pubspec.yaml +++ b/packages/flutter/pubspec.yaml @@ -26,6 +26,9 @@ dependencies: sdk: flutter parse_server_sdk: ^5.1.3 + # Uncomment for local testing + #parse_server_sdk: + # path: ../dart # Networking connectivity_plus: ^3.0.6 From 8ae72b3512b19c52fe6f12a79031a9f4da748758 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Mon, 16 Oct 2023 18:00:50 +0330 Subject: [PATCH 10/18] fix: revert CI. --- .github/workflows/{flutter_ci.yml => ci.yml} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename .github/workflows/{flutter_ci.yml => ci.yml} (96%) diff --git a/.github/workflows/flutter_ci.yml b/.github/workflows/ci.yml similarity index 96% rename from .github/workflows/flutter_ci.yml rename to .github/workflows/ci.yml index 49726e546..5d8e7f415 100644 --- a/.github/workflows/flutter_ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: flutter-ci +name: ci on: push: branches: @@ -55,10 +55,12 @@ jobs: - name: Install dependencies on Ubuntu and MacOS if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' run: | + (cd packages/dart && flutter pub get) (cd packages/flutter && flutter pub get) - name: Install dependencies on Windows if: matrix.os == 'windows-latest' run: | + cmd /c "cd packages\dart && flutter pub get" cmd /c "cd packages\flutter && flutter pub get" - name: Analyze code run: flutter analyze packages/flutter --fatal-infos From 92795b54f527a00538759583f613fa7d60966876 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Mon, 16 Oct 2023 18:02:24 +0330 Subject: [PATCH 11/18] fix: revert CI. --- .github/workflows/ci.yml | 122 +++++++++++++++++++++------------------ 1 file changed, 65 insertions(+), 57 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d8e7f415..d2054c2cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,38 +1,37 @@ -name: ci -on: - push: - branches: - - "master" - paths-ignore: - - "**/README.md" - pull_request: - branches: - - "**" +push: + branches: + - "master" + - "development" + paths-ignore: + - "**/README.md" +pull_request: + branches: + - "**" jobs: - check-flutter: + check-dart: runs-on: ${{ matrix.os }} strategy: matrix: include: - # Flutter framework may contain breaking changes in minor version releases, not following semver. - - name: Flutter 3.13, Ubuntu + # Dart framework may contain breaking changes in minor version releases, not following semver. + - name: Dart 3.0, Ubuntu os: ubuntu-latest - sdk: 3.13.6 - - name: Flutter 3.13, macOS + sdk: 3.0.0 + - name: Dart 3.0, macOS os: macos-latest - sdk: 3.13.6 - - name: Flutter 3.13, Windows + sdk: 3.0.0 + - name: Dart 3.0, Windows os: windows-latest - sdk: 3.13.6 - # Only the latest Flutter framework version (above) is tested with all architectures. Previous - # Flutter framework versions (below) are only tested with Ubuntu to reduce CI resource usage. - - name: Flutter 3.10 + sdk: 3.0.0 + # Only the latest Dart framework version (above) is tested with all architectures. Previous + # Dart framework versions (below) are only tested with Ubuntu to reduce CI resource usage. + - name: Dart 2.19 os: ubuntu-latest - sdk: 3.10.6 - - name: Flutter 3.7 + sdk: 2.19.6 + - name: Dart 2.18 os: ubuntu-latest - sdk: 3.7.12 - - name: Flutter beta + sdk: 2.18.7 + - name: Dart beta os: ubuntu-latest sdk: beta fail-fast: false @@ -40,50 +39,59 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - - name: Setup flutter (beta) - if: ${{ matrix.sdk == 'beta' }} - uses: subosito/flutter-action@v2 - with: - channel: "beta" - cache: true - - name: Setup flutter - if: ${{ matrix.sdk != 'beta' }} - uses: subosito/flutter-action@v2 + - name: Setup dart + uses: dart-lang/setup-dart@v1.5.0 with: - flutter-version: ${{ matrix.sdk }} - cache: true - - name: Install dependencies on Ubuntu and MacOS - if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' - run: | - (cd packages/dart && flutter pub get) - (cd packages/flutter && flutter pub get) - - name: Install dependencies on Windows - if: matrix.os == 'windows-latest' - run: | - cmd /c "cd packages\dart && flutter pub get" - cmd /c "cd packages\flutter && flutter pub get" + sdk: ${{ matrix.sdk }} + - name: Install dependencies + run: dart pub get --directory packages/dart + - name: Run build_runner + run: (cd packages/dart && dart run build_runner build --delete-conflicting-outputs) - name: Analyze code - run: flutter analyze packages/flutter --fatal-infos + run: dart analyze packages/dart --fatal-infos - name: Lint - run: dart format --output=none --set-exit-if-changed packages/flutter + run: dart format --output=none --set-exit-if-changed packages/dart - name: Publish dry run - run: cd packages/flutter && dart pub publish --dry-run + run: cd packages/dart && dart pub publish --dry-run - name: Run tests - run: (cd packages/flutter && flutter test --coverage) + run: (cd packages/dart && dart test --coverage=coverage) - name: Convert code coverage # Needs to be adapted to collect the coverage at all platforms if platform specific code is added. if: ${{ always() && matrix.os == 'ubuntu-latest' }} - working-directory: packages/flutter + working-directory: packages/dart run: | - escapedPath="$(echo `pwd` | sed 's/\//\\\//g')" - sed "s/^SF:lib/SF:$escapedPath\/lib/g" coverage/lcov.info > coverage/lcov-full.info + dart pub global activate coverage + dart pub global run coverage:format_coverage -i coverage/test -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on=lib - name: Upload code coverage uses: codecov/codecov-action@v2 # Needs to be adapted to collect the coverage at all platforms if platform specific code is added. if: ${{ always() && matrix.os == 'ubuntu-latest' }} with: - files: packages/flutter/coverage/lcov-full.info + files: packages/dart/coverage/lcov.info fail_ci_if_error: true -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + check-flutter: + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + # Flutter framework may contain breaking changes in minor version releases, not following semver. + - name: Flutter 3.10, Ubuntu + os: ubuntu-latest + sdk: 3.10.x + - name: Flutter 3.10, macOS + os: macos-latest + sdk: 3.10.x + - name: Flutter 3.10, Windows + os: windows-latest + sdk: 3.10.x + # Only the latest Flutter framework version (above) is tested with all architectures. Previous + # Flutter framework versions (below) are only tested with Ubuntu to reduce CI resource usage. + - name: Flutter 3.7 + os: ubuntu-latest + sdk: 3.7.x + - name: Flutter 3.3 + os: ubuntu-latest + sdk: 3.3.x + - name: Flutter beta + os: ubuntu-latest + sdk: beta \ No newline at end of file From 9304fff0ea908379f2ceec83f350392675df3677 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Mon, 16 Oct 2023 18:03:07 +0330 Subject: [PATCH 12/18] fix: revert CI. --- .github/workflows/ci.yml | 74 ++++++++++++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2054c2cf..a56e36314 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ -push: - branches: - - "master" - - "development" - paths-ignore: - - "**/README.md" -pull_request: - branches: - - "**" +name: ci +on: + push: + branches: + - "master" + - "development" + paths-ignore: + - "**/README.md" + pull_request: + branches: + - "**" jobs: check-dart: runs-on: ${{ matrix.os }} @@ -94,4 +96,56 @@ jobs: sdk: 3.3.x - name: Flutter beta os: ubuntu-latest - sdk: beta \ No newline at end of file + sdk: beta + fail-fast: false + name: Test ${{ matrix.name }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Setup flutter (beta) + if: ${{ matrix.sdk == 'beta' }} + uses: subosito/flutter-action@v2 + with: + channel: "beta" + cache: true + - name: Setup flutter + if: ${{ matrix.sdk != 'beta' }} + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ matrix.sdk }} + cache: true + - name: Install dependencies on Ubuntu and MacOS + if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' + run: | + (cd packages/dart && flutter pub get) + (cd packages/flutter && flutter pub get) + - name: Install dependencies on Windows + if: matrix.os == 'windows-latest' + run: | + cmd /c "cd packages\dart && flutter pub get" + cmd /c "cd packages\flutter && flutter pub get" + - name: Analyze code + run: flutter analyze packages/flutter --fatal-infos + - name: Lint + run: dart format --output=none --set-exit-if-changed packages/flutter + - name: Publish dry run + run: cd packages/flutter && dart pub publish --dry-run + - name: Run tests + run: (cd packages/flutter && flutter test --coverage) + - name: Convert code coverage + # Needs to be adapted to collect the coverage at all platforms if platform specific code is added. + if: ${{ always() && matrix.os == 'ubuntu-latest' }} + working-directory: packages/flutter + run: | + escapedPath="$(echo `pwd` | sed 's/\//\\\//g')" + sed "s/^SF:lib/SF:$escapedPath\/lib/g" coverage/lcov.info > coverage/lcov-full.info + - name: Upload code coverage + uses: codecov/codecov-action@v2 + # Needs to be adapted to collect the coverage at all platforms if platform specific code is added. + if: ${{ always() && matrix.os == 'ubuntu-latest' }} + with: + files: packages/flutter/coverage/lcov-full.info + fail_ci_if_error: true +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true From 5f8d05bc1041bfeaa3c63b3a3f5c8ddbcff50302 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Mon, 16 Oct 2023 18:06:13 +0330 Subject: [PATCH 13/18] fix: revert CI. --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a56e36314..9282a15af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,23 +77,23 @@ jobs: matrix: include: # Flutter framework may contain breaking changes in minor version releases, not following semver. - - name: Flutter 3.10, Ubuntu + - name: Flutter 3.13, Ubuntu os: ubuntu-latest - sdk: 3.10.x - - name: Flutter 3.10, macOS + sdk: 3.13.6 + - name: Flutter 3.13, macOS os: macos-latest - sdk: 3.10.x - - name: Flutter 3.10, Windows + sdk: 3.13.6 + - name: Flutter 3.13, Windows os: windows-latest - sdk: 3.10.x + sdk: 3.13.6 # Only the latest Flutter framework version (above) is tested with all architectures. Previous # Flutter framework versions (below) are only tested with Ubuntu to reduce CI resource usage. - - name: Flutter 3.7 + - name: Flutter 3.10 os: ubuntu-latest - sdk: 3.7.x - - name: Flutter 3.3 + sdk: 3.10.6 + - name: Flutter 3.7 os: ubuntu-latest - sdk: 3.3.x + sdk: 3.7.12 - name: Flutter beta os: ubuntu-latest sdk: beta From 9952178dbf395e135e8c860729ee0ba96c79d5d1 Mon Sep 17 00:00:00 2001 From: mbfakourii Date: Mon, 16 Oct 2023 18:07:53 +0330 Subject: [PATCH 14/18] fix: revert CI. --- .github/workflows/ci.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9282a15af..1fa63e69d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -101,7 +101,7 @@ jobs: name: Test ${{ matrix.name }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup flutter (beta) if: ${{ matrix.sdk == 'beta' }} uses: subosito/flutter-action@v2 @@ -116,14 +116,10 @@ jobs: cache: true - name: Install dependencies on Ubuntu and MacOS if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' - run: | - (cd packages/dart && flutter pub get) - (cd packages/flutter && flutter pub get) + run: cd packages/flutter && flutter pub get - name: Install dependencies on Windows if: matrix.os == 'windows-latest' - run: | - cmd /c "cd packages\dart && flutter pub get" - cmd /c "cd packages\flutter && flutter pub get" + run: cmd /c "cd packages\flutter && flutter pub get" - name: Analyze code run: flutter analyze packages/flutter --fatal-infos - name: Lint @@ -131,7 +127,7 @@ jobs: - name: Publish dry run run: cd packages/flutter && dart pub publish --dry-run - name: Run tests - run: (cd packages/flutter && flutter test --coverage) + run: cd packages/flutter && flutter test --coverage - name: Convert code coverage # Needs to be adapted to collect the coverage at all platforms if platform specific code is added. if: ${{ always() && matrix.os == 'ubuntu-latest' }} From 0e51dbd0a9860778754a1ff6c6541923b78103ea Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:18:02 +0200 Subject: [PATCH 15/18] add dev comment --- packages/flutter/example/pubspec.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/flutter/example/pubspec.yaml b/packages/flutter/example/pubspec.yaml index d3f9bf6c0..9cab9b2a5 100644 --- a/packages/flutter/example/pubspec.yaml +++ b/packages/flutter/example/pubspec.yaml @@ -21,6 +21,11 @@ dependencies: sembast: ^3.4.6+1 shared_preferences: ^2.2.0 +# Uncomment for local testing +# dependency_overrides: +# parse_server_sdk: +# path: ../../dart + dev_dependencies: flutter_test: sdk: flutter @@ -46,4 +51,4 @@ flutter: - asset: fonts/Roboto/Roboto-Bold.ttf weight: 700 - asset: fonts/Roboto/Roboto-Black.ttf - weight: 900 \ No newline at end of file + weight: 900 From 94b6121e5a129cfd60bdebe4ce0aaf5d21384fcb Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:21:40 +0200 Subject: [PATCH 16/18] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1fa63e69d..9a92017e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: - name: Publish dry run run: cd packages/flutter && dart pub publish --dry-run - name: Run tests - run: cd packages/flutter && flutter test --coverage + run: (cd packages/flutter && flutter test --coverage) - name: Convert code coverage # Needs to be adapted to collect the coverage at all platforms if platform specific code is added. if: ${{ always() && matrix.os == 'ubuntu-latest' }} From bc63c012702063bda7793c22ea7b14b0c47b1e9e Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:21:46 +0200 Subject: [PATCH 17/18] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a92017e5..f090059fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,7 +116,7 @@ jobs: cache: true - name: Install dependencies on Ubuntu and MacOS if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' - run: cd packages/flutter && flutter pub get + run: (cd packages/flutter && flutter pub get) - name: Install dependencies on Windows if: matrix.os == 'windows-latest' run: cmd /c "cd packages\flutter && flutter pub get" From 89d9ca33ebe47302a0c28bde4e4610b8818317ce Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:27:57 +0200 Subject: [PATCH 18/18] changelog --- packages/flutter/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/CHANGELOG.md b/packages/flutter/CHANGELOG.md index 639ba00fc..421029bfe 100644 --- a/packages/flutter/CHANGELOG.md +++ b/packages/flutter/CHANGELOG.md @@ -1,4 +1,4 @@ -## [7.0.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-6.0.0...flutter-7.0.0) (2023-10-09) +## [7.0.0](https://github.com/parse-community/Parse-SDK-Flutter/compare/flutter-6.0.0...flutter-7.0.0) (2023-10-16) ### BREAKING CHANGES