Skip to content
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

Update analytics version #4

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading