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

Release 3.2.0 #298

Merged
merged 8 commits into from
Mar 3, 2025
Merged

Release 3.2.0 #298

merged 8 commits into from
Mar 3, 2025

Conversation

Anush-Shand
Copy link
Contributor

@Anush-Shand Anush-Shand commented Mar 3, 2025

Summary by CodeRabbit

  • Chores

    • Upgraded the SDK to version 3.2.0 with corresponding dependency and build configuration updates.
    • Updated Android settings with new compile and target versions to ensure compatibility with Android 15 and optimize build performance.
  • New Features

    • Enhanced data security by improving the encryption approach for sensitive information.
    • Introduced a configurable option to control background task execution for refined performance management.

Anush-Shand and others added 8 commits February 18, 2025 18:24
- Adds support for core android v7.2.2
- Updates changelog and versions
- Upgrades AGP to 8.6.0 as recommended for Android 15
- Fixes gradle deprecation warnings
- Addresses comments by coderabbit
- Comments out workmanager
- targetSDKVersion = 35
Copy link

coderabbitai bot commented Mar 3, 2025

Walkthrough

The pull request updates the SDK from version 3.1.0 to 3.2.0 across multiple files. Version numbers have been incremented in documentation and configuration files, and changelog notes expanded to detail Android enhancements. Changes include updated dependency versions (e.g., CleverTap Android SDK from 7.1.2 to 7.2.2), adjustments to Gradle settings and SDK versions, and a new conditional control for background task execution via WorkManager.

Changes

Files Change Summary
CHANGELOG.md, README.md, ios/clevertap_plugin.podspec, pubspec.yaml, lib/clevertap_plugin.dart Updated version numbers (3.1.0 → 3.2.0), added downgrade warning and updated dependency/version constants.
android/build.gradle, example/.../app/build.gradle, example/.../gradle.properties, example/.../gradle-wrapper.properties, example/.../settings.gradle Upgraded project configuration: updated Gradle plugin versions, compile/target SDK levels, build features, and dependency versions.
example/lib/main.dart Added new boolean variable testWithWorkManager to conditionally control background task execution using WorkManager.

Sequence Diagram(s)

sequenceDiagram
    participant Main
    participant WorkManager
    Note over Main: App Initialization
    Main->>Main: Check "testWithWorkManager" flag
    alt Flag is true
        Main->>WorkManager: Initialize WorkManager
        WorkManager-->>Main: Execute background tasks
    else Flag is false
        Main-->>WorkManager: Skip initialization
    end
Loading

Possibly related PRs

Suggested reviewers

  • piyush-kukadiya
  • nishant-clevertap
  • CTLalit

Poem

In my burrow of code I hop with glee,
Version numbers rise as clear as can be.
WorkManager sleeps until the flag says "go",
Gradle and SDKs now all in a row.
Bugs scurry away as changes unfurl,
A happy rabbit sings—a code bunny whirl!
🐰💻✨


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.
  • @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.

@Anush-Shand
Copy link
Contributor Author

@coderabbitai review

Copy link

coderabbitai bot commented Mar 3, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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)
CHANGELOG.md (1)

3-15: Comprehensive Release Notes for Version 3.2.0
The new release entry for version 3.2.0 is well-documented. It clearly outlines the Android platform enhancements, including:

  • Support for CleverTap Android SDK v7.2.2.
  • Android 15 compliance improvements.
  • Enhanced encryption methods via AndroidKeyStore.
  • An updated minimum SDK requirement and upgraded Android Gradle Plugin.

For improved consistency with Markdown linting rules, consider using a uniform ATX heading style (e.g., using ###) for version titles and section headings instead of setext styling.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3-3: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


8-8: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c2c5e61 and 7ab631e.

📒 Files selected for processing (11)
  • CHANGELOG.md (1 hunks)
  • README.md (1 hunks)
  • android/build.gradle (4 hunks)
  • example/android/app/build.gradle (1 hunks)
  • example/android/gradle.properties (1 hunks)
  • example/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • example/android/settings.gradle (1 hunks)
  • example/lib/main.dart (3 hunks)
  • ios/clevertap_plugin.podspec (1 hunks)
  • lib/clevertap_plugin.dart (1 hunks)
  • pubspec.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • pubspec.yaml
  • README.md
  • lib/clevertap_plugin.dart
  • ios/clevertap_plugin.podspec
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md

3-3: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)


8-8: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


17-17: Heading style
Expected: atx; Actual: setext

(MD003, heading-style)

🔇 Additional comments (16)
example/android/app/build.gradle (1)

30-30:

✅ Verification successful

Hardcoded targetSdkVersion is appropriate for Android 15 compatibility

The change from using flutter.targetSdkVersion to a hardcoded value of 35 aligns with the PR's objective to update for Android 15 compatibility. This ensures the app works with the latest Android version regardless of Flutter's default target.


🏁 Script executed:

#!/bin/bash
# Verify that the compileSdkVersion in the project-level build.gradle also supports Android 15

echo "Checking project-level build.gradle for updated compileSdk version..."
grep -r "compileSdk" --include="build.gradle" android/

Length of output: 242


Confirmed: Android 15 Compatibility Update Validated

The hardcoded targetSdkVersion of 35 in example/android/app/build.gradle is consistent with the compileSdk setting in the project-level android/build.gradle (which is also 35). This alignment ensures that the changes effectively support Android 15, and no further modifications are needed.

example/android/gradle/wrapper/gradle-wrapper.properties (3)

1-1: Updated timestamp reflects current project state

The updated timestamp (Feb 2025) aligns with the timing of the SDK update to version 3.2.0.


6-6: Repositioned line without content change

The zipStorePath line has been moved but maintains the same value. This is just a formatting change with no functional impact.


4-4:

✅ Verification successful

Gradle updated to latest stable version

Upgrading from Gradle 8.4-all to 8.7-bin is a good update that provides:

  1. Newer Gradle features and bugfixes
  2. A smaller distribution size by using the 'bin' variant instead of 'all'

Note that the 'bin' distribution excludes documentation and source code, but reduces download size significantly.


🌐 Web query:

What's new in Gradle 8.7 compared to 8.4?

💡 Result:

Gradle 8.7 introduces several significant improvements over 8.4, focusing on performance, Java compatibility, and build authoring enhancements. Here's a breakdown of key changes:

Java Support

  • Added Java 22 support for compiling/testing JVM projects via toolchains ([2][4][9])
  • Note: Gradle itself still can't run on Java 22 due to Groovy limitations ([2])

Build Performance

  • Groovy build script caching now uses remote build cache, avoiding recompilation ([2][9])
    • Matches Kotlin DSL's existing cache support
    • Reduces initial build times significantly
  • Configuration phase optimizations for large projects ([4])

API Improvements

  • New lazy collection methods for clearer configuration:
    • append()/appendAll() replace add() ([2][9])
    • insert()/insertAll() replace put() for maps
  • Enhanced DependencyConstraint API with new methods ([1])

Error Handling

  • Improved problem reporting with deduplication in HTML reports ([1])
  • More actionable warnings for:
    • Artifact transform ambiguities ([1])
    • Dependency version conflicts ([9])
  • Simplified suppression of metadata validation errors ([2])

Compatibility & Tooling

  • Android compatibility: Requires Gradle 8.9+ for AGP 8.7 ([5])
  • Kotlin support: Full compatibility planned for Kotlin 2.0.20 ([10])
  • Alpine Linux support for file-system watching ([1])

Deprecations & Breaking Changes

  • Legacy collection methods (add()/put()) marked for replacement ([2][9])
  • Security fixes for vulnerabilities present in 8.4 dependencies ([3][4])

Upgrade considerations: While 8.4 focused on Java 21 support and Kotlin DSL stabilization, 8.7 emphasizes build performance optimizations and clearer APIs. Projects using Groovy build scripts or requiring Java 22 compatibility benefit most from upgrading.

Citations:


Gradle Wrapper Upgrade Verified – No Further Changes Required

The update from Gradle 8.4-all to 8.7-bin is confirmed as a solid improvement. Gradle 8.7 provides several benefits, including performance optimizations (like improved Groovy script caching), Java 22 support for compilation/testing via toolchains, and various API improvements—all while reducing download size by using the 'bin' distribution. The updated file correctly points to:

distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip

No further modifications are needed at this time.

example/lib/main.dart (4)

21-21: Added control flag for WorkManager integration

Added a new Boolean flag that will control the background task execution, which is good for testing purposes.


32-41: Background task execution now conditionally enabled

The WorkManager callback is now controlled by the testWithWorkManager flag. Since it's set to false by default, background tasks won't execute unless explicitly enabled. This is a good change for controlling when background tasks should run, especially in testing scenarios.


60-60: WorkManager initialization conditionally enabled

The WorkManager initialization is now conditionally controlled by the same flag, ensuring consistency with the callback implementation.


66-66: Task registration updated to align with conditional flow

The task registration is now also part of the conditional code path, which is correct and maintains consistency.

example/android/gradle.properties (1)

1-1:

✅ Verification successful

JVM arguments updated for modern Java compatibility

The -XX:MaxPermSize=512m parameter has been removed from JVM arguments, which is appropriate since this parameter is deprecated in modern Java versions.

The updated memory allocation (-Xmx3g) provides sufficient heap space for building larger Android projects.


🌐 Web query:

Is -XX:MaxPermSize still relevant in modern Java versions?

💡 Result:

The -XX:MaxPermSize JVM parameter is no longer relevant in modern Java versions (JDK 8 and later). Here's why:

Key Changes

  1. PermGen Removal
    Java 8 replaced the Permanent Generation (PermGen) memory space with Metaspace[6][9]. This eliminated:

    • OutOfMemoryError: PermGen space issues
    • Manual tuning of PermGen size via -XX:MaxPermSize
  2. Metaspace Characteristics

    • Automatically grows using native memory (not Java heap)
    • Garbage-collected metadata (class definitions, method data)
    • Optional size limit using -XX:MaxMetaspaceSize instead[6][9]

Modern Alternatives

Use Case Old Parameter (≤JDK7) New Parameter (≥JDK8)
Class metadata limit -XX:MaxPermSize=256m -XX:MaxMetaspaceSize=256m
Container memory management N/A -XX:MaxRAMPercentage=75[4]
Heap configuration -Xmx/-Xms Still used alongside Metaspace params[2][3]

Why This Matters

  • Containerization: Modern Java better handles memory in constrained environments through automatic scaling[4]
  • Performance: Metaspace reduces memory leaks and manual tuning needs[6][7]
  • Security: Dynamic metadata management improves stability[1][7]

If you encounter PermGen-related parameters in legacy systems, it strongly indicates the need to:

  1. Upgrade to Java 8+
  2. Remove obsolete PermGen flags
  3. Use Metaspace parameters if metadata limits are required[6][9]

Java's evolution through projects like Valhalla and ongoing JVM improvements continue to enhance memory management without requiring deprecated configurations[1][5].

Citations:


Final Verification: JVM arguments are updated correctly

  • The removal of -XX:MaxPermSize is appropriate, as it is deprecated in modern Java (JDK 8+).
  • The updated properties in example/android/gradle.properties now include only the relevant JVM flags (-Xmx3g, -XX:+HeapDumpOnOutOfMemoryError, and -Dfile.encoding=UTF-8).
example/android/settings.gradle (2)

21-21: Plugin Version Update for Android Application
The version for com.android.application has been updated to "8.6.1", which aligns with the overall project upgrade and ensures compatibility with the updated Gradle configurations.


23-23: Refactored Plugin Declaration Syntax for Kotlin
The org.jetbrains.kotlin.android plugin declaration now uses the chained syntax (id(...).version(...).apply(false)), which improves clarity and enforces consistency with modern Gradle conventions.

android/build.gradle (5)

2-2: Project Version Bump to 3.2.0
The project version has been updated to '3.2.0', ensuring consistency across the release documentation and project configurations.


11-14: Updated Android Gradle Plugin Dependency
The Gradle plugin dependency for "com.android.tools.build:gradle" is updated to "8.6.1", which is in line with the changes made in the settings and supports Android 15 compliance.


38-40: Enabled buildConfig in Build Features
The addition of the buildFeatures { buildConfig = true } block facilitates the use of BuildConfig constants at runtime. This change is beneficial if your app depends on compile-time constants generated in BuildConfig.


46-47: Updated compileSdk Version to 35
Raising the compileSdk from 34 to 35 ensures compatibility with the latest Android API features and improvements.


62-68: CleverTap Android SDK Dependency Upgrade
The dependency change from version 7.1.2 to 7.2.2 of the CleverTap Android SDK reflects the enhancements mentioned in the release notes and is critical for accessing updated features and fixes on the Android platform.

@Anush-Shand Anush-Shand requested review from CTLalit, nishant-clevertap and piyush-kukadiya and removed request for CTLalit March 3, 2025 11:38
@Anush-Shand Anush-Shand merged commit a44846c into master Mar 3, 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