Skip to content

Release 2.0.6 #162

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

Merged
merged 2 commits into from
May 7, 2025
Merged

Release 2.0.6 #162

merged 2 commits into from
May 7, 2025

Conversation

prateek-kommunicate
Copy link

@prateek-kommunicate prateek-kommunicate commented May 6, 2025

Summary by CodeRabbit

  • New Features

    • Migrated Android dependencies to use Kommunicate SDK packages instead of Applozic packages.
    • Updated Android Gradle plugin and Kommunicate UI SDK to newer versions for improved compatibility.
  • Chores

    • Bumped package version to 2.0.6.
    • Added a Gradle wrapper properties file for consistent Android build configuration.
    • Updated changelog to reflect the latest release.

Copy link

coderabbitai bot commented May 6, 2025

Walkthrough

This update migrates Android dependencies from the com.applozic namespace to the io.kommunicate namespace, updates the Android Gradle plugin and Kommunicate UI SDK versions, adds a Gradle wrapper properties file, and increments the package version to 2.0.6. No changes to public APIs or exported entities were made.

Changes

File(s) Change Summary
CHANGELOG.md, pubspec.yaml Added version 2.0.6 to changelog; incremented package version to 2.0.6 in pubspec.yaml.
android/build.gradle Updated Android Gradle plugin from 4.1.3 to 7.4.2; upgraded Kommunicate UI SDK from 2.13.3 to 2.14.0.
android/gradle/wrapper/gradle-wrapper.properties Added Gradle wrapper properties file specifying Gradle 7.5.1 distribution and related settings.
android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmEventListener.java Migrated imports and usages from com.applozic to io.kommunicate namespaces; updated event manager references.
android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmMethodHandler.java Migrated imports and usages from com.applozic to io.kommunicate namespaces; updated user update and settings methods.
example/android/app/src/main/java/io/pushnotification/KmFirebaseMessagingService.java Updated import of Utils class from com.applozic to io.kommunicate namespace.

Sequence Diagram(s)

sequenceDiagram
    participant FlutterApp
    participant KmMethodHandler
    participant KommunicateSDK (io.kommunicate)
    participant EventManager

    FlutterApp->>KmMethodHandler: Invoke method (e.g., updateUserDetail)
    KmMethodHandler->>KommunicateSDK (io.kommunicate): Call UserUpdateTask/SettingsSharedPreference
    KommunicateSDK (io.kommunicate)-->>KmMethodHandler: ResultCallback (onSuccess/onError)
    KmMethodHandler-->>FlutterApp: Return result
    Note over KmEventListener, EventManager: Event registration/unregistration now uses EventManager from io.kommunicate
Loading

Possibly related PRs

  • Release 1.9.9 #146: Updates Android Gradle plugin and Kommunicate UI SDK dependencies and migrates imports from com.applozic to io.kommunicate.devkit, similar to this PR but with different version updates.

Suggested reviewers

  • prateek-kommunicate

Poem

🐰✨
A hop to Kommunicate, away from Applozic’s den,
Gradle grows, dependencies flow,
Version bumps, the changelog glows.
With wrappers neat and imports new,
This bunny’s code is fresh as dew!
Onward to 2.0.6 we go!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between 7f0e5af and 5e63992.

⛔ Files ignored due to path filters (1)
  • example/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmEventListener.java (1 hunks)
  • example/android/app/src/main/java/io/pushnotification/KmFirebaseMessagingService.java (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • example/android/app/src/main/java/io/pushnotification/KmFirebaseMessagingService.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmEventListener.java

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
🪧 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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

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

🧹 Nitpick comments (2)
android/gradle/wrapper/gradle-wrapper.properties (1)

1-7: Consider Adding a Distribution SHA-256 Checksum
For enhanced security and to verify the integrity of the downloaded Gradle distribution, you can add the distributionSha256Sum property.

After generating the checksum, add for example:

distributionSha256Sum=<insert SHA-256 checksum here>
CHANGELOG.md (1)

1-3: Typo in Changelog Entry
"mitration" should be "migration" and the entry could be clearer about the namespace switch.

- ## 2.0.6
- ### Android
- - Update android dependency with applozic mitration code.
+ ## 2.0.6
+ ### Android
+ - Migrate Android dependencies from `com.applozic.*` to `io.kommunicate.*`.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6794f04 and 7f0e5af.

📒 Files selected for processing (6)
  • CHANGELOG.md (1 hunks)
  • android/build.gradle (2 hunks)
  • android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmEventListener.java (1 hunks)
  • android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmMethodHandler.java (3 hunks)
  • pubspec.yaml (1 hunks)
🔇 Additional comments (7)
android/gradle/wrapper/gradle-wrapper.properties (1)

1-7: Gradle Wrapper Configuration is Properly Added
The wrapper is pinned to Gradle 7.5.1, aligning with the updated Android Gradle plugin version.

pubspec.yaml (1)

3-3: Version Bump Looks Good
The package version is correctly incremented to 2.0.6 to match the Android updates in this release.

android/build.gradle (2)

11-11: Updated Android Gradle Plugin Version
Upgrading to 7.4.2 aligns with the new Gradle wrapper (7.5.1). Ensure the wrapper files are committed and CI uses the wrapper.


42-43: Bump Kommunicate UI SDK Dependency
The kommunicateui SDK is updated to 2.14.0, matching the PR objectives. Verify that this version is available in the configured Maven repository.

android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmMethodHandler.java (3)

24-36: Import paths successfully migrated from com.applozic to io.kommunicate.

The import statements have been properly updated to use the new io.kommunicate namespace instead of the previous com.applozic namespace. This change is part of the Android dependency migration described in the PR.


392-402: User update task and callback implementation successfully migrated.

The user update task has been correctly migrated from the old AlUserUpdateTask to the new UserUpdateTask class. The callback implementation has also been updated to use ResultCallback with the appropriate method name change from onFailure to onError.


476-476: Settings access method successfully migrated.

The method to hide chat list on notification has been properly updated from ApplozicClient to SettingsSharedPreference, maintaining the same functionality while using the new namespace.

Comment on lines 22 to 24
public void unregister() {
AlEventManager.getInstance().unregisterPluginEventListener();
EventManager.getInstance().unregisterPluginEventListener();
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Incomplete Unregister Implementation
unregister() only unregisters the plugin event listener. To avoid listener leaks:

  1. Pass this to unregisterPluginEventListener(this) if required by the API.
  2. Also call unregisterConversationInfoListener(this).
 public void unregister() {
-    EventManager.getInstance().unregisterPluginEventListener();
+    EventManager.getInstance().unregisterPluginEventListener(this);
+    EventManager.getInstance().unregisterConversationInfoListener(this);
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public void unregister() {
AlEventManager.getInstance().unregisterPluginEventListener();
EventManager.getInstance().unregisterPluginEventListener();
}
public void unregister() {
EventManager.getInstance().unregisterPluginEventListener(this);
EventManager.getInstance().unregisterConversationInfoListener(this);
}

Comment on lines 1 to 8
package io.kommunicate.kommunicate_flutter_plugin;

import com.applozic.mobicomkit.broadcast.AlEventManager;
import io.kommunicate.callbacks.KmPluginEventListener;
import com.applozic.mobicomkit.api.conversation.Message;
import io.flutter.plugin.common.MethodChannel;
import com.applozic.mobicommons.json.GsonUtils;
import io.kommunicate.commons.json.GsonUtils;
import io.kommunicate.devkit.api.conversation.Message;
import io.kommunicate.devkit.broadcast.EventManager;

Copy link

@coderabbitai coderabbitai bot May 6, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue

Missing Import for KmConversationInfoListener
The class implements KmConversationInfoListener but the import is absent, causing a compile error.

Add this line among the imports:

+ import io.kommunicate.callbacks.KmConversationInfoListener;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
package io.kommunicate.kommunicate_flutter_plugin;
import com.applozic.mobicomkit.broadcast.AlEventManager;
import io.kommunicate.callbacks.KmPluginEventListener;
import com.applozic.mobicomkit.api.conversation.Message;
import io.flutter.plugin.common.MethodChannel;
import com.applozic.mobicommons.json.GsonUtils;
import io.kommunicate.commons.json.GsonUtils;
import io.kommunicate.devkit.api.conversation.Message;
import io.kommunicate.devkit.broadcast.EventManager;
package io.kommunicate.kommunicate_flutter_plugin;
import io.kommunicate.callbacks.KmPluginEventListener;
import io.kommunicate.callbacks.KmConversationInfoListener;
import io.flutter.plugin.common.MethodChannel;
import io.kommunicate.commons.json.GsonUtils;
import io.kommunicate.devkit.api.conversation.Message;
import io.kommunicate.devkit.broadcast.EventManager;

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed

Copy link

Choose a reason for hiding this comment

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

@AbhijeetRanjan308 Great! I can see that you've added the import for KmConversationInfoListener from the io.kommunicate.devkit.listners package, which aligns properly with the other devkit imports in this migration. The issue is resolved.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@AbhijeetRanjan308 AbhijeetRanjan308 merged commit 9d583f3 into master May 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants