Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECO-5222] fix: Flutter 3.29 compatibility changes #563

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

ttypic
Copy link
Contributor

@ttypic ttypic commented Feb 19, 2025

  • specified the latest Flutter version in .tool-versions
  • updated example's app gradle settings and dependencies to support 3.29
  • removed io.flutter.plugin.common.PluginRegistry.Registrar import

Summary by CodeRabbit

  • New Features

    • Added support for Flutter v3.29.0.
    • Enhanced Android build configurations to integrate Google services and enable modern Java features.
    • Upgraded key Android plugin versions to boost compatibility and feature sets.
  • Chores

    • Upgraded the Gradle wrapper to v8.10.2 and removed outdated settings.
    • Streamlined build scripts by cleaning up unused variables and comments.
    • Updated dependency versions to improve overall stability and performance.
    • Added .cxx to .gitignore to exclude Android NDK-related files.
    • Added ProGuard rule to suppress warnings for specific Firebase messaging classes.

@ttypic ttypic requested a review from umair-ably February 19, 2025 12:28
Copy link

coderabbitai bot commented Feb 19, 2025

Walkthrough

The pull request introduces several updates across configuration and build files in the project. It adds a new entry for Flutter version 3.29.0 in the .tool-versions file and upgrades the Gradle distribution URLs to version 8.10.2 while removing the obsolete networkTimeout property. Additionally, the changes include refinements in shell scripts, updates to dependencies in build files, the removal of an unused Java import, and adjustments to ignore rules. The modifications primarily focus on updating tool versions and enhancing build configurations without altering core functionality.

Changes

File(s) Change Summary
.tool-versions Added new entry: flutter 3.29.0 alongside the existing Ruby version.
android/gradle/wrapper/gradle-wrapper.properties, example/android/gradle/wrapper/gradle-wrapper.properties Updated distributionUrl from Gradle 7.5 to 8.10.2; removed networkTimeout property.
android/gradlew, android/gradlew.bat In gradlew: Added variable APP_NAME="Gradle", uncommented APP_BASE_NAME assignment, updated a URL comment, and removed unused comments. In gradlew.bat: Removed an unused comment line.
android/src/main/java/io/ably/flutter/plugin/AblyFlutter.java Removed the unused import for PluginRegistry.Registrar.
example/.gitignore Added a new entry (.cxx) under the "#Android NDK" section.
example/android/app/build.gradle Added Google Services Gradle plugin, enabled core library desugaring, and introduced the corresponding desugaring dependency.
example/android/settings.gradle Updated plugin versions for com.android.application (7.4.0 → 8.7.0) and org.jetbrains.kotlin.android (1.7.10 → 1.8.22); added com.google.gms.google-services plugin (version 4.3.10).
example/pubspec.yaml Upgraded the fluttertoast dependency version from ^8.2.8 to ^8.2.12.
example/android/app/proguard-rules.pro Added ProGuard rule to suppress warnings for com.google.firebase.messaging.TopicOperation$TopicOperations.

Suggested reviewers

  • umair-ably
  • sacOO7

Poem

I'm a rabbit hopping through these files with glee,
Nibbling Flutter updates and Gradle upgrades merrily.
I skip through scripts and configs in delight,
Leaving behind old imports out of sight.
Code carrots crunch as I celebrate these tweaks—
May our build be swift and our bugs be meek!
Hop on, dear coder, and enjoy this easter egg treat!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot temporarily deployed to staging/pull/563/features February 19, 2025 12:29 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/563/dartdoc February 19, 2025 12:29 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

📥 Commits

Reviewing files that changed from the base of the PR and between ccdd598 and b9d10d9.

⛔ Files ignored due to path filters (3)
  • android/gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
  • example/pubspec.lock is excluded by !**/*.lock
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (10)
  • .tool-versions (1 hunks)
  • android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • android/gradlew (2 hunks)
  • android/gradlew.bat (0 hunks)
  • android/src/main/java/io/ably/flutter/plugin/AblyFlutter.java (0 hunks)
  • example/.gitignore (1 hunks)
  • example/android/app/build.gradle (3 hunks)
  • example/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • example/pubspec.yaml (1 hunks)
💤 Files with no reviewable changes (2)
  • android/src/main/java/io/ably/flutter/plugin/AblyFlutter.java
  • android/gradlew.bat
✅ Files skipped from review due to trivial changes (2)
  • .tool-versions
  • example/pubspec.yaml
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: android (29)
  • GitHub Check: ios
  • GitHub Check: android (24)
  • GitHub Check: ios (iPhone 15)
  • GitHub Check: android
🔇 Additional comments (8)
android/gradlew (1)

58-58: LGTM! Script updates align with latest Gradle wrapper template.

The changes update the source URL to the master branch and properly initialize the APP_NAME and APP_BASE_NAME variables.

Also applies to: 85-86

android/gradle/wrapper/gradle-wrapper.properties (1)

3-3: LGTM! Consistent Gradle version across project.

The Gradle version update to 8.10.2 maintains consistency with the example project.

example/.gitignore (1)

36-37: LGTM! Added standard NDK build artifacts to gitignore.

The addition of .cxx to gitignore is appropriate as it contains NDK build artifacts that should not be version controlled.

example/android/settings.gradle (2)

21-23: Upgrade Android & Kotlin Plugins and Add Google Services Plugin

The updated versions—com.android.application to 8.7.0 and org.jetbrains.kotlin.android to 1.8.22—ensure compatibility with Flutter 3.29. Additionally, adding the com.google.gms.google-services plugin (version 4.3.10) aligns with the new service integrations. Verify that any corresponding configurations in the app-level Gradle files are consistent with these plugin updates.


26-26: Confirm Module Inclusion

The explicit inclusion of the :app module is correct and maintains the intended project structure.

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

6-6: Add Google Services Plugin in App Configuration

Integrating the com.google.gms.google-services plugin here is essential for configuring Google services (e.g., Firebase) within the application. Ensure that this plugin is applied in the correct order relative to other Gradle plugins.


15-16: Enable Core Library Desugaring

The addition of coreLibraryDesugaringEnabled true in the compileOptions block allows the use of newer Java language features on older Android versions. Please verify that this setting satisfies the project's Java compatibility requirements.


50-50: Include Core Library Desugaring Dependency

Adding the dependency coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3' ensures that desugaring support is available during compilation, enabling modern Java APIs on legacy devices. Confirm that this version works seamlessly with the upgraded Android Gradle Plugin.

@ttypic ttypic force-pushed the ECO-5222/fix-futter-329 branch from b9d10d9 to df61227 Compare February 19, 2025 12:39
@github-actions github-actions bot temporarily deployed to staging/pull/563/dartdoc February 19, 2025 12:40 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/563/features February 19, 2025 12: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: 0

🧹 Nitpick comments (1)
.github/workflows/flutter_example_app.yaml (1)

35-36: Ensure Consistent Flutter Version Across Platforms

The Android job’s Flutter version has been updated to "3.29" as expected for Flutter 3.29 compatibility. However, note that the iOS job still uses "3.24". Please confirm if this difference is intentional or whether the iOS job should be updated as well for consistency across your CI environments.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9d10d9 and df61227.

⛔ Files ignored due to path filters (3)
  • android/gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
  • example/pubspec.lock is excluded by !**/*.lock
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • .github/workflows/flutter_example_app.yaml (1 hunks)
  • .tool-versions (1 hunks)
  • android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • android/gradlew (2 hunks)
  • android/gradlew.bat (0 hunks)
  • android/src/main/java/io/ably/flutter/plugin/AblyFlutter.java (0 hunks)
  • example/.gitignore (1 hunks)
  • example/android/app/build.gradle (3 hunks)
  • example/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • example/pubspec.yaml (1 hunks)
💤 Files with no reviewable changes (2)
  • android/src/main/java/io/ably/flutter/plugin/AblyFlutter.java
  • android/gradlew.bat
🚧 Files skipped from review as they are similar to previous changes (8)
  • example/pubspec.yaml
  • example/.gitignore
  • android/gradle/wrapper/gradle-wrapper.properties
  • .tool-versions
  • android/gradlew
  • example/android/gradle/wrapper/gradle-wrapper.properties
  • example/android/app/build.gradle
  • example/android/settings.gradle
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: android (29)
  • GitHub Check: android (24)
  • GitHub Check: ios
  • GitHub Check: android
  • GitHub Check: ios (iPhone 15)

- specified the latest Flutter version in `.tool-versions`
- updated example's app gradle settings and dependencies to support 3.29
- removed `io.flutter.plugin.common.PluginRegistry.Registrar` import
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

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

41-44: Release Build ProGuard Configuration

Defining the ProGuard files in the release build type is a strong approach for code optimization and obfuscation. One note: the trailing comma after "proguard-rules.pro" may not be necessary in the Gradle DSL and could potentially lead to syntax warnings in some configurations. Consider verifying and removing it if needed.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df61227 and 5ce0e09.

⛔ Files ignored due to path filters (3)
  • android/gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
  • example/pubspec.lock is excluded by !**/*.lock
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • .github/workflows/flutter_example_app.yaml (1 hunks)
  • .tool-versions (1 hunks)
  • android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • android/gradlew (2 hunks)
  • android/gradlew.bat (0 hunks)
  • android/src/main/java/io/ably/flutter/plugin/AblyFlutter.java (0 hunks)
  • example/.gitignore (1 hunks)
  • example/android/app/build.gradle (4 hunks)
  • example/android/app/proguard-rules.pro (1 hunks)
  • example/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • example/pubspec.yaml (1 hunks)
💤 Files with no reviewable changes (2)
  • android/gradlew.bat
  • android/src/main/java/io/ably/flutter/plugin/AblyFlutter.java
✅ Files skipped from review due to trivial changes (1)
  • example/android/app/proguard-rules.pro
🚧 Files skipped from review as they are similar to previous changes (8)
  • .tool-versions
  • example/.gitignore
  • example/pubspec.yaml
  • example/android/gradle/wrapper/gradle-wrapper.properties
  • .github/workflows/flutter_example_app.yaml
  • android/gradle/wrapper/gradle-wrapper.properties
  • android/gradlew
  • example/android/settings.gradle
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: android (29)
  • GitHub Check: android (24)
  • GitHub Check: ios
  • GitHub Check: android
  • GitHub Check: ios (iPhone 15)
🔇 Additional comments (3)
example/android/app/build.gradle (3)

6-6: Google Services Plugin Added

The addition of id "com.google.gms.google-services" is appropriate for enabling Google services integrations. Ensure that any associated configuration (e.g., in the settings.gradle file) remains consistent with this plugin.


15-16: Enabling Core Library Desugaring

Enabling desugaring with coreLibraryDesugaringEnabled true under compileOptions is a suitable update. This allows the project to use newer Java language features on older Android versions. Verify that any related configurations (like the added dependency) align correctly.


53-54: Core Library Desugaring Dependency Addition

The inclusion of coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3' ensures that the desugaring feature is supported by pulling in the proper libraries. Confirm that version 2.0.3 meets your compatibility requirements across the project.

@ttypic ttypic merged commit 89cb740 into main Feb 19, 2025
9 checks passed
@ttypic ttypic deleted the ECO-5222/fix-futter-329 branch February 19, 2025 14:38
@coderabbitai coderabbitai bot mentioned this pull request Feb 19, 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.

2 participants