From c5eaf3bfae57d5482849998a231bd67809f5d133 Mon Sep 17 00:00:00 2001 From: zhugaopeng Date: Fri, 11 Jul 2025 14:51:42 +0800 Subject: [PATCH 1/9] chore: update example project gradle config --- example/android/app/build.gradle | 13 +++++++------ example/android/settings.gradle | 32 ++++++++++++++++++++++++-------- example/pubspec.yaml | 2 +- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index fd7ed07e6..bf75a4527 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -1,3 +1,8 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -21,14 +26,10 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { namespace "io.agora.agora_rtc_ng_example" - compileSdkVersion 34 + compileSdkVersion 35 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -47,7 +48,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "io.agora.agora_rtc_ng_example" minSdkVersion 21 - targetSdkVersion flutter.targetSdkVersion + targetSdkVersion 35 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/example/android/settings.gradle b/example/android/settings.gradle index f860b7645..3ea324435 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,11 +1,27 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ':app' -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" \ No newline at end of file diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 66b5c579c..dbb7d68ee 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -30,7 +30,7 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - permission_handler: ^10.2.0 + permission_handler: ^11.3.0 path_provider: ^2.0.8 dev_dependencies: From 8dc0bc55771275ee0463b612f7a5e4635ce2ee2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BGopein?= Date: Fri, 11 Jul 2025 17:04:36 +0800 Subject: [PATCH 2/9] feat: migrate CI to use Flutter stable channel and update dependencies --- .github/workflows/run_test.yml | 91 +++++++-------------------------- example/android/settings.gradle | 2 +- example/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 4 files changed, 22 insertions(+), 75 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index e38482646..3c6e77552 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -86,10 +86,6 @@ jobs: integration_test_android: name: Run Flutter Android Integration Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - fail-fast: false - matrix: - version: ["3.7.0", "3.24.5"] runs-on: ubuntu-latest timeout-minutes: 120 env: @@ -103,7 +99,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - name: Enable KVM run: | @@ -124,10 +120,6 @@ jobs: integration_test_ios: name: Run Flutter iOS Integration Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - fail-fast: false - matrix: - version: ["3.7.0", "3.16"] runs-on: macos-latest timeout-minutes: 120 env: @@ -136,7 +128,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - uses: futureware-tech/simulator-action@v3 with: @@ -160,16 +152,12 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: logs-ios-${{ matrix.version }} + name: logs-ios-stable path: logs-ios/* integration_test_macos: name: Run Flutter macOS Integration Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - fail-fast: false - matrix: - version: ["3.7.0"] runs-on: macos-latest timeout-minutes: 120 env: @@ -178,7 +166,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - run: flutter config --enable-macos-desktop - run: bash ci/run_flutter_macos_integration_test.sh @@ -206,7 +194,7 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: iris-logs-macos-${{ matrix.version }} + name: iris-logs-macos-stable path: iris-logs-macos/* integration_test_swiftpm: @@ -240,10 +228,6 @@ jobs: integration_test_windows: name: Run Flutter Windows Integration Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - fail-fast: false - matrix: - version: ["3.7.0", "3.24.5"] runs-on: windows-2022 timeout-minutes: 120 env: @@ -252,7 +236,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - name: Set up crash dump environment run: .\ci\setup-crash-dumps.ps1 @@ -267,15 +251,12 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: windows-crash-dumps-${{ matrix.version }} + name: windows-crash-dumps-stable path: ./CrashDumps/* integration_test_web: name: Run Flutter Web Integration Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - matrix: - version: ["3.24.5"] runs-on: ubuntu-latest timeout-minutes: 60 env: @@ -284,7 +265,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - name: Run web integration test shell: bash @@ -295,10 +276,6 @@ jobs: build_android_ubuntu: name: Build Android on Ubuntu if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - fail-fast: false - matrix: - version: ["3.7.12", "3.24.5"] # Need 3.7.12 to build with Gradle 8.x https://github.com/flutter/flutter/issues/124838 runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -309,7 +286,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - run: flutter pub get - name: Run flutter build apk @@ -319,10 +296,6 @@ jobs: build_android_windows: name: Build Android on Windows if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - fail-fast: false - matrix: - version: ["3.7.12", "3.24.5"] # Need 3.7.12 to build with Gradle 8.x https://github.com/flutter/flutter/issues/124838 runs-on: windows-2022 steps: - uses: actions/checkout@v3 @@ -333,7 +306,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - run: flutter pub get - name: Run flutter build apk @@ -343,17 +316,13 @@ jobs: build_ios: name: Build iOS if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - fail-fast: false - matrix: - version: ["3.7.12"] runs-on: macos-latest timeout-minutes: 120 steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - run: flutter pub get - name: Run flutter build ios --no-codesign @@ -364,16 +333,13 @@ jobs: build_ios_xcode_15: name: Build iOS with xcode 15.x if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - matrix: - version: ["3.24.5"] runs-on: macos-13 timeout-minutes: 120 steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - run: | # https://github.com/actions/runner-images/issues/6746#issuecomment-1380042553 # set xcode version to use for build @@ -389,17 +355,13 @@ jobs: build_web: name: Build Web if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - fail-fast: false - matrix: - version: ["3.7.0", "3.24.5"] runs-on: ubuntu-latest timeout-minutes: 120 steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - run: flutter packages get - name: Run flutter build web @@ -422,7 +384,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - flutter-version: "3.24.5" + channel: 'stable' cache: true - name: Enable KVM run: | @@ -449,9 +411,6 @@ jobs: rendering_test_ios: name: Run Flutter iOS Rendering Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - matrix: - version: ["3.24.5"] runs-on: macos-13 # Rendering test on ios simulator need macos 13+ timeout-minutes: 60 env: @@ -460,7 +419,7 @@ jobs: - uses: actions/checkout@v1 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - uses: futureware-tech/simulator-action@v3 with: @@ -476,9 +435,6 @@ jobs: rendering_test_macos: name: Run Flutter macOS Rendering Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - matrix: - version: ["3.24.5"] runs-on: macos-latest timeout-minutes: 120 env: @@ -487,7 +443,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - run: flutter config --enable-macos-desktop - name: Run macos rendering test @@ -503,9 +459,6 @@ jobs: rendering_test_windows: name: Run Flutter Windows Rendering Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - matrix: - version: ["3.24.5"] runs-on: windows-2022 timeout-minutes: 120 env: @@ -514,7 +467,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - run: flutter config --enable-windows-desktop - name: Run windows integration test @@ -532,9 +485,6 @@ jobs: rendering_test_web: name: Run Flutter Web Rendering Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - matrix: - version: ["3.24.5"] runs-on: ubuntu-latest timeout-minutes: 60 env: @@ -543,7 +493,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - name: Run web rendering test shell: bash @@ -562,9 +512,6 @@ jobs: check_android15_16k_page_alignment: name: Check android15 16k page size alignment if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} - strategy: - matrix: - version: ["3.24.5"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -575,7 +522,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - flutter-version: ${{ matrix.version }} + channel: 'stable' cache: true - run: flutter pub get - name: Run flutter build apk diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 3ea324435..73ec5fcd8 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -20,7 +20,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "8.3.0" apply false - id "org.jetbrains.kotlin.android" version "1.7.10" apply false + id "org.jetbrains.kotlin.android" version "1.9.10" apply false } include ':app' diff --git a/example/pubspec.yaml b/example/pubspec.yaml index dbb7d68ee..f92762580 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -42,7 +42,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^1.0.0 + flutter_lints: ^3.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/pubspec.yaml b/pubspec.yaml index d6e152be1..ac3ba2393 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ version: 6.5.2-sp.452140.b.1 homepage: https://www.agora.io repository: https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/tree/main environment: - sdk: '>=2.17.0 <4.0.0' + sdk: '>=2.19.0 <4.0.0' flutter: '>=3.7.0' dependencies: flutter: From c19498798cd485b9371d51f81108dbeecc346f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BGopein?= Date: Fri, 11 Jul 2025 18:36:11 +0800 Subject: [PATCH 3/9] ci: optimize Flutter version management in GitHub Actions workflow --- .github/workflows/run_test.yml | 139 ++++++++++++++++++++++++--------- 1 file changed, 104 insertions(+), 35 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 3c6e77552..2523872cf 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -10,6 +10,10 @@ on: APP_ID: required: true +env: + PRIMARY_FLUTTER_VERSIONS: '["3.32.5"]' # 主要测试版本 + LATEST_FLUTTER_VERSION: "3.32.6" # 最新版本 + jobs: flutter_codestyle_check: name: Flutter codestyle/analyze check @@ -71,6 +75,7 @@ jobs: with: name: agora_rtc_engine_docs.zip path: agora_rtc_engine_docs.zip + pub_publish_check: name: pub publish check if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} @@ -84,8 +89,12 @@ jobs: - run: bash ci/dart_pub_publish_check.sh integration_test_android: - name: Run Flutter Android Integration Tests + name: Run Flutter Android Integration Tests (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: ubuntu-latest timeout-minutes: 120 env: @@ -99,7 +108,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - name: Enable KVM run: | @@ -118,8 +127,12 @@ jobs: script: bash ci/run_flutter_integration_test_android.sh integration_test_ios: - name: Run Flutter iOS Integration Tests + name: Run Flutter iOS Integration Tests (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: macos-latest timeout-minutes: 120 env: @@ -128,7 +141,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - uses: futureware-tech/simulator-action@v3 with: @@ -152,12 +165,16 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: logs-ios-stable + name: logs-ios-${{ matrix.version }} path: logs-ios/* integration_test_macos: - name: Run Flutter macOS Integration Tests + name: Run Flutter macOS Integration Tests (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: macos-latest timeout-minutes: 120 env: @@ -166,7 +183,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - run: flutter config --enable-macos-desktop - run: bash ci/run_flutter_macos_integration_test.sh @@ -194,11 +211,11 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: iris-logs-macos-stable + name: iris-logs-macos-${{ matrix.version }} path: iris-logs-macos/* integration_test_swiftpm: - name: Run Flutter SwiftPM Integration Tests + name: Run Flutter SwiftPM Integration Tests (${{ matrix.os }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -226,8 +243,12 @@ jobs: working-directory: test_shard/integration_test_swiftpm integration_test_windows: - name: Run Flutter Windows Integration Tests + name: Run Flutter Windows Integration Tests (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: windows-2022 timeout-minutes: 120 env: @@ -236,7 +257,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - name: Set up crash dump environment run: .\ci\setup-crash-dumps.ps1 @@ -251,12 +272,16 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: windows-crash-dumps-stable + name: windows-crash-dumps-${{ matrix.version }} path: ./CrashDumps/* integration_test_web: - name: Run Flutter Web Integration Tests + name: Run Flutter Web Integration Tests (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: ubuntu-latest timeout-minutes: 60 env: @@ -265,7 +290,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - name: Run web integration test shell: bash @@ -274,8 +299,12 @@ jobs: bash ci/run_flutter_integration_test_web.sh build_android_ubuntu: - name: Build Android on Ubuntu + name: Build Android on Ubuntu (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -286,7 +315,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - run: flutter pub get - name: Run flutter build apk @@ -294,8 +323,12 @@ jobs: working-directory: example build_android_windows: - name: Build Android on Windows + name: Build Android on Windows (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: windows-2022 steps: - uses: actions/checkout@v3 @@ -306,7 +339,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - run: flutter pub get - name: Run flutter build apk @@ -314,15 +347,19 @@ jobs: working-directory: example build_ios: - name: Build iOS + name: Build iOS (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: macos-latest timeout-minutes: 120 steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - run: flutter pub get - name: Run flutter build ios --no-codesign @@ -331,15 +368,19 @@ jobs: # This job aim to cover https://github.com/flutter/flutter/issues/135739 build_ios_xcode_15: - name: Build iOS with xcode 15.x + name: Build iOS with xcode 15.x (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: macos-13 timeout-minutes: 120 steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - run: | # https://github.com/actions/runner-images/issues/6746#issuecomment-1380042553 # set xcode version to use for build @@ -353,15 +394,19 @@ jobs: working-directory: example build_web: - name: Build Web + name: Build Web (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: ubuntu-latest timeout-minutes: 120 steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - run: flutter packages get - name: Run flutter build web @@ -371,6 +416,10 @@ jobs: rendering_test_android: name: Run Flutter Android Rendering Tests if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: ubuntu-latest timeout-minutes: 120 env: @@ -384,7 +433,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - name: Enable KVM run: | @@ -409,8 +458,12 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png rendering_test_ios: - name: Run Flutter iOS Rendering Tests + name: Run Flutter iOS Rendering Tests (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: macos-13 # Rendering test on ios simulator need macos 13+ timeout-minutes: 60 env: @@ -419,7 +472,7 @@ jobs: - uses: actions/checkout@v1 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - uses: futureware-tech/simulator-action@v3 with: @@ -433,8 +486,12 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png rendering_test_macos: - name: Run Flutter macOS Rendering Tests + name: Run Flutter macOS Rendering Tests (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: macos-latest timeout-minutes: 120 env: @@ -443,7 +500,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - run: flutter config --enable-macos-desktop - name: Run macos rendering test @@ -457,8 +514,12 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png rendering_test_windows: - name: Run Flutter Windows Rendering Tests + name: Run Flutter Windows Rendering Tests (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: windows-2022 timeout-minutes: 120 env: @@ -467,7 +528,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - run: flutter config --enable-windows-desktop - name: Run windows integration test @@ -483,8 +544,12 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png rendering_test_web: - name: Run Flutter Web Rendering Tests + name: Run Flutter Web Rendering Tests (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: ubuntu-latest timeout-minutes: 60 env: @@ -493,7 +558,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - name: Run web rendering test shell: bash @@ -510,8 +575,12 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png check_android15_16k_page_alignment: - name: Check android15 16k page size alignment + name: Check android15 16k page size alignment (Flutter ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} + strategy: + fail-fast: false + matrix: + version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -522,7 +591,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - channel: 'stable' + flutter-version: ${{ matrix.version }} cache: true - run: flutter pub get - name: Run flutter build apk From c9b3d527829c48d868dd87877183d925cd3cd543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BGopein?= Date: Fri, 11 Jul 2025 18:49:05 +0800 Subject: [PATCH 4/9] fix: resolve env context access issue in reusable workflow matrix --- .github/workflows/run_test.yml | 42 ++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 2523872cf..0be9d7251 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -6,14 +6,16 @@ concurrency: on: workflow_call: + inputs: + flutter-versions: + description: 'Flutter versions to test (JSON array)' + required: false + default: '["3.32.5"]' + type: string secrets: APP_ID: required: true -env: - PRIMARY_FLUTTER_VERSIONS: '["3.32.5"]' # 主要测试版本 - LATEST_FLUTTER_VERSION: "3.32.6" # 最新版本 - jobs: flutter_codestyle_check: name: Flutter codestyle/analyze check @@ -94,7 +96,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: ubuntu-latest timeout-minutes: 120 env: @@ -132,7 +134,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: macos-latest timeout-minutes: 120 env: @@ -174,7 +176,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: macos-latest timeout-minutes: 120 env: @@ -248,7 +250,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: windows-2022 timeout-minutes: 120 env: @@ -281,7 +283,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: ubuntu-latest timeout-minutes: 60 env: @@ -304,7 +306,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -328,7 +330,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: windows-2022 steps: - uses: actions/checkout@v3 @@ -352,7 +354,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: macos-latest timeout-minutes: 120 steps: @@ -373,7 +375,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: macos-13 timeout-minutes: 120 steps: @@ -399,7 +401,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: ubuntu-latest timeout-minutes: 120 steps: @@ -419,7 +421,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: ubuntu-latest timeout-minutes: 120 env: @@ -463,7 +465,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: macos-13 # Rendering test on ios simulator need macos 13+ timeout-minutes: 60 env: @@ -491,7 +493,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: macos-latest timeout-minutes: 120 env: @@ -519,7 +521,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: windows-2022 timeout-minutes: 120 env: @@ -549,7 +551,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: ubuntu-latest timeout-minutes: 60 env: @@ -580,7 +582,7 @@ jobs: strategy: fail-fast: false matrix: - version: ${{ fromJSON(env.PRIMARY_FLUTTER_VERSIONS) }} + version: ${{ fromJSON(inputs.flutter-versions) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 083736fa90d596e2ecc6a917ca759ddf41341168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BGopein?= Date: Mon, 14 Jul 2025 11:03:31 +0800 Subject: [PATCH 5/9] test: fix Android and web rendering test build configuration --- ...al_video_view_controller_platform_web.dart | 6 ++-- .../fake_test_app/android/app/build.gradle | 9 +++--- .../fake_test_app/android/settings.gradle | 32 ++++++++++++++----- .../android/app/build.gradle | 9 +++--- .../android/settings.gradle | 32 ++++++++++++++----- .../example/android/app/build.gradle | 9 +++--- .../example/android/settings.gradle | 32 ++++++++++++++----- .../rendering_test/android/app/build.gradle | 9 +++--- .../rendering_test/android/settings.gradle | 32 ++++++++++++++----- 9 files changed, 118 insertions(+), 52 deletions(-) diff --git a/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart b/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart index faf673aa0..3f828cbe1 100644 --- a/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart +++ b/lib/src/impl/platform/web/global_video_view_controller_platform_web.dart @@ -1,10 +1,9 @@ import 'dart:async'; import 'dart:html' as html; -import 'dart:ui' as ui; +import 'dart:ui_web' as ui; import '/agora_rtc_engine.dart'; import '/src/impl/platform/global_video_view_controller_platform.dart'; -import 'package:iris_method_channel/iris_method_channel.dart'; // ignore_for_file: public_member_api_docs @@ -47,8 +46,7 @@ final Map _viewMap = {}; class GlobalVideoViewControllerWeb extends GlobalVideoViewControllerPlatfrom { GlobalVideoViewControllerWeb( - IrisMethodChannel irisMethodChannel, RtcEngine rtcEngine) - : super(irisMethodChannel, rtcEngine) { + super.irisMethodChannel, super.rtcEngine) { // ignore: undefined_prefixed_name ui.platformViewRegistry.registerViewFactory(_platformRendererViewType, (int viewId) { diff --git a/test_shard/fake_test_app/android/app/build.gradle b/test_shard/fake_test_app/android/app/build.gradle index c5a9b1b13..7abb78245 100644 --- a/test_shard/fake_test_app/android/app/build.gradle +++ b/test_shard/fake_test_app/android/app/build.gradle @@ -1,3 +1,8 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -21,10 +26,6 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { compileSdkVersion flutter.compileSdkVersion diff --git a/test_shard/fake_test_app/android/settings.gradle b/test_shard/fake_test_app/android/settings.gradle index 44e62bcf0..73ec5fcd8 100644 --- a/test_shard/fake_test_app/android/settings.gradle +++ b/test_shard/fake_test_app/android/settings.gradle @@ -1,11 +1,27 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.9.10" apply false +} + +include ':app' -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/test_shard/integration_test_app/android/app/build.gradle b/test_shard/integration_test_app/android/app/build.gradle index b5d21dc08..bbf3b2e75 100644 --- a/test_shard/integration_test_app/android/app/build.gradle +++ b/test_shard/integration_test_app/android/app/build.gradle @@ -1,3 +1,8 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -21,10 +26,6 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { compileSdkVersion 34 diff --git a/test_shard/integration_test_app/android/settings.gradle b/test_shard/integration_test_app/android/settings.gradle index 44e62bcf0..73ec5fcd8 100644 --- a/test_shard/integration_test_app/android/settings.gradle +++ b/test_shard/integration_test_app/android/settings.gradle @@ -1,11 +1,27 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.9.10" apply false +} + +include ':app' -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/test_shard/iris_tester/example/android/app/build.gradle b/test_shard/iris_tester/example/android/app/build.gradle index ed16e9786..221bb00bc 100644 --- a/test_shard/iris_tester/example/android/app/build.gradle +++ b/test_shard/iris_tester/example/android/app/build.gradle @@ -1,3 +1,8 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -21,10 +26,6 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion diff --git a/test_shard/iris_tester/example/android/settings.gradle b/test_shard/iris_tester/example/android/settings.gradle index 44e62bcf0..73ec5fcd8 100644 --- a/test_shard/iris_tester/example/android/settings.gradle +++ b/test_shard/iris_tester/example/android/settings.gradle @@ -1,11 +1,27 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.9.10" apply false +} + +include ':app' -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/test_shard/rendering_test/android/app/build.gradle b/test_shard/rendering_test/android/app/build.gradle index ad8cc0050..61a2417d0 100644 --- a/test_shard/rendering_test/android/app/build.gradle +++ b/test_shard/rendering_test/android/app/build.gradle @@ -1,3 +1,8 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -21,10 +26,6 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion diff --git a/test_shard/rendering_test/android/settings.gradle b/test_shard/rendering_test/android/settings.gradle index 44e62bcf0..73ec5fcd8 100644 --- a/test_shard/rendering_test/android/settings.gradle +++ b/test_shard/rendering_test/android/settings.gradle @@ -1,11 +1,27 @@ -include ':app' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "8.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.9.10" apply false +} + +include ':app' -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" From 9bbea212fd802da194ece95a2c7963784889abaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BGopein?= Date: Mon, 14 Jul 2025 11:44:34 +0800 Subject: [PATCH 6/9] chore: upgrade gradle wrapper to 8.10 for test applications --- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- .../example/android/gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test_shard/fake_test_app/android/gradle/wrapper/gradle-wrapper.properties b/test_shard/fake_test_app/android/gradle/wrapper/gradle-wrapper.properties index cc5527d78..514d9bb54 100644 --- a/test_shard/fake_test_app/android/gradle/wrapper/gradle-wrapper.properties +++ b/test_shard/fake_test_app/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip diff --git a/test_shard/integration_test_app/android/gradle/wrapper/gradle-wrapper.properties b/test_shard/integration_test_app/android/gradle/wrapper/gradle-wrapper.properties index cc5527d78..514d9bb54 100644 --- a/test_shard/integration_test_app/android/gradle/wrapper/gradle-wrapper.properties +++ b/test_shard/integration_test_app/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip diff --git a/test_shard/iris_tester/example/android/gradle/wrapper/gradle-wrapper.properties b/test_shard/iris_tester/example/android/gradle/wrapper/gradle-wrapper.properties index cc5527d78..514d9bb54 100644 --- a/test_shard/iris_tester/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/test_shard/iris_tester/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip diff --git a/test_shard/rendering_test/android/gradle/wrapper/gradle-wrapper.properties b/test_shard/rendering_test/android/gradle/wrapper/gradle-wrapper.properties index cc5527d78..514d9bb54 100644 --- a/test_shard/rendering_test/android/gradle/wrapper/gradle-wrapper.properties +++ b/test_shard/rendering_test/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip From 0d4efd74e70b71b10d9b92f8d812d619cfc35a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BGopein?= Date: Mon, 14 Jul 2025 13:47:16 +0800 Subject: [PATCH 7/9] chore: add namespace configuration for AGP compatibility --- test_shard/fake_test_app/android/app/build.gradle | 4 ++++ test_shard/integration_test_app/android/app/build.gradle | 4 ++++ test_shard/iris_tester/android/build.gradle | 3 +++ test_shard/rendering_test/android/app/build.gradle | 5 +++++ 4 files changed, 16 insertions(+) diff --git a/test_shard/fake_test_app/android/app/build.gradle b/test_shard/fake_test_app/android/app/build.gradle index 7abb78245..cfc9710b4 100644 --- a/test_shard/fake_test_app/android/app/build.gradle +++ b/test_shard/fake_test_app/android/app/build.gradle @@ -27,6 +27,10 @@ if (flutterVersionName == null) { } android { + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace 'com.example.fake_test_app' + } compileSdkVersion flutter.compileSdkVersion compileOptions { diff --git a/test_shard/integration_test_app/android/app/build.gradle b/test_shard/integration_test_app/android/app/build.gradle index bbf3b2e75..2be8b4308 100644 --- a/test_shard/integration_test_app/android/app/build.gradle +++ b/test_shard/integration_test_app/android/app/build.gradle @@ -27,6 +27,10 @@ if (flutterVersionName == null) { } android { + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace 'io.agora.integration_test_app.integration_test_app' + } compileSdkVersion 34 compileOptions { diff --git a/test_shard/iris_tester/android/build.gradle b/test_shard/iris_tester/android/build.gradle index 9ed52b4e5..eccceaf88 100644 --- a/test_shard/iris_tester/android/build.gradle +++ b/test_shard/iris_tester/android/build.gradle @@ -26,6 +26,9 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { + if (project.android.hasProperty("namespace")) { + namespace 'com.example.iris_tester' + } compileSdkVersion 34 compileOptions { diff --git a/test_shard/rendering_test/android/app/build.gradle b/test_shard/rendering_test/android/app/build.gradle index 61a2417d0..a728bd699 100644 --- a/test_shard/rendering_test/android/app/build.gradle +++ b/test_shard/rendering_test/android/app/build.gradle @@ -27,6 +27,11 @@ if (flutterVersionName == null) { } android { + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace 'com.example.rendering_test' + } + compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion From 642d7a2cb8f8a211781e8455caea1bfed64ef9df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BGopein?= Date: Mon, 14 Jul 2025 17:28:16 +0800 Subject: [PATCH 8/9] chore: update Android SDK and dependencies for test apps --- test_shard/integration_test_app/android/app/build.gradle | 2 +- test_shard/integration_test_app/pubspec.yaml | 2 +- test_shard/iris_tester/android/build.gradle | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test_shard/integration_test_app/android/app/build.gradle b/test_shard/integration_test_app/android/app/build.gradle index 2be8b4308..f3ca4d703 100644 --- a/test_shard/integration_test_app/android/app/build.gradle +++ b/test_shard/integration_test_app/android/app/build.gradle @@ -31,7 +31,7 @@ android { if (project.android.hasProperty("namespace")) { namespace 'io.agora.integration_test_app.integration_test_app' } - compileSdkVersion 34 + compileSdkVersion 35 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/test_shard/integration_test_app/pubspec.yaml b/test_shard/integration_test_app/pubspec.yaml index eccf0e41c..0a62b0959 100644 --- a/test_shard/integration_test_app/pubspec.yaml +++ b/test_shard/integration_test_app/pubspec.yaml @@ -39,7 +39,7 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 path_provider: ^2.0.8 - permission_handler: ^8.3.0 + permission_handler: ^11.3.0 dev_dependencies: integration_test: diff --git a/test_shard/iris_tester/android/build.gradle b/test_shard/iris_tester/android/build.gradle index eccceaf88..083346138 100644 --- a/test_shard/iris_tester/android/build.gradle +++ b/test_shard/iris_tester/android/build.gradle @@ -29,7 +29,7 @@ android { if (project.android.hasProperty("namespace")) { namespace 'com.example.iris_tester' } - compileSdkVersion 34 + compileSdkVersion 35 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 From 19d3731255324f6934fda107bc1b3c4c489f8a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=8BGopein?= Date: Wed, 16 Jul 2025 11:31:53 +0800 Subject: [PATCH 9/9] ci: optimize GitHub Actions workflow configuration --- .github/workflows/run_test.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 0be9d7251..b2657d3bb 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -91,7 +91,7 @@ jobs: - run: bash ci/dart_pub_publish_check.sh integration_test_android: - name: Run Flutter Android Integration Tests (Flutter ${{ matrix.version }}) + name: Run Flutter Android Integration Tests ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -129,7 +129,7 @@ jobs: script: bash ci/run_flutter_integration_test_android.sh integration_test_ios: - name: Run Flutter iOS Integration Tests (Flutter ${{ matrix.version }}) + name: Run Flutter iOS Integration Tests ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -171,7 +171,7 @@ jobs: path: logs-ios/* integration_test_macos: - name: Run Flutter macOS Integration Tests (Flutter ${{ matrix.version }}) + name: Run Flutter macOS Integration Tests ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -245,7 +245,7 @@ jobs: working-directory: test_shard/integration_test_swiftpm integration_test_windows: - name: Run Flutter Windows Integration Tests (Flutter ${{ matrix.version }}) + name: Run Flutter Windows Integration Tests ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -278,7 +278,7 @@ jobs: path: ./CrashDumps/* integration_test_web: - name: Run Flutter Web Integration Tests (Flutter ${{ matrix.version }}) + name: Run Flutter Web Integration Tests ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -301,7 +301,7 @@ jobs: bash ci/run_flutter_integration_test_web.sh build_android_ubuntu: - name: Build Android on Ubuntu (Flutter ${{ matrix.version }}) + name: Build Android on Ubuntu ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -325,7 +325,7 @@ jobs: working-directory: example build_android_windows: - name: Build Android on Windows (Flutter ${{ matrix.version }}) + name: Build Android on Windows ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -349,7 +349,7 @@ jobs: working-directory: example build_ios: - name: Build iOS (Flutter ${{ matrix.version }}) + name: Build iOS ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -370,7 +370,7 @@ jobs: # This job aim to cover https://github.com/flutter/flutter/issues/135739 build_ios_xcode_15: - name: Build iOS with xcode 15.x (Flutter ${{ matrix.version }}) + name: Build iOS with xcode 15.x ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -396,7 +396,7 @@ jobs: working-directory: example build_web: - name: Build Web (Flutter ${{ matrix.version }}) + name: Build Web ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -426,6 +426,8 @@ jobs: timeout-minutes: 120 env: TEST_APP_ID: ${{ secrets.APP_ID }} + GRADLE_OPTS: "-Xmx4096M -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" + ORG_GRADLE_PROJECT_GRADLE_OPTS: "-Xmx4096M -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" steps: - uses: actions/checkout@v3 - name: Install JDK @@ -460,7 +462,7 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png rendering_test_ios: - name: Run Flutter iOS Rendering Tests (Flutter ${{ matrix.version }}) + name: Run Flutter iOS Rendering Tests ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -488,7 +490,7 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png rendering_test_macos: - name: Run Flutter macOS Rendering Tests (Flutter ${{ matrix.version }}) + name: Run Flutter macOS Rendering Tests ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -516,7 +518,7 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png rendering_test_windows: - name: Run Flutter Windows Rendering Tests (Flutter ${{ matrix.version }}) + name: Run Flutter Windows Rendering Tests ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -546,7 +548,7 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png rendering_test_web: - name: Run Flutter Web Rendering Tests (Flutter ${{ matrix.version }}) + name: Run Flutter Web Rendering Tests ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false @@ -577,7 +579,7 @@ jobs: path: test_shard/rendering_test/screenshot/*.debug.png check_android15_16k_page_alignment: - name: Check android15 16k page size alignment (Flutter ${{ matrix.version }}) + name: Check android15 16k page size alignment ( ${{ matrix.version }}) if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }} strategy: fail-fast: false