Skip to content

Commit 7bc48a2

Browse files
committed
fix: change APP_ID
1 parent 36153b1 commit 7bc48a2

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/on_pr_internal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
target_branch: ${{ github.event.pull_request.head.ref }}
3636
issue_number: ${{ github.event.pull_request.number }}
3737
secrets:
38-
APP_ID: ${{ secrets.APP_ID_RTM }}
38+
APP_ID_RTM: ${{ secrets.APP_ID_RTM }}
3939
BUILD_PROVISION_PROFILE_UUID: ${{ secrets.BUILD_PROVISION_PROFILE_UUID }}
4040
BUILD_PROVISION_PROFILE_NAME: ${{ secrets.BUILD_PROVISION_PROFILE_NAME }}
4141
BUILD_PROVISION_PROFILE_TEAMID: ${{ secrets.BUILD_PROVISION_PROFILE_TEAMID }}

.github/workflows/run_build_example.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ on:
7575
# Caused by: org.gradle.api.GradleException: You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is not possible anymore. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/to/flutter-gradle-plugin-apply
7676
default: '3.24.5'
7777
secrets:
78-
APP_ID:
78+
APP_ID_RTM:
7979
required: true
8080
BUILD_PROVISION_PROFILE_UUID:
8181
required: true
@@ -133,7 +133,7 @@ jobs:
133133
strategy:
134134
fail-fast: false
135135
matrix:
136-
os: [ubuntu-latest, macos-latest, windows-latest]
136+
os: [ubuntu-latest, macos-14, windows-latest]
137137
platform: ${{ fromJson(needs.split-platforms.outputs.platforms) }}
138138
exclude:
139139
- os: ubuntu-latest
@@ -238,7 +238,7 @@ jobs:
238238

239239
- name: Build
240240
env:
241-
DEFAULT_BUILD_APP_ID: ${{ secrets.APP_ID }}
241+
DEFAULT_BUILD_APP_ID: ${{ secrets.APP_ID_RTM }}
242242
shell: bash
243243
working-directory: example
244244
run: |
@@ -276,7 +276,7 @@ jobs:
276276
fi
277277
278278
build_arguments="--dart-define=TEST_APP_ID=$DEFAULT_BUILD_APP_ID --dart-define=TEST_TOKEN="" --dart-define=TEST_CHANNEL_ID="testapi" --dart-define=INTERNAL_TESTING=true"
279-
279+
280280
# append extra build arguments
281281
if [ -n "$extra_build_arguments" ]; then
282282
build_arguments="$build_arguments $extra_build_arguments"
@@ -288,8 +288,9 @@ jobs:
288288
fi
289289
290290
# run build command
291+
echo "build command: $build_command $build_options $build_arguments"
291292
$build_command $build_options $build_arguments
292-
293+
293294
# create output directory if it doesn't exist
294295
if [ ! -d "../output" ]; then
295296
mkdir -p ../output

example/lib/src/internal/internal_config.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ String get appId {
66
}
77

88
String get token {
9-
const token = String.fromEnvironment('TEST_TOKEN', defaultValue: '');
10-
return token.isNotEmpty ? token : config.token;
9+
return bool.hasEnvironment('TEST_TOKEN')
10+
? const String.fromEnvironment('TEST_TOKEN')
11+
: config.token;
1112
}
1213

1314
String get channelId {

example/lib/src/rtm_api_demo.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ class _RtmApiDemoState extends State<RtmApiDemo> {
218218

219219
_textField(_channelNameController, 'Input channel name'),
220220
_button('RtmClient.login', () async {
221+
logSink.log('[LoginResult] app id: ${config.appId} token: ${config.token}');
221222
final (status, _) = await _rtmClient.login(config.token);
222223
logSink.log('[LoginResult] errorCode: ${status.errorCode}');
223224
}),

0 commit comments

Comments
 (0)