Skip to content

Commit e2d4fd2

Browse files
authored
feat(repo): bump min flutter version to 3.24.5 (#2068)
1 parent c8dce6e commit e2d4fd2

File tree

72 files changed

+947
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+947
-271
lines changed

.github/actions/pana/action.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Pana Workflow
2+
3+
inputs:
4+
min_score:
5+
required: false
6+
type: number
7+
default: 120
8+
pana_version:
9+
required: false
10+
type: string
11+
runs_on:
12+
required: false
13+
type: string
14+
default: "ubuntu-latest"
15+
working_directory:
16+
required: false
17+
type: string
18+
default: "."
19+
20+
runs:
21+
using: "composite"
22+
steps:
23+
- name: Temporary Override Local Dependencies
24+
shell: bash
25+
run: |
26+
git apply .github/actions/pana/chore__temporarily_override_dep_to_local.patch
27+
28+
- name: Install Flutter
29+
uses: subosito/flutter-action@v2
30+
with:
31+
# 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
32+
flutter-version: "3.24.5"
33+
cache: true
34+
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
35+
36+
- name: Install Pana
37+
working-directory: ${{ inputs.working_directory }}
38+
shell: bash
39+
run: flutter pub global activate pana ${{inputs.pana_version}}
40+
41+
- name: Verify Pana Score
42+
working-directory: ${{ inputs.working_directory }}
43+
shell: bash
44+
run: |
45+
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
46+
echo "Score: $PANA_SCORE"
47+
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0];
48+
if (( $SCORE < ${{inputs.min_score}} )); then echo "The minimum score of ${{inputs.min_score}} was not met!"; exit 1; fi
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Subject: [PATCH] chore: temporarily override dep to local
2+
---
3+
Index: packages/stream_chat_localizations/pubspec.yaml
4+
IDEA additional info:
5+
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
6+
<+>UTF-8
7+
===================================================================
8+
diff --git a/packages/stream_chat_localizations/pubspec.yaml b/packages/stream_chat_localizations/pubspec.yaml
9+
--- a/packages/stream_chat_localizations/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba)
10+
+++ b/packages/stream_chat_localizations/pubspec.yaml (date 1734716942871)
11+
@@ -26,7 +26,8 @@
12+
sdk: flutter
13+
flutter_localizations:
14+
sdk: flutter
15+
- stream_chat_flutter: ^8.3.0
16+
+ stream_chat_flutter:
17+
+ path: ../stream_chat_flutter
18+
19+
dev_dependencies:
20+
flutter_test:
21+
Index: packages/stream_chat_flutter_core/pubspec.yaml
22+
IDEA additional info:
23+
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
24+
<+>UTF-8
25+
===================================================================
26+
diff --git a/packages/stream_chat_flutter_core/pubspec.yaml b/packages/stream_chat_flutter_core/pubspec.yaml
27+
--- a/packages/stream_chat_flutter_core/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba)
28+
+++ b/packages/stream_chat_flutter_core/pubspec.yaml (date 1734716650052)
29+
@@ -29,7 +29,8 @@
30+
freezed_annotation: ^2.4.1
31+
meta: ^1.9.1
32+
rxdart: ^0.28.0
33+
- stream_chat: ^8.3.0
34+
+ stream_chat:
35+
+ path: ../stream_chat
36+
37+
dev_dependencies:
38+
build_runner: ^2.4.9
39+
@@ -38,4 +39,3 @@
40+
sdk: flutter
41+
freezed: ^2.4.2
42+
mocktail: ^1.0.0
43+
-
44+
Index: packages/stream_chat_flutter/pubspec.yaml
45+
IDEA additional info:
46+
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
47+
<+>UTF-8
48+
===================================================================
49+
diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml
50+
--- a/packages/stream_chat_flutter/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba)
51+
+++ b/packages/stream_chat_flutter/pubspec.yaml (date 1734716942864)
52+
@@ -54,7 +54,8 @@
53+
rxdart: ^0.28.0
54+
share_plus: ^10.0.2
55+
shimmer: ^3.0.0
56+
- stream_chat_flutter_core: ^8.3.0
57+
+ stream_chat_flutter_core:
58+
+ path: ../stream_chat_flutter_core
59+
synchronized: ^3.1.0+1
60+
thumblr: ^0.0.4
61+
url_launcher: ^6.3.0
62+
Index: packages/stream_chat_persistence/pubspec.yaml
63+
IDEA additional info:
64+
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
65+
<+>UTF-8
66+
===================================================================
67+
diff --git a/packages/stream_chat_persistence/pubspec.yaml b/packages/stream_chat_persistence/pubspec.yaml
68+
--- a/packages/stream_chat_persistence/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba)
69+
+++ b/packages/stream_chat_persistence/pubspec.yaml (date 1734717094786)
70+
@@ -30,7 +30,8 @@
71+
path: ^1.8.3
72+
path_provider: ^2.1.3
73+
sqlite3_flutter_libs: ^0.5.24
74+
- stream_chat: ^8.3.0
75+
+ stream_chat:
76+
+ path: ../stream_chat
77+
78+
dev_dependencies:
79+
build_runner: ^2.4.9

.github/workflows/legacy_version_analyze.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: legacy_version_analyze
33
env:
44
# Note: The versions below should be manually updated after a new stable
55
# version comes out.
6-
flutter_version: "3.22.3"
6+
flutter_version: "3.24.5"
77

88
on:
99
push:
@@ -42,8 +42,10 @@ jobs:
4242
- name: "Install Flutter"
4343
uses: subosito/flutter-action@v2
4444
with:
45-
cache: true
4645
flutter-version: ${{ env.flutter_version }}
46+
channel: stable
47+
cache: true
48+
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
4749

4850
- name: "Install Tools"
4951
run: flutter pub global activate melos

.github/workflows/pana.yml

Lines changed: 34 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
name: pana
22

3-
env:
4-
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
5-
flutter_channel: "stable"
6-
flutter_version: "3.13.9"
7-
83
on:
94
pull_request:
105
branches:
116
- master
12-
paths-ignore:
13-
- 'docs/**'
147
push:
158
branches:
169
- master
17-
paths-ignore:
18-
- 'docs/**'
1910

2011
concurrency:
2112
group: ${{ github.workflow }}-${{ github.ref }}
@@ -25,106 +16,54 @@ jobs:
2516
stream_chat:
2617
runs-on: ubuntu-latest
2718
steps:
28-
- uses: actions/checkout@v4
29-
- uses: flutterings/dart-package-analyzer@v1
30-
id: analysis
19+
- name: 📚 Git Checkout
20+
uses: actions/checkout@v4
21+
- name: 📊 Verify Pana Score
22+
uses: ./.github/actions/pana
3123
with:
32-
flutter_version: ${{ env.flutter_version }}
33-
flutter_channel: ${{ env.flutter_channel }}
34-
relativePath: packages/stream_chat
35-
- name: Check scores
36-
env:
37-
# NB: "analysis" is the id set above. Replace it with the one you used if different.
38-
TOTAL: ${{ steps.analysis.outputs.total }}
39-
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
40-
run: |
41-
if (( $TOTAL < 120 ))
42-
then
43-
echo Score too low!
44-
exit 1
45-
fi
24+
working_directory: packages/stream_chat
25+
min_score: 120
26+
4627
stream_chat_persistence:
4728
runs-on: ubuntu-latest
4829
steps:
49-
- uses: actions/checkout@v4
50-
- uses: flutterings/dart-package-analyzer@v1
51-
id: analysis
30+
- name: 📚 Git Checkout
31+
uses: actions/checkout@v4
32+
- name: 📊 Verify Pana Score
33+
uses: ./.github/actions/pana
5234
with:
53-
flutter_version: ${{ env.flutter_version }}
54-
flutter_channel: ${{ env.flutter_channel }}
55-
relativePath: packages/stream_chat_persistence
56-
- name: Check scores
57-
env:
58-
# NB: "analysis" is the id set above. Replace it with the one you used if different.
59-
TOTAL: ${{ steps.analysis.outputs.total }}
60-
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
61-
run: |
62-
PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX ))
63-
if (( $TOTAL < 120 ))
64-
then
65-
echo Score too low!
66-
exit 1
67-
fi
35+
working_directory: packages/stream_chat_persistence
36+
min_score: 120
37+
6838
stream_chat_flutter_core:
6939
runs-on: ubuntu-latest
7040
steps:
71-
- uses: actions/checkout@v4
72-
- uses: flutterings/dart-package-analyzer@v1
73-
id: analysis
41+
- name: 📚 Git Checkout
42+
uses: actions/checkout@v4
43+
- name: 📊 Verify Pana Score
44+
uses: ./.github/actions/pana
7445
with:
75-
flutter_version: ${{ env.flutter_version }}
76-
flutter_channel: ${{ env.flutter_channel }}
77-
relativePath: packages/stream_chat_flutter_core
78-
- name: Check scores
79-
env:
80-
# NB: "analysis" is the id set above. Replace it with the one you used if different.
81-
TOTAL: ${{ steps.analysis.outputs.total }}
82-
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
83-
run: |
84-
if (( $TOTAL < 120 ))
85-
then
86-
echo Score too low!
87-
exit 1
88-
fi
46+
working_directory: packages/stream_chat_flutter_core
47+
min_score: 120
48+
8949
stream_chat_flutter:
9050
runs-on: ubuntu-latest
9151
steps:
92-
- uses: actions/checkout@v4
93-
- uses: flutterings/dart-package-analyzer@v1
94-
id: analysis
52+
- name: 📚 Git Checkout
53+
uses: actions/checkout@v4
54+
- name: 📊 Verify Pana Score
55+
uses: ./.github/actions/pana
9556
with:
96-
flutter_version: ${{ env.flutter_version }}
97-
flutter_channel: ${{ env.flutter_channel }}
98-
relativePath: packages/stream_chat_flutter
99-
- name: Check scores
100-
env:
101-
# NB: "analysis" is the id set above. Replace it with the one you used if different.
102-
TOTAL: ${{ steps.analysis.outputs.total }}
103-
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
104-
run: |
105-
if (( $TOTAL < 100 ))
106-
then
107-
echo Score too low!
108-
exit 1
109-
fi
57+
working_directory: packages/stream_chat_flutter
58+
min_score: 120
59+
11060
stream_chat_localizations:
11161
runs-on: ubuntu-latest
11262
steps:
113-
- uses: actions/checkout@v4
114-
- uses: flutterings/dart-package-analyzer@v1
115-
id: analysis
63+
- name: 📚 Git Checkout
64+
uses: actions/checkout@v4
65+
- name: 📊 Verify Pana Score
66+
uses: ./.github/actions/pana
11667
with:
117-
flutter_version: ${{ env.flutter_version }}
118-
flutter_channel: ${{ env.flutter_channel }}
119-
relativePath: packages/stream_chat_localizations
120-
- name: Check scores
121-
env:
122-
# NB: "analysis" is the id set above. Replace it with the one you used if different.
123-
TOTAL: ${{ steps.analysis.outputs.total }}
124-
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
125-
run: |
126-
if (( $TOTAL < 120 ))
127-
then
128-
echo Score too low!
129-
exit 1
130-
fi
68+
working_directory: packages/stream_chat_localizations
69+
min_score: 120

.github/workflows/stream_flutter_workflow.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: stream_flutter_workflow
22

33
env:
44
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
5-
flutter_channel: "stable"
6-
flutter_version: "3.24.3"
5+
flutter_version: "3.x"
76

87
on:
98
pull_request:
@@ -37,8 +36,9 @@ jobs:
3736
uses: subosito/flutter-action@v2
3837
with:
3938
flutter-version: ${{ env.flutter_version }}
39+
channel: stable
4040
cache: true
41-
channel: ${{ env.flutter_channel }}
41+
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
4242
- name: "Install Tools"
4343
run: |
4444
flutter pub global activate melos
@@ -65,8 +65,9 @@ jobs:
6565
uses: subosito/flutter-action@v2
6666
with:
6767
flutter-version: ${{ env.flutter_version }}
68+
channel: stable
6869
cache: true
69-
channel: ${{ env.flutter_channel }}
70+
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
7071
- name: "Install Tools"
7172
run: |
7273
flutter pub global activate melos
@@ -91,8 +92,9 @@ jobs:
9192
uses: subosito/flutter-action@v2
9293
with:
9394
flutter-version: ${{ env.flutter_version }}
95+
channel: stable
9496
cache: true
95-
channel: ${{ env.flutter_channel }}
97+
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
9698
- name: "Install Tools"
9799
run: |
98100
flutter pub global activate melos

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ build/
5353
/packages/flutter_widgets/example/ios/Flutter/.last_build_id
5454
/packages/dart_client/example/ios/Flutter/.last_build_id
5555
/packages/dart_client/example/ios/Runner.xcodeproj/project.pbxproj
56+
57+
# Exceptions to the above rules
58+
!/pubspec.lock

0 commit comments

Comments
 (0)