Skip to content

[ECO-5566] chore: update Android Gradle build to support the newer Flutter SDK#579

Merged
ttypic merged 2 commits intomainfrom
ECO-5566/gradle-upgrade
Oct 27, 2025
Merged

[ECO-5566] chore: update Android Gradle build to support the newer Flutter SDK#579
ttypic merged 2 commits intomainfrom
ECO-5566/gradle-upgrade

Conversation

@ttypic
Copy link
Contributor

@ttypic ttypic commented Oct 14, 2025

Resolves #577, #578

  • Upgraded Gradle to 8.12.1
  • Changed compile and target compatibility to Java 17
  • Set compileSdkVersion to use Flutter's value.
  • Added compiler flags for unchecked and deprecation warnings.

Summary by CodeRabbit

  • Chores
    • Updated Android Gradle tooling and Gradle wrapper versions for modern builds.
    • Upgraded Java/Kotlin compatibility to Java 17 across modules.
    • Updated Kotlin plugin, Firebase Messaging and related dependencies.
    • Adjusted desugaring usage (changed per module) and removed legacy multidex where no longer needed.
    • CI/Flutter workflows updated; integration tests now build APKs before running.
    • Added stricter Java compiler linting during builds.

@ttypic ttypic requested a review from sacOO7 October 14, 2025 12:32
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 14, 2025 12:32 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 14, 2025 12:33 Inactive
@coderabbitai
Copy link

coderabbitai bot commented Oct 14, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Updated Android and CI build tooling and configs: Gradle, AGP, Kotlin plugin and wrapper versions bumped; Java/Kotlin targets moved to Java 17; Firebase and desugaring dependencies adjusted; Flutter and Ruby tool versions updated; CI workflow now builds APK before driving tests and added compiler lint flags.

Changes

Cohort / File(s) Change Summary
Root Android build
android/build.gradle
AGP classpath bumped to 8.12.1; project version set to 1.0-SNAPSHOT; compileSdkVersion switched to flutter.compileSdkVersion ?: 34; source/target compatibility set to Java 17; removed multiDexEnabled; added gradle.projectsEvaluated JavaCompile lint flags; Firebase Messaging updated to 23.0.6; removed coreLibraryDesugaring declaration.
Example app Android settings
example/android/settings.gradle, example/android/app/build.gradle
Kotlin Gradle plugin updated to 2.2.20; Java/Kotlin compilation targets set to Java 17 / jvmTarget 17.
Test integration settings & wrapper
test_integration/android/settings.gradle, test_integration/android/gradle/wrapper/gradle-wrapper.properties
AGP bumped to 8.7.0; Kotlin plugin to 2.2.20; added com.google.gms.google-services plugin 4.3.10 (apply false); Gradle wrapper updated to gradle-8.10.2.
Test integration app build
test_integration/android/app/build.gradle
Enabled coreLibraryDesugaring flag and added dependency com.android.tools:desugar_jdk_libs:2.0.3; switched Java/Kotlin targets to Java 17 / jvmTarget 17.
CI and toolchain
.github/workflows/flutter_integration.yaml, .tool-versions
Flutter in CI bumped to 3.29; workflow now runs flutter build apk before flutter drive; Ruby updated to 3.4.5.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant CI as GitHub Actions
  participant Repo as Repository
  participant Flutter as Flutter CLI
  note right of CI #DDEEFF: Flutter integration workflow (android/ios)
  CI->>Repo: checkout
  CI->>Flutter: flutter pub get
  CI->>Flutter: flutter build apk   %% explicit new build step for Android
  alt build success
    CI->>Flutter: flutter drive --target=...   %% instrumentation run after APK built
    Flutter-->>CI: test results
  else build failure
    note right of CI #FEE: abort tests / report failure
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Focus points:
    • Java 17 migration across modules and Kotlin jvmTarget alignment.
    • AGP, Gradle wrapper and Kotlin plugin compatibility matrix.
    • Desugaring changes: removal in root and addition in test_integration.
    • CI workflow APK build path and emulator/test expectations.
    • Dependency bumps (Firebase, plugins) for potential behavioral changes.

Poem

🐇 I hopped through Gradle fields at night,
Swapped versions till the build shone bright,
Java 17 beneath my paws,
APK built before the cause,
Carrots, lint, and tests — all right!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning Most changes are directly related to Android Gradle build updates and Flutter SDK compatibility. However, the .tool-versions file contains an unrelated change updating Ruby from 3.0.1 to 3.4.5, which is not connected to the Android Gradle build or compileSdk version objectives stated in the linked issues. Additionally, while the .github/workflows/flutter_integration.yaml changes to Flutter version 3.29 and APK building may support the updated Gradle configuration, they extend beyond the core Android build tool updates specified in the requirements. Consider removing the Ruby version update from .tool-versions as it is unrelated to the Android Gradle build objectives. Review whether the workflow changes in .github/workflows/flutter_integration.yaml are strictly necessary for the Gradle upgrade or if they should be addressed in a separate PR to keep scope focused on Android build tool updates.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "ECO-5566 chore: update Android Gradle build to support the newer Flutter SDK" directly and clearly describes the primary changes in the changeset. The title focuses on Android Gradle build updates, which aligns with the major modifications across android/build.gradle, settings.gradle files, wrapper properties, and app build configurations. The title is concise, specific, and would help a teammate scanning the history understand that this PR involves modernizing the Android build tooling for Flutter SDK compatibility.
Linked Issues Check ✅ Passed The PR addresses the linked issues' requirements for updating Android dependencies and compileSdk version. Issue #577/ECO-5566 requested updating outdated native dependencies and resolving compileSdk warnings. The PR updates Gradle from 7.4.0 to 8.12.1, Kotlin plugins to 2.2.20, Java compatibility to version 17, Firebase messaging to 23.0.6, and sets compileSdkVersion to use Flutter's recommended value (flutter.compileSdkVersion ?: 34). While the PR doesn't hardcode compileSdkVersion to 36 as mentioned in the issue, it adopts a more maintainable approach by delegating to Flutter's SDK value, which would resolve the underlying build warning. The PR description confirms it resolves both linked issues.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ECO-5566/gradle-upgrade

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2a3d17b and 1566840.

📒 Files selected for processing (1)
  • android/build.gradle (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • android/build.gradle
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: ios
  • GitHub Check: android
  • GitHub Check: android (24)
  • GitHub Check: android (29)
  • GitHub Check: ios

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from aaf5852 to f8073ef Compare October 14, 2025 12:33
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 14, 2025 12:36 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 14, 2025 12:36 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
android/build.gradle (1)

70-74: Replace afterEvaluate hook with configureEach for configuration-cache safety.

Using projectsEvaluated/afterEvaluate makes builds less cacheable. Prefer configureEach.

Apply this diff:

-gradle.projectsEvaluated {
-    tasks.withType(JavaCompile) {
-        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
-    }
-}
+tasks.withType(JavaCompile).configureEach {
+    options.compilerArgs += ["-Xlint:unchecked", "-Xlint:deprecation"]
+}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 53a0c2a and f8073ef.

📒 Files selected for processing (1)
  • android/build.gradle (3 hunks)
🔇 Additional comments (4)
android/build.gradle (4)

38-38: Good: use Flutter’s compileSdkVersion.

This aligns the plugin with the app’s SDK level. Please ensure Flutter’s value resolves to 36 to meet the objective; override if Flutter is behind.


2-4: Module version set to 1.0-SNAPSHOT.

Fine for local development. Verify it doesn’t unintentionally affect published artifacts or consumer versioning in your release pipeline.


28-35: Upgrade Firebase, desugar, and verify Ably versions

  • Switch to the Firebase BOM (platform("com.google.firebase:firebase-bom:<latest>")) and remove the hard-pinned firebase-messaging version.
  • Bump coreLibraryDesugaring to com.android.tools:desugar_jdk_libs:2.x for full Java 11+ API support.
  • Confirm you’re using the latest compatible io.ably:ably-android:1.2.x release.

46-47: Java 17 is correct for AGP 8; no Kotlin plugin or sources under android/ so no kotlinOptions.jvmTarget needed. Consider adopting a Gradle toolchain for future robustness.

Copy link
Collaborator

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build is failing with error

A problem occurred evaluating project ':ably_flutter'.
Could not get unknown property 'flutter' for extension 'android' of type com.android.build.gradle.LibraryExtension.

@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from f8073ef to 63c86ab Compare October 16, 2025 13:39
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 16, 2025 13:39 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 16, 2025 13:40 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
test_integration/android/settings.gradle (1)

21-23: Same Kotlin plugin version issue as noted in example/android/settings.gradle

See my earlier comment; we need to align this file with the corrected Kotlin plugin version as well.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f8073ef and 63c86ab.

📒 Files selected for processing (3)
  • android/build.gradle (3 hunks)
  • example/android/settings.gradle (1 hunks)
  • test_integration/android/settings.gradle (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • android/build.gradle
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: android
  • GitHub Check: ios
  • GitHub Check: android (24)
  • GitHub Check: android (29)

@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from 63c86ab to 218b6c2 Compare October 16, 2025 14:28
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 16, 2025 14:28 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 16, 2025 14:28 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 63c86ab and 218b6c2.

📒 Files selected for processing (4)
  • android/build.gradle (3 hunks)
  • example/android/settings.gradle (1 hunks)
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • test_integration/android/settings.gradle (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • example/android/settings.gradle
  • android/build.gradle
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: android
  • GitHub Check: android (29)
  • GitHub Check: android (24)

@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from 218b6c2 to 13d991e Compare October 16, 2025 23:31
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 16, 2025 23:32 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 16, 2025 23:32 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
android/build.gradle (1)

62-66: Compiler lint flags improve code quality feedback.

Adding -Xlint:unchecked and -Xlint:deprecation will surface potential type-safety and deprecation issues at compile time. However, note that these are warnings, not errors—the build will still succeed. Ensure the team is prepared to address these warnings or suppress them selectively with @SuppressWarnings where justified.

Consider converting these warnings to build errors (fail-on-warning) in CI to enforce code quality, or document the process for triaging and suppressing warnings:

gradle.projectsEvaluated {
    tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
        // Optionally treat warnings as errors in strict mode:
        // options.compilerArgs << "-Werror"
    }
}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 218b6c2 and 13d991e.

📒 Files selected for processing (5)
  • .github/workflows/flutter_integration.yaml (2 hunks)
  • android/build.gradle (3 hunks)
  • example/android/settings.gradle (1 hunks)
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • test_integration/android/settings.gradle (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • test_integration/android/settings.gradle
  • example/android/settings.gradle
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: android
  • GitHub Check: ios
  • GitHub Check: android (29)
  • GitHub Check: ios (iPhone 16)
  • GitHub Check: android (24)
🔇 Additional comments (7)
test_integration/android/gradle/wrapper/gradle-wrapper.properties (1)

3-3: Gradle wrapper version aligns with test_integration, but verify AGP compatibility in android/build.gradle.

The upgrade to 8.10.2 is reasonable, but ensure it matches the Android Gradle Plugin (AGP) version. Per the official AGP/Gradle compatibility matrix, AGP 8.12.x requires Gradle 8.13+; Gradle 8.10.2 is compatible with AGP 8.8.x. The mismatch will cause build failures—see review of android/build.gradle line 13.

.github/workflows/flutter_integration.yaml (2)

13-13: iOS device update is reasonable; validate availability.

Updating to iPhone 16 is fine, but verify that macos-latest runner image includes this simulator. If not, the workflow will fail with a simulator lookup error. The latest macOS runners typically support current-year iPhone models, so this should be safe.


36-39: Pod install step is appropriate for CocoaPods-based iOS dependencies.

The added pod install step before flutter drive ensures iOS dependencies are available. This aligns with modern iOS build practices and the broader Android/iOS modernization in this PR.

android/build.gradle (4)

38-38: Dynamic compileSdk binding is a best practice.

Using flutter.compileSdkVersion ensures the plugin builds against the same SDK as the Flutter framework, reducing version mismatches and future-proofing the plugin. This aligns with modern Flutter best practices.


2-4: Version comment is clear and helpful.

The snapshot suffix comment accurately conveys that this is a development build. The comment is well-placed and improves maintainability.


34-34: Desugaring is likely necessary with minSdkVersion 19, but verify if SDK minimum will be increased.

Your codebase doesn't directly use Java 8+ APIs (no lambdas, streams, or Optional found), but firebase-messaging 23.0.4 almost certainly uses them internally. Since minSdkVersion 19 (API level 19, 2013) predates Java 8 native support (added in API 24, 2016), desugaring is required to run these dependencies on older devices.

Removing coreLibraryDesugaring would likely cause build or runtime failures unless minSdkVersion is increased (e.g., to 24+). If there are concrete plans to increase the minimum SDK as part of ongoing modernization, this becomes an optional refactor. Otherwise, keep the dependency.


46-47: Java 17 upgrade is verified as compatible with declared dependencies.

Verification confirms that both ably-android:1.2.40 (requires Java 8+) and firebase-messaging:23.0.4 (Android library with no JDK blockers) support Java 17. The Android Gradle Plugin 8.12.1 actually requires JDK 17, and desugar_jdk_libs:1.1.5 is already configured to ensure Android API compatibility for minSdk 19. No reflection, compilation, or dependency resolution errors are expected.

@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from 13d991e to 1281524 Compare October 16, 2025 23:46
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 16, 2025 23:47 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 16, 2025 23:47 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
test_integration/android/settings.gradle (1)

23-23: Bump google-services plugin for AGP 8.7 compatibility.

com.google.gms.google-services 4.3.10 is incompatible with Android Gradle Plugin 8.x and will cause build failures due to removed BaseVariant APIs. Update to version 4.4.0 or later.

Apply this diff:

-    id "com.google.gms.google-services" version "4.3.10" apply false
+    id "com.google.gms.google-services" version "4.4.2" apply false
🧹 Nitpick comments (1)
test_integration/ios/Runner.xcodeproj/project.pbxproj (1)

345-345: Consider raising deployment target for consistency.

The test_integration project's deployment target remains at iOS 10.0, while the example project was raised to iOS 12.0 (at project level). For consistency and to match modern iOS support requirements, consider updating this project's deployment target as well.

#!/bin/bash
# Verify deployment targets across both iOS projects
echo "=== Example project deployment targets ==="
rg -n "IPHONEOS_DEPLOYMENT_TARGET" example/ios/Runner.xcodeproj/project.pbxproj | head -10

echo -e "\n=== Test integration project deployment targets ==="
rg -n "IPHONEOS_DEPLOYMENT_TARGET" test_integration/ios/Runner.xcodeproj/project.pbxproj | head -10

Also applies to: 431-431, 480-480

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 13d991e and 1281524.

⛔ Files ignored due to path filters (2)
  • test_integration/ios/Podfile.lock is excluded by !**/*.lock
  • test_integration/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (17)
  • .github/workflows/flutter_integration.yaml (2 hunks)
  • .tool-versions (1 hunks)
  • android/build.gradle (3 hunks)
  • example/android/app/build.gradle (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • example/ios/Flutter/AppFrameworkInfo.plist (1 hunks)
  • example/ios/Runner.xcodeproj/project.pbxproj (7 hunks)
  • example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (2 hunks)
  • example/ios/Runner/Info.plist (1 hunks)
  • test_integration/android/app/build.gradle (1 hunks)
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • test_integration/android/settings.gradle (1 hunks)
  • test_integration/ios/Flutter/AppFrameworkInfo.plist (1 hunks)
  • test_integration/ios/Runner.xcodeproj/project.pbxproj (4 hunks)
  • test_integration/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (2 hunks)
  • test_integration/ios/Runner/AppDelegate.swift (1 hunks)
  • test_integration/ios/Runner/Info.plist (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • test_integration/ios/Flutter/AppFrameworkInfo.plist
🚧 Files skipped from review as they are similar to previous changes (2)
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties
  • example/android/settings.gradle
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: android (29)
  • GitHub Check: ios (iPhone 16)
  • GitHub Check: android (24)
  • GitHub Check: ios
  • GitHub Check: android
🔇 Additional comments (26)
example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (2)

3-3: LGTM: Xcode version updated to 15.1.

The LastUpgradeVersion bump from "1300" (Xcode 13.0) to "1510" (Xcode 15.1) aligns with keeping the project configuration current with modern tooling.


51-51: LGTM: GPU validation enabled for debugging.

Enabling GPU validation mode helps catch Metal API usage errors and performance issues during development. This is a helpful debugging feature with no impact on release builds.

example/ios/Runner/Info.plist (1)

52-55: LGTM: Modern iOS capability flags added.

The two new keys enable contemporary iOS features:

  • CADisableMinimumFrameDurationOnPhone: Allows the app to utilize high refresh rate displays (ProMotion)
  • UIApplicationSupportsIndirectInputEvents: Enables indirect input device support (trackpad, Apple Pencil hover)

These are opt-in enhancements with no negative impact on older devices.

test_integration/ios/Runner/Info.plist (1)

44-47: LGTM: Consistent capability flags with example app.

The same modern iOS capability flags are appropriately added to the integration test app, maintaining consistency with the example app configuration.

test_integration/ios/Runner/AppDelegate.swift (1)

4-4: LGTM: Modernized Swift entry point annotation.

The change from @UIApplicationMain to @main adopts the Swift 5.3+ standard attribute for marking the app's entry point. This is functionally equivalent and aligns with current Swift best practices.

.github/workflows/flutter_integration.yaml (2)

13-13: LGTM: Updated to iPhone 16 simulator.

Using the iPhone 16 simulator keeps the integration tests running on a current device model. The comment correctly notes that iOS version isn't specified since it changes frequently.


35-39: No changes required—directory navigation is correct.

The workflow correctly executes flutter drive from the test_integration/ directory. After running pod install in test_integration/ios, the cd .. command returns to test_integration/, which is the correct location to run flutter drive (the directory containing pubspec.yaml for the integration test package). The navigation logic is sound and requires no adjustment.

Likely an incorrect or invalid review comment.

example/ios/Runner.xcodeproj/project.pbxproj (5)

6-6: LGTM: Object version updated for Xcode 14+ compatibility.

Bumping objectVersion from 50 to 54 ensures compatibility with Xcode 14 and later toolchains.


160-160: LGTM: Project upgraded to Xcode 15.1.

LastUpgradeCheck updated from 1300 (Xcode 13.0) to 1510 (Xcode 15.1), consistent with the scheme file changes.


206-211: LGTM: Build script phase improvements.

Adding alwaysOutOfDate = 1 ensures Flutter's thin binary script runs every build (necessary for Flutter tooling), and including ${TARGET_BUILD_DIR}/${INFOPLIST_PATH} in inputPaths helps Xcode properly track dependencies.


252-252: LGTM: Flutter build script marked to run every build.

Setting alwaysOutOfDate = 1 for the Flutter build script ensures it executes on every build, which is required for Flutter's incremental build system.


362-362: Verify whether the Runner target should be updated to match the project-level iOS 12.0 deployment target.

The PR successfully updated project-level configurations (Release, Debug, Profile) from 9.0 to 12.0. However, the Runner target's build settings at lines 388, 528, and 564 still retain IPHONEOS_DEPLOYMENT_TARGET = 10.0, which overrides the project-level setting. Additionally, the Podfile (line 44) enforces 10.0 for generated pods. In Xcode's build settings hierarchy, target-level settings take precedence, so the effective deployment target for the Runner app remains iOS 10.0, not 12.0.

Confirm whether this mixed configuration is intentional or if all deployment targets should be unified at 12.0:

  • If intentional: document why Runner must support iOS 10.0 while the project targets 12.0
  • If unintentional: update lines 388, 528, 564 and the Podfile to 12.0 for consistency
test_integration/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (1)

3-3: LGTM: Consistent Xcode upgrade with example project.

The test_integration scheme receives the same updates as the example project: Xcode 15.1 upgrade and GPU validation mode enabled. This consistency is appropriate.

Also applies to: 53-53

test_integration/ios/Runner.xcodeproj/project.pbxproj (3)

6-6: LGTM: Object version updated for modern Xcode.

ObjectVersion bumped from 51 to 54, aligning with the example project's upgrade to Xcode 14+ compatibility.


158-158: LGTM: Project upgraded to Xcode 15.1.

LastUpgradeCheck consistently updated to 1510 (Xcode 15.1) across both example and test_integration projects.


202-207: LGTM: Build script phases updated consistently.

The Thin Binary and Run Script phases receive the same alwaysOutOfDate = 1 setting and input path tracking as the example project, ensuring Flutter tooling works correctly.

Also applies to: 218-218

.tool-versions (1)

1-1: LGTM! Ruby version updated to current stable release.

The Ruby version bump from 3.0.1 to 3.4.5 is appropriate as Ruby 3.0.x reached end-of-life in March 2024.

test_integration/android/app/build.gradle (1)

14-20: LGTM! Java 17 toolchain upgrade is correct.

The Java and Kotlin compatibility settings are appropriately upgraded to Java 17, aligning with the project-wide toolchain modernization.

example/android/app/build.gradle (2)

15-21: LGTM! Java 17 toolchain upgrade is correct.

The Java and Kotlin compatibility settings are appropriately upgraded to Java 17, consistent with the project-wide toolchain modernization.


52-52: The coreLibraryDesugaring dependency is indeed unnecessary and can be safely removed.

Verification confirms:

  • Java 17 is explicitly configured (JavaVersion.VERSION_17)
  • The example app itself contains no usage of desugared APIs
  • All declared dependencies (junit, androidx.test, espresso) are compatible with Java 17 and don't require desugaring
  • Java 17 natively provides APIs that previously required desugaring (java.time, java.util.stream, java.util.function, Optional)

Recommend removing the coreLibraryDesugaring dependency from line 52 since it serves no purpose with Java 17.

android/build.gradle (5)

2-4: LGTM! Version and comment clarification.

The version comment appropriately clarifies that this is a development build artifact not intended for external distribution.


38-38: LGTM! Dynamic compileSdkVersion aligns with Flutter SDK.

Using flutter.compileSdkVersion ensures the plugin stays synchronized with Flutter's SDK requirements, addressing the PR objective to update compileSdkVersion.


46-48: LGTM! Java 17 compatibility upgrade is correct.

The Java source and target compatibility upgrade to Java 17 aligns with modern Android development requirements and the project-wide toolchain modernization.


62-66: LGTM! Compiler lint flags improve code quality.

Enabling -Xlint:unchecked and -Xlint:deprecation will surface warnings about unchecked operations and deprecated API usage, improving code maintainability.


34-34: Desugaring is still necessary and should be maintained.

Java 17 as the compile target (lines 46-47) does not affect runtime API availability. With minSdkVersion 19 (Android 4.4), the ably-android:1.2.40 dependency requires desugaring because it uses Java 8+ library APIs (java.time, java.util.stream, java.util.function, Optional) that are only natively available on Android API 26+. The coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' configuration is correct.

test_integration/android/settings.gradle (1)

21-22: LGTM! AGP and Kotlin plugin versions updated appropriately.

The Android Gradle Plugin (8.7.0) and Kotlin Android plugin (2.2.20) versions are updated to support modern Android development tooling and align with the Java 17 upgrade.

@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from 1281524 to 2be4e19 Compare October 17, 2025 12:20
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 17, 2025 12:20 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 17, 2025 12:21 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (2)
example/android/settings.gradle (1)

22-22: Kotlin 2.2.20 is now published and available.

The previous review comment flagged this version as non-existent, but Kotlin 2.2.20 is a published release available on the Gradle plugins portal. This version is appropriate and the change is good.

test_integration/android/settings.gradle (1)

21-23: ⚠️ Upgrade google-services plugin for AGP 8.7 compatibility (duplicate of past review).

The latest release of the google-services plugin for Android (v4.4.3) is now available. The version 4.3.10 in use predates AGP 8.x and may cause compatibility issues. The past review flagged this concern; upgrade to a 4.4.x release (e.g., 4.4.2 or 4.4.3) for proper AGP 8.7 compatibility.

Apply this diff:

-    id "com.google.gms.google-services" version "4.3.10" apply false
+    id "com.google.gms.google-services" version "4.4.2" apply false
🧹 Nitpick comments (2)
.github/workflows/flutter_integration.yaml (1)

15-15: Verify macOS 13 is appropriate for the updated toolchain.

Pinning to macos-13 (released 2022) may be overly restrictive given the broader toolchain upgrades in this PR (Gradle 8.12.1, Java 17). Confirm that:

  1. macOS 13 is the minimum version required by the new Flutter/Gradle/Java 17 stack, or
  2. A newer macOS version (e.g., macos-14 or macos-15-xl) would be compatible and preferable for sustainability.

Note: The comment at line 13 indicates iOS version is intentionally unspecified to accommodate changes, but the runner version is now hardcoded.

Consider documenting the rationale for this specific macOS version choice, especially if it's a hard minimum requirement imposed by the new toolchain.

android/build.gradle (1)

34-34: ⚠️ Desugar library version inconsistency across modules.

This file uses desugar_jdk_libs:1.1.5, while test_integration/android/app/build.gradle uses desugar_jdk_libs:2.0.3. For a coherent Java 17 migration across the project, align both modules to use the same (preferably latest stable) version.

Consider updating android/build.gradle to match:

-    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
+    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1281524 and 2be4e19.

⛔ Files ignored due to path filters (2)
  • test_integration/ios/Podfile.lock is excluded by !**/*.lock
  • test_integration/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (17)
  • .github/workflows/flutter_integration.yaml (2 hunks)
  • .tool-versions (1 hunks)
  • android/build.gradle (3 hunks)
  • example/android/app/build.gradle (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • example/ios/Flutter/AppFrameworkInfo.plist (1 hunks)
  • example/ios/Runner.xcodeproj/project.pbxproj (7 hunks)
  • example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (2 hunks)
  • example/ios/Runner/Info.plist (1 hunks)
  • test_integration/android/app/build.gradle (2 hunks)
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • test_integration/android/settings.gradle (1 hunks)
  • test_integration/ios/Flutter/AppFrameworkInfo.plist (1 hunks)
  • test_integration/ios/Runner.xcodeproj/project.pbxproj (4 hunks)
  • test_integration/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (2 hunks)
  • test_integration/ios/Runner/AppDelegate.swift (1 hunks)
  • test_integration/ios/Runner/Info.plist (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
  • example/android/app/build.gradle
  • test_integration/ios/Runner.xcodeproj/project.pbxproj
  • test_integration/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  • .tool-versions
  • test_integration/ios/Runner/AppDelegate.swift
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties
  • example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  • example/ios/Flutter/AppFrameworkInfo.plist
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: android (29)
  • GitHub Check: ios (iPhone 15)
  • GitHub Check: android (24)
  • GitHub Check: android
  • GitHub Check: ios
🔇 Additional comments (11)
.github/workflows/flutter_integration.yaml (1)

34-36: Verify the flutter drive command works from the repository root.

The command changed from cd test_integration && flutter drive to flutter drive. This assumes the test driver can locate or auto-discover the integration test target from the root directory.

Please confirm:

  1. Does flutter drive now correctly discover/run tests from the test_integration directory without explicit navigation, or
  2. Is there a pubspec.yaml or test configuration at the root that defines this behavior?

This is a structural change that could silently fail or run incorrect tests if misconfigured.

test_integration/android/app/build.gradle (1)

14-22: Java 17 configuration looks solid.

The Java 17 compilation targets are properly aligned across compileOptions, kotlinOptions.jvmTarget, and desugaring is enabled to support core library APIs on older Android versions. The desugar_jdk_libs:2.0.3 dependency is appropriate for this setup.

android/build.gradle (3)

2-4: Documentation comments are clear.

The version identifier and context comments improve clarity about this file's role in the build. No functional changes needed.


46-47: Java 17 alignment is correct.

The Java 17 compilation targets align with the PR objectives and are consistent with the test_integration configuration.


62-66: Lint compiler args enhance code quality feedback.

Adding -Xlint:unchecked and -Xlint:deprecation flags is a good practice for surfacing potential code quality issues during compilation. This aids long-term maintainability.

test_integration/android/settings.gradle (1)

22-22: Kotlin 2.2.20 is confirmed published and available.

The version is appropriate; no issue here. (Note: The past review comment on the example/android/settings.gradle file flagged this as non-existent, but Kotlin 2.2.20 is a published release available on the Gradle plugins portal.)

example/ios/Runner.xcodeproj/project.pbxproj (3)

6-6: LGTM: Xcode version metadata updates are appropriate.

The objectVersion = 54 and LastUpgradeCheck = 1510 updates correspond to Xcode 15.1 and are consistent with modernizing the iOS build tooling.

Also applies to: 160-160


206-206: LGTM: Build phase improvements for Flutter tooling.

Adding alwaysOutOfDate = 1 ensures the Thin Binary script runs on every build, which is appropriate for Flutter's embed_and_thin script. The additional input path improves Xcode's dependency tracking.

Also applies to: 211-211


252-252: LGTM: Build phase improvement for Flutter build script.

Adding alwaysOutOfDate = 1 ensures Flutter's build script runs on every build, which is necessary for proper Flutter integration.

test_integration/ios/Runner/Info.plist (1)

44-47: LGTM: Modern iOS capability keys added.

The two new Info.plist keys are appropriate for supporting modern iOS features:

  • CADisableMinimumFrameDurationOnPhone: Controls ProMotion display frame rate behavior
  • UIApplicationSupportsIndirectInputEvents: Required for proper indirect input support (iOS 13.4+)

These additions align with modernizing iOS platform support and are consistently applied across both example and test_integration configurations.

example/ios/Runner/Info.plist (1)

52-55: LGTM: Consistent iOS capability keys added.

The same modern iOS capability keys added to the test_integration configuration have been applied here, ensuring consistency across all iOS app configurations in the repository.

@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from 2be4e19 to 662dd7e Compare October 17, 2025 12:31
@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from 500c319 to a4544d0 Compare October 24, 2025 07:48
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 24, 2025 07:48 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 24, 2025 07:48 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
test_integration/android/settings.gradle (2)

21-21: Critical: AGP version mismatch between modules.

The Android Gradle Plugin version is set to 8.7.0 here, but android/build.gradle uses 8.12.1. This inconsistency can cause dependency resolution conflicts, build failures, and subtle runtime issues. All Android modules must use the same AGP version.

Apply this diff to align with the main module:

-    id "com.android.application" version "8.7.0" apply false
+    id "com.android.application" version "8.12.1" apply false

Note: The past review comment indicates this was "addressed in commit 500c319", but the code still shows version 8.7.0. Please verify this fix was applied correctly.


23-23: Critical: Incompatible google-services plugin version with AGP 8.x.

The com.google.gms.google-services plugin version 4.3.10 predates AGP 8.x and will cause build crashes due to removed BaseVariant APIs. Google's compatibility documentation requires at least version 4.4.x for AGP 8.x.

Apply this diff to use a compatible version:

-    id "com.google.gms.google-services" version "4.3.10" apply false
+    id "com.google.gms.google-services" version "4.4.2" apply false

Note: The past review comment indicates this was flagged previously but the code still shows 4.3.10.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 0010800 and a4544d0.

📒 Files selected for processing (8)
  • .github/workflows/flutter_integration.yaml (3 hunks)
  • .tool-versions (1 hunks)
  • android/build.gradle (3 hunks)
  • example/android/app/build.gradle (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • test_integration/android/app/build.gradle (2 hunks)
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • test_integration/android/settings.gradle (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • example/android/settings.gradle
  • example/android/app/build.gradle
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: android (29)
  • GitHub Check: android (24)
  • GitHub Check: ios
  • GitHub Check: android
🔇 Additional comments (14)
.github/workflows/flutter_integration.yaml (2)

20-20: LGTM: Flutter version updated consistently.

The Flutter version update to 3.29 aligns with the version specified in .tool-versions and supports the overall Android Gradle upgrade objectives.

Also applies to: 56-56


68-68: Good addition: Explicit APK build before testing.

Adding flutter build apk before flutter drive ensures the APK is built before the driver tests run, which is a more explicit and reliable approach than relying on implicit build triggers.

test_integration/android/app/build.gradle (2)

14-22: LGTM: Java 17 upgrade configured correctly.

The Java 17 language level upgrade is properly configured with:

  • Core library desugaring enabled to support Java 8+ APIs on older Android versions
  • Both sourceCompatibility and targetCompatibility set to Java 17
  • Kotlin jvmTarget aligned to Java 17

These changes are consistent with the broader Android toolchain upgrade.


48-50: LGTM: Desugaring dependency added.

The desugar_jdk_libs:2.0.3 dependency is correctly added to support the coreLibraryDesugaringEnabled flag, allowing the use of modern Java APIs on older Android versions.

test_integration/android/settings.gradle (1)

22-22: LGTM: Kotlin plugin updated to latest version.

The Kotlin Android plugin version 2.2.20 is current and compatible with the AGP 8.x upgrade.

android/build.gradle (8)

2-4: LGTM: SNAPSHOT version with clarifying comments.

The version suffix and comments appropriately indicate this is a development artifact not intended for public distribution.


9-9: Good change: Migrated from deprecated jcenter to mavenCentral.

JCenter has been deprecated and shut down, so this migration to Maven Central is necessary and correct.


31-31: LGTM: firebase-messaging minor version update.

The Firebase Messaging dependency update from 23.0.4 to 23.0.6 is a patch-level update that should be compatible.


38-39: Excellent: Dynamic compileSdkVersion from Flutter.

Using flutter.compileSdkVersion with a fallback to 34 ensures the plugin automatically uses the Flutter SDK's recommended compile SDK version, addressing one of the PR objectives (issue #577 requested compileSdkVersion 36).


47-49: LGTM: Java 17 language level upgrade.

The Java compatibility settings have been correctly updated to Java 17, consistent with modern Android development requirements and the broader toolchain upgrade.


56-56: LGTM: MultiDex enabled for minSdk 19.

Enabling MultiDex is necessary when using Java 8+ language APIs via desugaring on Android versions with minSdk < 21. This is correctly configured.


67-71: Excellent addition: Compiler lint warnings enabled.

Enabling -Xlint:unchecked and -Xlint:deprecation will surface unchecked type conversions and deprecated API usage at compile time, improving code quality and maintainability.


28-28: Upgrade to ably-android 1.4.1 is safe—no breaking changes identified.

The ably-android SDK v1.4.1 contains bug fixes and minor improvements, not breaking changes, making this upgrade from 1.2.40 backward-compatible with no required migration steps.

.tool-versions (1)

1-1: Let me verify CocoaPods 1.15.2 compatibility with Ruby 3.4.5:

Ruby 3.4.5 is compatible with the project's CocoaPods 1.15.2 tooling.

CocoaPods works fine with newer Ruby versions like 3.4.x, confirming that the upgrade from Ruby 3.0.1 to 3.4.5 poses no compatibility issues with CocoaPods 1.15.2, which is used in this project's Podfiles.

@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from a4544d0 to 30249e1 Compare October 27, 2025 10:41
@ttypic ttypic changed the base branch from main to fix-locale-problem October 27, 2025 10:42
@ttypic ttypic changed the title chore: update Android Gradle build to support the newer Flutter SDK [ECO-5566] chore: update Android Gradle build to support the newer Flutter SDK Oct 27, 2025
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 27, 2025 10:42 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 27, 2025 10:42 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/flutter_integration.yaml (1)

9-31: Fix undefined matrix.device reference in iOS job.

The iOS job (line 16) references ${{ matrix.device }} but no matrix strategy is defined for this job. This will cause the workflow to fail with an undefined variable error. The Android job correctly defines a matrix strategy with api-level: [24, 29], but the iOS job has none.

Replace ${{ matrix.device }} with either:

  1. A specific device name (e.g., 'iPhone 14'), or
  2. Add a matrix strategy to the iOS job if multiple device variants are needed
♻️ Duplicate comments (2)
test_integration/android/settings.gradle (2)

21-21: Clarify AGP version alignment across modules.

The Android Gradle Plugin version here is 8.7.0, but android/build.gradle declares AGP 8.12.1. A past review marked this inconsistency as addressed in commit 500c319, yet the current code still shows 8.7.0. Confirm whether:

  • The AGP versions should be aligned to 8.12.1 across both modules, or
  • Test integration is intentionally using a different AGP version.

If alignment is required, update to 8.12.1.


21-23: Google Services plugin version 4.3.10 is incompatible with AGP 8.x and will crash on build.

The com.google.gms.google-services plugin at version 4.3.10 does not support the AGP 8.x variant APIs and will fail with NoSuchMethodError when the settings file loads. Update to a 4.4.x release (e.g., 4.4.2).

Apply this diff:

-    id "com.google.gms.google-services" version "4.3.10" apply false
+    id "com.google.gms.google-services" version "4.4.2" apply false
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a4544d0 and 30249e1.

📒 Files selected for processing (9)
  • .github/workflows/flutter_integration.yaml (3 hunks)
  • .tool-versions (1 hunks)
  • android/build.gradle (3 hunks)
  • android/src/main/java/io/ably/flutter/plugin/StreamsChannel.java (3 hunks)
  • example/android/app/build.gradle (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • test_integration/android/app/build.gradle (2 hunks)
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • test_integration/android/settings.gradle (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • test_integration/android/app/build.gradle
  • example/android/settings.gradle
  • example/android/app/build.gradle
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: ios
  • GitHub Check: android
  • GitHub Check: android (29)
  • GitHub Check: android (24)
  • GitHub Check: ios
🔇 Additional comments (10)
.github/workflows/flutter_integration.yaml (2)

20-20: Flutter version bumps are well-motivated.

Upgrading Flutter from 3.24 to 3.29 in both iOS and Android paths aligns with the PR objective to support the newer Flutter SDK alongside the Java 17 and Gradle 8.12.1 upgrades.

Confirm that Flutter 3.29 is compatible with Java 17 and Gradle 8.12.1, particularly for Android build compatibility.

Also applies to: 56-56


68-68: APK build step improves Android test reliability.

Adding flutter build apk && before flutter drive ensures the APK is built before running integration tests, which is the correct dependency order for Android emulator-based testing.

Also applies to: 68-68

android/src/main/java/io/ably/flutter/plugin/StreamsChannel.java (3)

26-26: LGTM!

The import is necessary for the locale-aware formatting changes below.


161-163: LGTM! Locale-independent logging.

Using Locale.ROOT ensures consistent log formatting across all locales, which is important for debugging and log analysis.


171-174: LGTM! Critical fix for identifier consistency.

Using Locale.ROOT for the stream name ensures locale-independent formatting. This is essential since the name is used as a Flutter message channel identifier, and locale-specific formatting could cause channel resolution failures.

android/build.gradle (4)

31-31: Firebase Cloud Messaging dependency update looks good.

The upgrade from 23.0.4 to 23.0.6 is a patch bump and should maintain API compatibility while bringing bug fixes.


38-48: Dynamic compileSdkVersion fallback and Java 17 compatibility align well with PR objectives.

Using flutter.compileSdkVersion ?: 34 allows flexibility with older Flutter SDK versions while maintaining a sensible default, and setting Java 17 compatibility brings the plugin in line with modern AGP and the broader ecosystem.


56-56: Multidex enabled appropriately for Java 17 and AGP 8.x.

Enabling multiDexEnabled is good practice when targeting modern Java and AGP versions, especially with desugaring enabled. No concerns here.


67-71: Compiler warning flags for unchecked and deprecation align with PR objectives.

The gradle block correctly injects -Xlint:unchecked and -Xlint:deprecation into all JavaCompile tasks, making deprecated/unsafe code visible during builds per the stated PR goal.

.tool-versions (1)

1-1: No compatibility issues identified. Ruby 3.4.5 is compatible with project tooling.

Verification confirms:

  • No Gemfile or managed Ruby dependencies
  • Podfiles have no explicit Ruby version constraints
  • CocoaPods operations are abstracted through Flutter's tooling, not direct system Ruby usage
  • CI workflows don't explicitly manage Ruby versions; they rely on Flutter's abstractions
  • No Fastlane, custom build scripts, or Ruby rake files found

The Ruby version update from 3.0.1 (EOL March 2024) to 3.4.5 is safe and compatible with the existing tooling. While unrelated to the Android Gradle/Java updates mentioned in the PR description, this is a beneficial housekeeping change with no breaking compatibility concerns.

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai This change shouldn't affect older android platforms right

@sacOO7 sacOO7 requested a review from Copilot October 27, 2025 14:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Android Gradle build configuration to support newer Flutter SDK versions (3.29), addressing compatibility issues. The changes primarily focus on upgrading build tooling versions and modernizing Java/Kotlin compilation targets.

  • Upgraded Gradle from 7.5 to 8.10.2/8.12.1 and updated Android Gradle Plugin to 8.7.0/8.12.1
  • Migrated Java compilation from version 1.8 to version 17 across all modules
  • Updated Kotlin plugin to version 2.2.20 and added compiler warning flags

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test_integration/android/settings.gradle Updated Android and Kotlin plugin versions, added Google services plugin
test_integration/android/gradle/wrapper/gradle-wrapper.properties Upgraded Gradle wrapper from 7.5 to 8.10.2
test_integration/android/app/build.gradle Added core library desugaring and updated Java/Kotlin targets to version 17
example/android/settings.gradle Updated Kotlin plugin to version 2.2.20
example/android/app/build.gradle Updated Java/Kotlin compilation targets to version 17
android/build.gradle Updated AGP to 8.12.1, Java targets to 17, Firebase Messaging, and added compiler warnings
.tool-versions Updated Ruby to 3.4.5 and Flutter to 3.29.0
.github/workflows/flutter_integration.yaml Updated Flutter version to 3.29 and added APK build step before tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Base automatically changed from fix-locale-problem to main October 27, 2025 14:34
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 27, 2025 14:36 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 27, 2025 14:36 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (2)
android/build.gradle (2)

13-13: Verify Gradle wrapper version compatibility with AGP 8.12.1.

Per the official Android Gradle Plugin compatibility matrix, AGP 8.12.x requires Gradle 8.13 or higher. Ensure that android/gradle/wrapper/gradle-wrapper.properties has been updated to use Gradle 8.13+ in its distributionUrl property. This file shows only the AGP version; the wrapper version is managed separately. If the wrapper has not been updated, the build will fail due to version incompatibility.

Please confirm the Gradle wrapper has been updated by running:

#!/bin/bash
cat android/gradle/wrapper/gradle-wrapper.properties | grep distributionUrl

46-49: Add coreLibraryDesugaringEnabled = true to compileOptions.

The compileOptions block sets sourceCompatibility and targetCompatibility to Java 17, and line 34 declares a dependency on desugar_jdk_libs:1.1.5. With minSdkVersion at 19, the desugaring library must be explicitly enabled in compileOptions, otherwise Java 17 standard library APIs will not work on older Android devices. The flag is missing and should be added.

Apply this diff:

 compileOptions {
     sourceCompatibility = JavaVersion.VERSION_17
     targetCompatibility = JavaVersion.VERSION_17
+    coreLibraryDesugaringEnabled = true
 }
🧹 Nitpick comments (1)
android/build.gradle (1)

38-38: Fix comment grammar.

The comment should use plural to agree with "Older versions": "don't provide" instead of "doesn't provide".

Apply this diff:

-    // Older versions of the Flutter SDK doesn't provide `compileSdkVersion`, so it defaults to 34
+    // Older versions of the Flutter SDK don't provide `compileSdkVersion`, so it defaults to 34
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 30249e1 and fe2893b.

📒 Files selected for processing (1)
  • android/build.gradle (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: android
  • GitHub Check: ios
  • GitHub Check: android (24)
  • GitHub Check: ios
  • GitHub Check: android (29)
🔇 Additional comments (1)
android/build.gradle (1)

67-71: Compiler flags addition looks good.

The gradle.projectsEvaluated block correctly adds unchecked and deprecation warnings to Java compilation, which aligns with the PR objective to add compiler flags and supports better visibility into potential issues when targeting Java 17.

- Upgraded Gradle to 8.12.1
- Changed compile and target compatibility to Java 17
- Set `compileSdkVersion` to use Flutter's value.
- Added compiler flags for unchecked and deprecation warnings.
@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from fe2893b to 2a3d17b Compare October 27, 2025 15:04
@github-actions github-actions bot temporarily deployed to staging/pull/579/dartdoc October 27, 2025 15:04 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/579/features October 27, 2025 15:05 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between fe2893b and 2a3d17b.

📒 Files selected for processing (8)
  • .github/workflows/flutter_integration.yaml (2 hunks)
  • .tool-versions (1 hunks)
  • android/build.gradle (2 hunks)
  • example/android/app/build.gradle (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • test_integration/android/app/build.gradle (2 hunks)
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • test_integration/android/settings.gradle (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
  • .github/workflows/flutter_integration.yaml
  • test_integration/android/gradle/wrapper/gradle-wrapper.properties
  • example/android/app/build.gradle
  • test_integration/android/settings.gradle
  • test_integration/android/app/build.gradle
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: android (29)
  • GitHub Check: ios
  • GitHub Check: android (24)
  • GitHub Check: ios
🔇 Additional comments (5)
example/android/settings.gradle (1)

22-22: LGTM! Kotlin plugin upgrade is valid.

The upgrade to Kotlin 2.2.20 is appropriate and aligns with the broader Android tooling modernization in this PR. Based on learnings, this version is published and compatible.

android/build.gradle (3)

2-4: LGTM! Clear documentation of snapshot versioning.

The added comments clarify that this build.gradle is used by Flutter itself and that artifacts are not intended for external distribution. The snapshot suffix follows Gradle conventions.


31-31: LGTM! Firebase messaging dependency updated.

The upgrade from 23.0.4 to 23.0.6 aligns with the PR objective to update outdated Android dependencies. This is a patch version update that likely includes bug fixes and security improvements.


57-61: LGTM! Compiler warnings enabled as intended.

The addition of -Xlint:unchecked and -Xlint:deprecation flags aligns with the PR objectives and follows best practices for catching potential issues at compile time. The implementation using gradle.projectsEvaluated ensures these flags are applied after all projects are configured.

.tool-versions (1)

1-1: I'll verify Ruby 3.4.5 availability and search for other dependency manifests in the codebase.

Now let me search for alternative dependency files to confirm whether the project has Ruby dependencies:

Based on my verification:

  1. Ruby 3.4.5 was released in July 2025
  2. Since upstream paid great attention to source compatibility, no changes to code are needed for Ruby 3.4
  3. The script execution found no Gemfile in the repository, meaning this project has no explicit Ruby gem dependencies to verify

The .tool-versions file is used by the asdf version manager to specify which Ruby version to use in development—it is not a dependency manifest. The original review comment assumes the presence of gem dependencies that don't exist in this codebase.

No action required—Ruby 3.4.5 is published and available. Since the project contains no Gemfile or gem dependencies, there are no compatibility constraints to verify.

we never used any API that needs desugaring, like streams, `java.time.*`, etc.

No need to overcomplicate things for end users.
Copy link
Collaborator

@sacOO7 sacOO7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ttypic ttypic force-pushed the ECO-5566/gradle-upgrade branch from 2a3d17b to 1566840 Compare October 27, 2025 15:26
@ttypic ttypic merged commit 46d07f0 into main Oct 27, 2025
9 checks passed
@ttypic ttypic deleted the ECO-5566/gradle-upgrade branch October 27, 2025 15:59
@ttypic ttypic mentioned this pull request Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Update android compileSdk version and native dependencies

3 participants