Skip to content

Commit

Permalink
Update analytics version (#4)
Browse files Browse the repository at this point in the history
* update analytics version

* fix compile issue

---------

Co-authored-by: Wenxi Zeng <[email protected]>
  • Loading branch information
wenxi-zeng and Wenxi Zeng authored Jul 12, 2024
1 parent 0b8051c commit d5594f0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
6 changes: 2 additions & 4 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ android {
}
}
compileOptions {
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
Expand All @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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")) {
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions testapp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions testapp/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.segment.analytics.destinations.mydestination.testapp">

<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand Down

0 comments on commit d5594f0

Please sign in to comment.