-
Notifications
You must be signed in to change notification settings - Fork 50
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
Release 3.2.0 #298
Conversation
- 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
…SDK-4425/support_corev7.2.2
- Comments out workmanager - targetSDKVersion = 35
Task/sdk 4425/support corev7.2.2
WalkthroughThe 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
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
Possibly related PRs
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this 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
📒 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 of35
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 inexample/android/app/build.gradle
is consistent with thecompileSdk
setting in the project-levelandroid/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 stateThe updated timestamp (Feb 2025) aligns with the timing of the SDK update to version 3.2.0.
6-6
: Repositioned line without content changeThe
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:
- Newer Gradle features and bugfixes
- 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()
replaceadd()
([2][9])insert()
/insertAll()
replaceput()
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:
- 1: https://docs.gradle.org/current/release-notes.html
- 2: https://docs.gradle.org/8.7/release-notes.html
- 3: https://docs.gradle.org/8.4/release-notes.html
- 4: https://blog.web3labs.com/web3j-gradle-8.7-upgrade-and-vulnerability-fixes
- 5: https://developer.android.com/build/releases/gradle-plugin
- 6: https://discuss.gradle.org/t/help-on-kotlin-gradle/48476
- 7: https://docs.gradle.org/current/userguide/upgrading_version_7.html
- 8: https://github.com/gradle/gradle/releases
- 9: https://www.youtube.com/watch?v=YnMAO_2grBQ
- 10: https://youtrack.jetbrains.com/issue/KT-65820/Compatibility-with-Gradle-8.7-release
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 integrationAdded a new Boolean flag that will control the background task execution, which is good for testing purposes.
32-41
: Background task execution now conditionally enabledThe WorkManager callback is now controlled by the
testWithWorkManager
flag. Since it's set tofalse
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 enabledThe 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 flowThe 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
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
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:
- Upgrade to Java 8+
- Remove obsolete PermGen flags
- 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:
- 1: https://digma.ai/java-21-keeping-up-with-modern-programming-languages/
- 2: https://www.digitalocean.com/community/tutorials/java-jvm-memory-model-memory-management-in-java
- 3: https://bell-sw.com/blog/guide-to-jvm-memory-configuration-options/
- 4: https://newrelic.com/sites/default/files/2023-04/new-relic-2023-state-of-the-java-ecosystem-2023-04-20.pdf
- 5: https://advancedweb.hu/a-categorized-list-of-all-java-and-jvm-features-since-jdk-8-to-21/
- 6: https://www.infoq.com/articles/Java-PERMGEN-Removed/
- 7: https://www.netguru.com/blog/is-java-still-used-in-2025
- 8: https://blogs.oracle.com/java/post/choosing-the-right-jdk-version
- 9: https://coderanch.com/t/90631/application-servers/java-lang-OutOfMemoryError-PermGen-space
- 10: https://www.softkit.dev/blog/java-still-relevant/
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 forcom.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
Theorg.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
: EnabledbuildConfig
in Build Features
The addition of thebuildFeatures { 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
: UpdatedcompileSdk
Version to 35
Raising thecompileSdk
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 version7.1.2
to7.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.
Summary by CodeRabbit
Chores
New Features