From 68852b06ec7827cc55822aae0474d30f23c46c25 Mon Sep 17 00:00:00 2001 From: Evan Masseau <> Date: Tue, 30 Jan 2024 11:51:01 -0500 Subject: [PATCH] Android kotlin version and min SDK fixes --- android/build.gradle | 1 + android/gradle.properties | 2 +- .../com/klaviyoreactnativesdk/KlaviyoReactNativeSdkModule.kt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 35aac48..b1d3a3c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,6 +1,7 @@ buildscript { // Buildscript is evaluated before everything else so we can't use getExtOrDefault def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["KlaviyoReactNativeSdk_kotlinVersion"] + def kotlinVersion = kotlin_version repositories { google() diff --git a/android/gradle.properties b/android/gradle.properties index b997206..ae708db 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -12,7 +12,7 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro # org.gradle.parallel=true #Tue Dec 19 15:08:27 EST 2023 KlaviyoReactNativeSdk_compileSdkVersion=31 -KlaviyoReactNativeSdk_kotlinVersion=1.7.0 +KlaviyoReactNativeSdk_kotlinVersion=1.9.22 KlaviyoReactNativeSdk_minSdkVersion=23 KlaviyoReactNativeSdk_ndkversion=21.4.7075529 KlaviyoReactNativeSdk_targetSdkVersion=31 diff --git a/android/src/main/java/com/klaviyoreactnativesdk/KlaviyoReactNativeSdkModule.kt b/android/src/main/java/com/klaviyoreactnativesdk/KlaviyoReactNativeSdkModule.kt index 01f36c9..7dcfd2a 100644 --- a/android/src/main/java/com/klaviyoreactnativesdk/KlaviyoReactNativeSdkModule.kt +++ b/android/src/main/java/com/klaviyoreactnativesdk/KlaviyoReactNativeSdkModule.kt @@ -49,7 +49,7 @@ class KlaviyoReactNativeSdkModule internal constructor(private val context: Reac override fun setProfile(profile: ReadableMap) { val parsedProfile = Profile() - profile.toHashMap().forEach { (key, value) -> + profile.toHashMap().iterator().forEach { (key, value) -> when (key) { LOCATION, PROPERTIES -> (value as? HashMap<*, *>)?.forEach { (key, value) ->