diff --git a/build.gradle.kts b/build.gradle.kts index 292ac0f..abf5788 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ version = getVersionName() plugins { // Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin. - id("org.jetbrains.kotlin.jvm") version "1.6.0" + id("org.jetbrains.kotlin.jvm") version "1.8.0" // Apply the java-library plugin for API and implementation separation. `java-library` diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index d7edf66..d24f3e5 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -30,7 +30,6 @@ android { } } compileOptions { - isCoreLibraryDesugaringEnabled = true sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } @@ -40,11 +39,10 @@ android { } dependencies { - coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5") - api("com.segment.analytics.kotlin:android:1.6.2") + api("com.segment.analytics.kotlin:android:1.16.3") implementation("androidx.multidex:multidex:2.0.1") - implementation("androidx.core:core-ktx:1.7.0") + implementation("androidx.core:core-ktx:1.13.1") implementation("androidx.lifecycle:lifecycle-process:2.4.1") implementation("androidx.lifecycle:lifecycle-common-java8:2.4.1") diff --git a/lib/src/main/java/com/segment/analytics/kotlin/destinations/intercom/IntercomDestination.kt b/lib/src/main/java/com/segment/analytics/kotlin/destinations/intercom/IntercomDestination.kt index 4046abf..c5e514c 100644 --- a/lib/src/main/java/com/segment/analytics/kotlin/destinations/intercom/IntercomDestination.kt +++ b/lib/src/main/java/com/segment/analytics/kotlin/destinations/intercom/IntercomDestination.kt @@ -104,7 +104,7 @@ class IntercomDestination( put(PRICE, price) } - properties.forEach { (key, value) -> + for ((key, value) in properties) { // here we are only interested in primitive values and not maps or collections if (key !in setOf("products", REVENUE, TOTAL, CURRENCY) && value is JsonPrimitive) { @@ -195,7 +195,7 @@ class IntercomDestination( builder.withCompany(company) } - traits.forEach { (key, value) -> + for ((key, value) in traits) { // here we are only interested in primitive values and not maps or collections if (value is JsonPrimitive && key !in setOf(NAME, EMAIL, PHONE, "userId", "anonymousId")) { @@ -223,7 +223,7 @@ class IntercomDestination( company.getInt(MONTHLY_SPEND)?.let { builder.withMonthlySpend(it) } company.getString(PLAN)?.let { builder.withPlan(it) } - company.forEach { (key, value) -> + for((key, value) in company) { // here we are only interested in primitive values and not maps or collections if (value is JsonPrimitive && key !in setOf("id", NAME, CREATED_AT, MONTHLY_SPEND, PLAN) diff --git a/testapp/build.gradle.kts b/testapp/build.gradle.kts index 141f272..6c724c3 100644 --- a/testapp/build.gradle.kts +++ b/testapp/build.gradle.kts @@ -4,12 +4,12 @@ plugins { } android { - compileSdk = 31 + compileSdk = 34 defaultConfig { applicationId = "com.segment.analytics.destinations.mydestination.testapp" minSdk = 21 - targetSdk = 31 + targetSdk = 34 versionCode = 1 versionName = "1.0" diff --git a/testapp/src/main/AndroidManifest.xml b/testapp/src/main/AndroidManifest.xml index 5f093d2..8107681 100644 --- a/testapp/src/main/AndroidManifest.xml +++ b/testapp/src/main/AndroidManifest.xml @@ -2,6 +2,7 @@ +