Skip to content

Commit

Permalink
prepare release 1.0.0 (#8)
Browse files Browse the repository at this point in the history
* prepare release 1.0.0

* replace utility method

* prepare snapshot 1.0.1

---------

Co-authored-by: Wenxi Zeng <[email protected]>
  • Loading branch information
wenxi-zeng and Wenxi Zeng authored May 3, 2024
1 parent d869626 commit 120d437
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
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
}
}
}

0 comments on commit 120d437

Please sign in to comment.