Skip to content

Commit 5b06ef1

Browse files
ZGaopenggithub-actions[bot]guoxianzhe
authored
chore: release 2.2.6 (#236)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: guoxianzhe <guoxianzhe@users.noreply.github.com>
1 parent d5450cc commit 5b06ef1

36 files changed

Lines changed: 2105 additions & 871 deletions

.github/workflows/release.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,16 +235,19 @@ jobs:
235235
env:
236236
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
237237

238-
- name: Setup Dart for pub publish
238+
- name: Setup Flutter for pub publish
239239
if: ${{ steps.version_check.outputs.release_type == 'standard' }}
240-
uses: dart-lang/setup-dart@v1
240+
uses: subosito/flutter-action@v2
241+
with:
242+
channel: 'stable'
243+
cache: true
241244

242245
- name: Publish to pub.dev (dry-run check)
243246
if: ${{ steps.version_check.outputs.release_type == 'standard' && steps.version_check.outputs.dry-run == 'true' }}
244247
run: |
245248
echo "[DRY-RUN MODE] Running pub publish dry-run"
246-
dart pub get
247-
dart pub publish --dry-run
249+
flutter pub get
250+
flutter pub publish --dry-run
248251
249252
- name: Publish to pub.dev (real)
250253
if: ${{ steps.version_check.outputs.release_type == 'standard' && steps.version_check.outputs.dry-run == 'false' }}
@@ -368,4 +371,20 @@ jobs:
368371
run: |
369372
echo "❌ Release failed!"
370373
echo "Please check the logs and try again."
371-
exit 1
374+
exit 1
375+
376+
- name: print publish info
377+
run: |
378+
RELEASE_VERSION="${{ needs.release.outputs.increment }}"
379+
RELEASE_TYPE="${{ needs.release.outputs.release_type }}"
380+
381+
if [ "$RELEASE_TYPE" = "standard" ]; then
382+
echo "[publish info] dependencies:"
383+
echo "[publish info] agora_rtm: ^$RELEASE_VERSION"
384+
else
385+
echo "[publish info] dependencies:"
386+
echo "[publish info] agora_rtm:"
387+
echo "[publish info] git:"
388+
echo "[publish info] url: https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK.git"
389+
echo "[publish info] ref: $RELEASE_VERSION"
390+
fi

.github/workflows/run_update_deps.yml

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
target_branch:
77
description: 'Target branch to compare against. If a branch name, will compare directly against it. If a commit hash or tag, a new branch named "special/<pub_version>" will be created from that ref. The pub_version will be either the input pub_version or latest version from target branch pubspec.yaml. Defaults to "main".'
88
type: string
9-
required: true
9+
required: false
1010
default: 'main'
1111
pub_version:
1212
description: 'Target pub version to update dependencies to. If empty, will use the latest version from target branch pubspec.yaml.'
@@ -19,12 +19,12 @@ on:
1919
required: true
2020
default: ''
2121
run_gen_code:
22-
description: 'Whether to run gen code, default is false'
22+
description: 'Whether to run gen code, default is true'
2323
type: boolean
2424
required: false
25-
default: false
25+
default: true
2626
code_gen_public_headers:
27-
description: 'The public headers to generate, e.g. rtc_4.5.0, leave empty will use the same as the target branch'
27+
description: 'The public headers to generate, e.g. rtm_2.2.5. If empty, will automatically extract from dependencies_content (recommended). If dependencies_content is also empty, will use the same as the target branch.'
2828
type: string
2929
required: false
3030
default: ''
@@ -48,7 +48,7 @@ jobs:
4848
- name: Checkout target branch
4949
uses: actions/checkout@v4
5050
with:
51-
ref: ${{ inputs.target_branch }}
51+
ref: ${{ inputs.target_branch || github.ref_name }}
5252
fetch-depth: '1'
5353
lfs: 'true'
5454
submodules: 'true'
@@ -91,7 +91,7 @@ jobs:
9191
id: prepare_target_branch
9292
uses: ./.github/actions/prepare_branch
9393
with:
94-
target_branch: ${{ inputs.target_branch }}
94+
target_branch: ${{ inputs.target_branch || github.ref_name }}
9595
pub_version: ${{ inputs.pub_version }}
9696
branch_group: "special"
9797
working_directory: ./
@@ -110,17 +110,59 @@ jobs:
110110
# Update pub version into pubspec.yaml
111111
sed -i '' "s/version: .*/version: ${{ inputs.pub_version }}/" pubspec.yaml
112112
113+
- name: Extract RTM version from dependencies
114+
id: extract_rtm_version
115+
if: ${{ inputs.run_gen_code == true }}
116+
shell: bash
117+
run: |
118+
# Priority:
119+
# 1. If code_gen_public_headers is explicitly provided, use it directly
120+
# 2. Extract from dependencies_content (priority: Windows > iOS > macOS > Android)
121+
# 3. If both empty, leave empty to use current branch version
122+
123+
if [ -n "${{ inputs.code_gen_public_headers }}" ]; then
124+
rtm_version="${{ inputs.code_gen_public_headers }}"
125+
echo "Using explicitly provided version: ${rtm_version}"
126+
else
127+
dependencies_json='${{ steps.parse_dependencies_content.outputs.matches }}'
128+
129+
if [ -n "$dependencies_json" ] && [ "$dependencies_json" != "null" ]; then
130+
# Extract version from platform objects (priority: Windows > iOS > macOS > Android)
131+
version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "Windows") | .version' | head -n1)
132+
[ -z "$version" ] && version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "iOS") | .version' | head -n1)
133+
[ -z "$version" ] && version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "macOS") | .version' | head -n1)
134+
[ -z "$version" ] && version=$(echo "$dependencies_json" | jq -r '.[] | select(.platform == "Android") | .version' | head -n1)
135+
136+
# Remove -build.X suffix and format as rtm_X.X.X
137+
if [ -n "$version" ] && [ "$version" != "null" ]; then
138+
version=$(echo "$version" | sed 's/-build\.[0-9]*$//')
139+
rtm_version="rtm_${version}"
140+
echo "Extracted version from dependencies: ${rtm_version}"
141+
else
142+
rtm_version=""
143+
echo "No version found in dependencies"
144+
fi
145+
else
146+
rtm_version=""
147+
echo "No dependencies_content provided"
148+
fi
149+
fi
150+
151+
echo "rtm_version=${rtm_version}" >> $GITHUB_OUTPUT
152+
[ -n "$rtm_version" ] && echo "Final version: ${rtm_version}" || echo "No version specified, will use current branch"
153+
113154
- name: Run gen code
114155
if: ${{ inputs.run_gen_code == true }}
115156
uses: ./.github/actions/gen_code
116157
with:
117-
code_gen_public_headers: ${{ inputs.code_gen_public_headers }}
158+
code_gen_public_headers: ${{ steps.extract_rtm_version.outputs.rtm_version }}
118159
flutter_channel: ${{ inputs.flutter_channel }}
119160
flutter_version: ${{ inputs.flutter_version }}
120161
working_directory: ./
121162

122163

123164
- name: Commit and create pull request
165+
id: create_pr
124166
uses: peter-evans/create-pull-request@v4
125167
with:
126168
token: ${{ secrets.GITHUB_TOKEN }}
@@ -141,6 +183,20 @@ jobs:
141183
> This pull request is trigger by bot, you can checkout this branch and update it.
142184
labels: |
143185
ci:ready_release_special
186+
187+
- name: Output PR URL
188+
if: steps.create_pr.outputs.pull-request-operation != 'none'
189+
run: |
190+
echo "::notice title=Pull Request Created::${{ steps.create_pr.outputs.pull-request-url }}"
191+
echo ""
192+
echo "✅ Pull Request: ${{ steps.create_pr.outputs.pull-request-url }}"
193+
echo ""
194+
195+
- name: No changes detected
196+
if: steps.create_pr.outputs.pull-request-operation == 'none'
197+
run: |
198+
echo "::warning title=No Changes::No changes detected, PR was not created"
199+
echo "⚠️ No changes detected in the repository"
144200
145201
146202

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## 2.2.6 (2025-11-11)
4+
5+
### Features
6+
7+
* update dependencies ([#235](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/235)) ([176c2d7](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/176c2d7af7bd9013a309e1a1c43301fecdb06df8))
8+
* Update iris_method_channel: ^2.2.2 ([#179](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/179)) ([4e870a4](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/4e870a4006bd160abb6273773d546649ce3fc238))
9+
* Upgrade RTM Native SDK 2.2.1 ([df1a024](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/df1a024ec28da04c90cecc7729d1b8aafe7eb142))
10+
11+
### Bug Fixes
12+
13+
* fix terra gen code config ([#221](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/221)) ([59cb782](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/59cb782d1544ad981d7d96ff5685cf08bea7c1ce))
14+
* Fix use incorrect length value in RtmClientImplOverride.publish/StreamChannelImpl.publishTopicMessage ([#177](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/177)) ([b8e9ed1](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/b8e9ed14173744676fc7585d2a24ec288894a7c9))
15+
* modify pr_closed configuration ([#215](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/215)) ([944281f](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/944281f524f43b9408de5989b1eb1df6ddf89304))
16+
* modify terra/build.sh configuration ([#217](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/217)) ([a3e7a79](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/a3e7a79696fc215eb1033219fd2d5003fb3d247d))
17+
* prevent type mismatches in IrisMethodChannel.wrapRtmStatus ([30c493a](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/30c493a7e6ea6c1cada798ff0b84e0dce4510e7e)), closes [#0](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/0) [#1](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/1)
18+
* prvent request with invalid requestId ([#197](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/197)) ([f771e64](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/commit/f771e644aee9fa1dfb31749e5b2adda851c5179c)), closes [#193](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/193) [#194](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/issues/194)
19+
320
## [2.2.5](https://github.com/AgoraIO-Extensions/Agora-Flutter-RTM-SDK/compare/2.2.2...2.2.5) (2025-09-05)
421

522
### Bug Fixes

android/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ dependencies {
6868
println("Include libs/*jar for debugging.")
6969
api fileTree(dir: "libs", include: ["*.jar"])
7070
} else {
71-
# iris dependencies start
72-
api 'io.agora.rtm:iris-rtm:2.2.5-build.2'
73-
# iris dependencies end
71+
// iris dependencies start
72+
api 'io.agora.rtm:iris-rtm:2.2.6.2-build.1'
73+
// iris dependencies end
7474

75-
# native dependencies start
76-
api 'io.agora:agora-rtm:2.2.5'
77-
# native dependencies end
75+
// native dependencies start
76+
api 'io.agora:agora-rtm-special:2.2.6.2'
77+
// native dependencies end
7878
}
7979
}
8080

example/ios/Podfile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@ post_install do |installer|
4141
end
4242

4343
pre_install do |installer|
44-
rtm_pod_path = File.join(installer.sandbox.root, 'AgoraRtm')
45-
aosl_xcframework_path = File.join(rtm_pod_path, 'aosl.xcframework')
46-
47-
if File.exist?(aosl_xcframework_path)
48-
puts "Deleting aosl.xcframework from #{aosl_xcframework_path}"
49-
FileUtils.rm_rf(aosl_xcframework_path)
50-
else
51-
puts "aosl.xcframework not found, skipping deletion."
44+
possible_paths = [
45+
File.join(installer.sandbox.root, 'AgoraRtm_OC_Special', 'aosl.xcframework'),
46+
File.join(installer.sandbox.root, 'AgoraRtm', 'aosl.xcframework')
47+
]
48+
49+
possible_paths.each do |aosl_xcframework_path|
50+
if File.exist?(aosl_xcframework_path)
51+
puts "Deleting aosl.xcframework from #{aosl_xcframework_path}"
52+
FileUtils.rm_rf(aosl_xcframework_path)
53+
else
54+
puts "aosl.xcframework not found at #{aosl_xcframework_path}, skipping."
55+
end
5256
end
5357
end

example/lib/src/rtm_api_demo.dart

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
7070
_historyCountController = TextEditingController(text: '100');
7171
_historyStartController = TextEditingController(text: '0');
7272
_historyEndController = TextEditingController(text: '0');
73-
7473
}
7574

7675
@override
@@ -181,12 +180,15 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
181180
Navigator.push(
182181
context,
183182
MaterialPageRoute(
184-
builder: (context) => StreamChannelDemo(userId: _userIdController.text.trim(), channelName: _channelNameController.text.trim(),),
183+
builder: (context) => StreamChannelDemo(
184+
userId: _userIdController.text.trim(),
185+
channelName: _channelNameController.text.trim(),
186+
),
185187
),
186188
);
187189
},
188190
icon: const Icon(Icons.message),
189-
label: const Text('push streamChannel-demo page'),
191+
label: const Text('push streamChannel-demo page'),
190192
),
191193
]),
192194
_textField(_userIdController, 'Input user id'),
@@ -224,8 +226,8 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
224226
storage: (event) {
225227
logSink.log('[storage] event: ${event.toJson()}');
226228
},
227-
token: (channelName) {
228-
logSink.log('[token] channelName: $channelName');
229+
token: (event) {
230+
logSink.log('[token] event: ${event.toJson()}');
229231
},
230232
);
231233
await _rtmClient.setParameters('{"rtm.log_filter":2063}');
@@ -235,10 +237,10 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
235237
_ispPolicyEnabled = v;
236238
});
237239
}),
238-
239240
_textField(_channelNameController, 'Input channel name'),
240241
_button('RtmClient.login', () async {
241-
logSink.log('[LoginResult] app id: ${config.appId} token: ${config.token}');
242+
logSink.log(
243+
'[LoginResult] app id: ${config.appId} token: ${config.token}');
242244
final (status, _) = await _rtmClient.login(config.token);
243245
logSink.log('[LoginResult] errorCode: ${status.errorCode}');
244246
}),
@@ -471,7 +473,6 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
471473
}),
472474
],
473475
),
474-
475476
_card(
476477
[
477478
Wrap(

example/lib/src/stream_channel_demo.dart

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ class _StreamChannelDemoState extends State<StreamChannelDemo> {
108108
storage: (event) {
109109
_addLog('[storage] event: ${event.toJson()}');
110110
},
111-
token: (channelName) {
112-
_addLog('[token] channelName: $channelName');
111+
token: (event) {
112+
_addLog('[token] event: ${event.toJson()}');
113113
},
114114
);
115115
await _rtmClient.setParameters('{"rtm.log_filter":2063}');
@@ -709,7 +709,6 @@ class _StreamChannelDemoState extends State<StreamChannelDemo> {
709709
padding: const EdgeInsets.all(16.0),
710710
child: Column(
711711
children: [
712-
713712
TextField(
714713
controller: _customTypeController,
715714
decoration: const InputDecoration(
@@ -737,24 +736,24 @@ class _StreamChannelDemoState extends State<StreamChannelDemo> {
737736
),
738737
),
739738
ElevatedButton(
740-
onPressed: _isTopicJoined &&
741-
_isLoggedIn &&
742-
_streamChannel != null &&
743-
_isChannelJoined
744-
? _sendBasicTextMessage
745-
: null,
746-
child: const Text('7. Send Basic Message'),
747-
),
739+
onPressed: _isTopicJoined &&
740+
_isLoggedIn &&
741+
_streamChannel != null &&
742+
_isChannelJoined
743+
? _sendBasicTextMessage
744+
: null,
745+
child: const Text('7. Send Basic Message'),
746+
),
748747
const SizedBox(height: 8),
749748
ElevatedButton(
750-
onPressed: _isTopicJoined &&
751-
_isLoggedIn &&
752-
_streamChannel != null &&
753-
_isChannelJoined
754-
? _sendBasicBinaryMessage
755-
: null,
756-
child: const Text('8. Send Basic Binary Message'),
757-
),
749+
onPressed: _isTopicJoined &&
750+
_isLoggedIn &&
751+
_streamChannel != null &&
752+
_isChannelJoined
753+
? _sendBasicBinaryMessage
754+
: null,
755+
child: const Text('8. Send Basic Binary Message'),
756+
),
758757
],
759758
),
760759
),

ios/agora_rtm.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ Pod::Spec.new do |s|
2626
s.vendored_frameworks = 'libs/*.xcframework'
2727
else
2828
# iris dependencies start
29-
s.dependency 'AgoraIrisRTM_iOS', '2.2.5-build.2'
30-
# iris dependencies end
29+
s.dependency 'AgoraIrisRTM_iOS', '2.2.6.2-build.1'
30+
# iris dependencies end
3131

3232
# native dependencies start
33-
s.dependency 'AgoraRtm', '2.2.5'
34-
# native dependencies end
33+
s.dependency 'AgoraRtm_OC_Special', '2.2.6.2'
34+
# native dependencies end
3535
end
3636

3737
# Flutter.framework does not contain a i386 slice.

0 commit comments

Comments
 (0)