Skip to content

Commit

Permalink
Merge pull request #298 from CleverTap/develop
Browse files Browse the repository at this point in the history
Release 3.2.0
  • Loading branch information
Anush-Shand authored Mar 3, 2025
2 parents c2c5e61 + 7ab631e commit a44846c
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 30 deletions.
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
## CHANGE LOG

Version 3.1.0 *(3rd March 2025)*
Version 3.2.0 *(3 March 2025)*
-------------------------------------------
> ⚠️ **NOTE**
After upgrading the SDK to v3.2.0, don't downgrade in subsequent app releases. If you encounter any issues, please contact the CleverTap support team for assistance.

**What's new**
* **[Android Platform]**
* Supports [CleverTap Android SDK v7.2.2](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md#version-722-january-21-2025).
* Adds support for Android 15, making it compliant with Android 15 requirements. Details [here](https://developer.android.com/about/versions/15/summary).
* Upgrades the algorithm used for encryption of PII data, making it compliant with [OWASP](https://mas.owasp.org/MASTG/0x04g-Testing-Cryptography/). Uses `AndroidKeyStore` for securely backing up encryption key on API levels 23+.
* Updates `minSdkVersion` to API 21 (Android 5.0).
* Upgrades `Android Gradle Plugin (A.G.P)` to 8.6.1 as [recommended for Android 15](https://developer.android.com/about/versions/15/setup-sdk#:~:text=Update%20your%20app's%20build%20configuration,-Warning%3A%20If%20your&text=1%20or%20higher%2C%20first%20run,1.)


Version 3.1.0 *(3 March 2025)*
-------------------------------------------
**What's new**
* **[Android Platform]**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To get started, sign up [here](https://clevertap.com/live-product-demo/).

```yaml
dependencies:
clevertap_plugin: 3.1.0
clevertap_plugin: 3.2.0
```
- Run `flutter packages get` to install the SDK
Expand Down
12 changes: 8 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group = 'com.clevertap.clevertap_plugin'
version = '3.1.0'
version = '3.2.0'

buildscript {
ext.kotlin_version = "1.8.22"
Expand All @@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath("com.android.tools.build:gradle:8.1.0")
classpath("com.android.tools.build:gradle:8.6.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
}
Expand All @@ -35,11 +35,15 @@ apply plugin: "com.android.library"
apply plugin: "kotlin-android"

android {
buildFeatures {
buildConfig = true
}

if (project.android.hasProperty("namespace")) {
namespace = "com.clevertap.clevertap_plugin"
}

compileSdk = 34
compileSdk = 35

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -58,7 +62,7 @@ android {
dependencies {
implementation 'androidx.core:core-ktx:1.9.0'
testImplementation 'junit:junit:4.13.2'
api 'com.clevertap.android:clevertap-android-sdk:7.1.2'
api 'com.clevertap.android:clevertap-android-sdk:7.2.2'
compileOnly 'androidx.fragment:fragment:1.3.6'
compileOnly 'androidx.core:core:1.9.0'
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ android {
defaultConfig {
applicationId "com.example.clevertap_plugin_example"
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
targetSdkVersion 35
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
Expand Down
4 changes: 1 addition & 3 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
android.useAndroidX=true
android.enableR8=true
#android.enableDexingArtifactTransform.desugaring=false -> this was used before -> check below line
android.useFullClasspathForDexingTransform=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
6 changes: 3 additions & 3 deletions example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon May 31 23:31:27 IST 2021
#Tue Feb 18 18:09:39 IST 2025
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ pluginManagement {

plugins {
id("dev.flutter.flutter-plugin-loader").version("1.0.0")
id("com.android.application").version("8.3.0").apply(false)
id("com.android.application").version("8.6.1").apply(false)
id("com.google.gms.google-services").version("4.4.1").apply(false)
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
id("org.jetbrains.kotlin.android").version("2.0.20").apply(false)
}

include ":app"
25 changes: 13 additions & 12 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();

final int TEST_RUN_APP_DELAY = 0;
final int CLEVERTAP_LISTENER_ATTACH_DELAY = 0;
final bool testWithWorkManager = false;

@pragma('vm:entry-point')
void onKilledStateNotificationClickedHandler(Map<String, dynamic> map) async {
Expand All @@ -28,15 +29,16 @@ void onKilledStateNotificationClickedHandler(Map<String, dynamic> map) async {
@pragma(
'vm:entry-point') // Mandatory if the App is obfuscated or using Flutter 3.1+
void callbackDispatcher() {
// This is a dummy work manager to test usecases with background isolates

Workmanager().executeTask((task, inputData) {
print("Native started background task: $task");
sleep(Duration(seconds: 30));
print(
"Native called background task: $task"); //simpleTask will be emitted here.
return Future.value(true);
});
if (testWithWorkManager) {
// This is a dummy work manager to test usecases with background isolates
Workmanager().executeTask((task, inputData) {
print("Native started background task: $task");
sleep(Duration(seconds: 30));
print(
"Native called background task: $task"); //simpleTask will be emitted here.
return Future.value(true);
});
}
}

Future<void> _firebaseBackgroundMessageHandler(RemoteMessage message) async {
Expand All @@ -55,14 +57,13 @@ void _firebaseForegroundMessageHandler(RemoteMessage remoteMessage) {
void main() async {
print("CleverTapPlugin main pre ensure");
WidgetsFlutterBinding.ensureInitialized();
if (!kIsWeb && !Platform.isIOS) {
if (!kIsWeb && !Platform.isIOS && testWithWorkManager) {
Workmanager().initialize(
callbackDispatcher, // The top level function, aka callbackDispatcher
isInDebugMode:
true // If enabled it will post a notification whenever the task is running. Handy for debugging tasks
);
Workmanager()
.registerOneOffTask("periodic-task-identifier", "simplePeriodicTask");
Workmanager().registerOneOffTask("periodic-task-identifier", "simplePeriodicTask");

await Firebase.initializeApp();
FirebaseMessaging.onMessage.listen(_firebaseForegroundMessageHandler);
Expand Down
2 changes: 1 addition & 1 deletion ios/clevertap_plugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
Pod::Spec.new do |s|
s.name = 'clevertap_plugin'
s.version = '3.1.0'
s.version = '3.2.0'
s.summary = 'CleverTap Flutter plugin.'
s.description = 'The CleverTap iOS SDK for App Analytics and Engagement.'
s.homepage = 'https://github.com/CleverTap/clevertap-ios-sdk'
Expand Down
2 changes: 1 addition & 1 deletion lib/clevertap_plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class CleverTapPlugin {
static const libName = 'Flutter';

static const libVersion =
30100; // If the current version is X.X.X then pass as X0X0X
30200; // If the current version is X.X.X then pass as X0X0X

CleverTapPlugin._internal() {
/// Set the CleverTap Flutter library name and the current version for version tracking
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: clevertap_plugin
description: The CleverTap Flutter SDK for Mobile Customer Engagement,Analytics and Retention solutions.
version: 3.1.0
version: 3.2.0
homepage: https://github.com/CleverTap/clevertap-flutter

environment:
Expand Down

0 comments on commit a44846c

Please sign in to comment.