Skip to content

Commit

Permalink
feat(repo): bump min flutter version to 3.24.5 (#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
xsahil03x authored Dec 23, 2024
1 parent c8dce6e commit e2d4fd2
Show file tree
Hide file tree
Showing 72 changed files with 947 additions and 271 deletions.
48 changes: 48 additions & 0 deletions .github/actions/pana/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Pana Workflow

inputs:
min_score:
required: false
type: number
default: 120
pana_version:
required: false
type: string
runs_on:
required: false
type: string
default: "ubuntu-latest"
working_directory:
required: false
type: string
default: "."

runs:
using: "composite"
steps:
- name: Temporary Override Local Dependencies
shell: bash
run: |
git apply .github/actions/pana/chore__temporarily_override_dep_to_local.patch
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
# Forcing to 3.24.5 for right now as pana has an issue with Dart 3.6 https://github.com/dart-lang/dartdoc/issues/3947
flutter-version: "3.24.5"
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: Install Pana
working-directory: ${{ inputs.working_directory }}
shell: bash
run: flutter pub global activate pana ${{inputs.pana_version}}

- name: Verify Pana Score
working-directory: ${{ inputs.working_directory }}
shell: bash
run: |
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
echo "Score: $PANA_SCORE"
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0];
if (( $SCORE < ${{inputs.min_score}} )); then echo "The minimum score of ${{inputs.min_score}} was not met!"; exit 1; fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
Subject: [PATCH] chore: temporarily override dep to local
---
Index: packages/stream_chat_localizations/pubspec.yaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/stream_chat_localizations/pubspec.yaml b/packages/stream_chat_localizations/pubspec.yaml
--- a/packages/stream_chat_localizations/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba)
+++ b/packages/stream_chat_localizations/pubspec.yaml (date 1734716942871)
@@ -26,7 +26,8 @@
sdk: flutter
flutter_localizations:
sdk: flutter
- stream_chat_flutter: ^8.3.0
+ stream_chat_flutter:
+ path: ../stream_chat_flutter

dev_dependencies:
flutter_test:
Index: packages/stream_chat_flutter_core/pubspec.yaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/stream_chat_flutter_core/pubspec.yaml b/packages/stream_chat_flutter_core/pubspec.yaml
--- a/packages/stream_chat_flutter_core/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba)
+++ b/packages/stream_chat_flutter_core/pubspec.yaml (date 1734716650052)
@@ -29,7 +29,8 @@
freezed_annotation: ^2.4.1
meta: ^1.9.1
rxdart: ^0.28.0
- stream_chat: ^8.3.0
+ stream_chat:
+ path: ../stream_chat

dev_dependencies:
build_runner: ^2.4.9
@@ -38,4 +39,3 @@
sdk: flutter
freezed: ^2.4.2
mocktail: ^1.0.0
-
Index: packages/stream_chat_flutter/pubspec.yaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml
--- a/packages/stream_chat_flutter/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba)
+++ b/packages/stream_chat_flutter/pubspec.yaml (date 1734716942864)
@@ -54,7 +54,8 @@
rxdart: ^0.28.0
share_plus: ^10.0.2
shimmer: ^3.0.0
- stream_chat_flutter_core: ^8.3.0
+ stream_chat_flutter_core:
+ path: ../stream_chat_flutter_core
synchronized: ^3.1.0+1
thumblr: ^0.0.4
url_launcher: ^6.3.0
Index: packages/stream_chat_persistence/pubspec.yaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/stream_chat_persistence/pubspec.yaml b/packages/stream_chat_persistence/pubspec.yaml
--- a/packages/stream_chat_persistence/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba)
+++ b/packages/stream_chat_persistence/pubspec.yaml (date 1734717094786)
@@ -30,7 +30,8 @@
path: ^1.8.3
path_provider: ^2.1.3
sqlite3_flutter_libs: ^0.5.24
- stream_chat: ^8.3.0
+ stream_chat:
+ path: ../stream_chat

dev_dependencies:
build_runner: ^2.4.9
6 changes: 4 additions & 2 deletions .github/workflows/legacy_version_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: legacy_version_analyze
env:
# Note: The versions below should be manually updated after a new stable
# version comes out.
flutter_version: "3.22.3"
flutter_version: "3.24.5"

on:
push:
Expand Down Expand Up @@ -42,8 +42,10 @@ jobs:
- name: "Install Flutter"
uses: subosito/flutter-action@v2
with:
cache: true
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: "Install Tools"
run: flutter pub global activate melos
Expand Down
129 changes: 34 additions & 95 deletions .github/workflows/pana.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
name: pana

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
flutter_channel: "stable"
flutter_version: "3.13.9"

on:
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
push:
branches:
- master
paths-ignore:
- 'docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -25,106 +16,54 @@ jobs:
stream_chat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: flutterings/dart-package-analyzer@v1
id: analysis
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 📊 Verify Pana Score
uses: ./.github/actions/pana
with:
flutter_version: ${{ env.flutter_version }}
flutter_channel: ${{ env.flutter_channel }}
relativePath: packages/stream_chat
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 120 ))
then
echo Score too low!
exit 1
fi
working_directory: packages/stream_chat
min_score: 120

stream_chat_persistence:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: flutterings/dart-package-analyzer@v1
id: analysis
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 📊 Verify Pana Score
uses: ./.github/actions/pana
with:
flutter_version: ${{ env.flutter_version }}
flutter_channel: ${{ env.flutter_channel }}
relativePath: packages/stream_chat_persistence
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
if (( $TOTAL < 120 ))
then
echo Score too low!
exit 1
fi
working_directory: packages/stream_chat_persistence
min_score: 120

stream_chat_flutter_core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: flutterings/dart-package-analyzer@v1
id: analysis
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 📊 Verify Pana Score
uses: ./.github/actions/pana
with:
flutter_version: ${{ env.flutter_version }}
flutter_channel: ${{ env.flutter_channel }}
relativePath: packages/stream_chat_flutter_core
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 120 ))
then
echo Score too low!
exit 1
fi
working_directory: packages/stream_chat_flutter_core
min_score: 120

stream_chat_flutter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: flutterings/dart-package-analyzer@v1
id: analysis
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 📊 Verify Pana Score
uses: ./.github/actions/pana
with:
flutter_version: ${{ env.flutter_version }}
flutter_channel: ${{ env.flutter_channel }}
relativePath: packages/stream_chat_flutter
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 100 ))
then
echo Score too low!
exit 1
fi
working_directory: packages/stream_chat_flutter
min_score: 120

stream_chat_localizations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: flutterings/dart-package-analyzer@v1
id: analysis
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 📊 Verify Pana Score
uses: ./.github/actions/pana
with:
flutter_version: ${{ env.flutter_version }}
flutter_channel: ${{ env.flutter_channel }}
relativePath: packages/stream_chat_localizations
- name: Check scores
env:
# NB: "analysis" is the id set above. Replace it with the one you used if different.
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < 120 ))
then
echo Score too low!
exit 1
fi
working_directory: packages/stream_chat_localizations
min_score: 120
12 changes: 7 additions & 5 deletions .github/workflows/stream_flutter_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: stream_flutter_workflow

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
flutter_channel: "stable"
flutter_version: "3.24.3"
flutter_version: "3.x"

on:
pull_request:
Expand Down Expand Up @@ -37,8 +36,9 @@ jobs:
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
channel: ${{ env.flutter_channel }}
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: "Install Tools"
run: |
flutter pub global activate melos
Expand All @@ -65,8 +65,9 @@ jobs:
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
channel: ${{ env.flutter_channel }}
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: "Install Tools"
run: |
flutter pub global activate melos
Expand All @@ -91,8 +92,9 @@ jobs:
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: stable
cache: true
channel: ${{ env.flutter_channel }}
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: "Install Tools"
run: |
flutter pub global activate melos
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ build/
/packages/flutter_widgets/example/ios/Flutter/.last_build_id
/packages/dart_client/example/ios/Flutter/.last_build_id
/packages/dart_client/example/ios/Runner.xcodeproj/project.pbxproj

# Exceptions to the above rules
!/pubspec.lock
Loading

0 comments on commit e2d4fd2

Please sign in to comment.