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

prepare release 1.0.0 #8

Merged
merged 3 commits into from
May 3, 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
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android.nonTransitiveRClass=true

GROUP=com.segment.analytics.kotlin

VERSION_CODE=011
VERSION_NAME=0.1.1
VERSION_CODE=101
VERSION_NAME=1.0.1

POM_NAME=DestinationFilters-Kotlin
POM_DESCRIPTION=Enrich and modify events via OTA updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ package com.segment.analytics.destination.filters.app
import android.os.Bundle
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.segment.analytics.kotlin.core.AliasEvent
import com.segment.analytics.kotlin.core.BaseEvent
import com.segment.analytics.kotlin.core.GroupEvent
import com.segment.analytics.kotlin.core.IdentifyEvent
import com.segment.analytics.kotlin.core.ScreenEvent
import com.segment.analytics.kotlin.core.TrackEvent
import com.segment.analytics.kotlin.core.utilities.LenientJson
import com.segment.analytics.kotlin.core.utilities.getString
import com.segment.analytics.kotlin.core.utilities.toBaseEvent
import com.segment.analytics.plugins.DestinationFilters
import com.segment.analytics.substrata.kotlin.JSObject
import com.segment.analytics.substrata.kotlin.JsonElementConverter
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.jsonObject

class TestActivity : AppCompatActivity() {
Expand Down Expand Up @@ -133,17 +125,4 @@ class TestActivity : AppCompatActivity() {

textView.text = testProgress.toString()
}

private fun JsonObject.toBaseEvent(): BaseEvent? {
val type = getString("type")

return when (type) {
"identify" -> LenientJson.decodeFromJsonElement(IdentifyEvent.serializer(), this)
"track" -> LenientJson.decodeFromJsonElement(TrackEvent.serializer(), this)
"screen" -> LenientJson.decodeFromJsonElement(ScreenEvent.serializer(), this)
"group" -> LenientJson.decodeFromJsonElement(GroupEvent.serializer(), this)
"alias" -> LenientJson.decodeFromJsonElement(AliasEvent.serializer(), this)
else -> null
}
}
}
Loading