Skip to content

Remove proto dependency #30

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ dependencies {
implementation(projects.clickstreamHealthMetrics)
implementation(projects.clickstreamEventVisualiser)
implementation(projects.clickstreamEventVisualiserUi)
implementation(files("$rootDir/libs/proto-consumer-1.18.6.jar"))

// Common
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
Expand Down
30 changes: 18 additions & 12 deletions app/src/main/java/com/clickstream/app/main/MainViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ import com.clickstream.app.main.MainIntent.DisconnectIntent
import com.clickstream.app.main.MainIntent.InputIntent
import com.clickstream.app.main.MainIntent.SendIntent
import com.clickstream.app.main.MainState.InFlight
import com.gojek.clickstream.common.EventMeta
import com.gojek.clickstream.products.common.AppType
import com.gojek.clickstream.products.common.DroppedProperties
import com.gojek.clickstream.products.common.DroppedPropertiesBatch
import com.gojek.clickstream.products.common.Product
import com.clickstream.app.proto.App
import com.clickstream.app.proto.Device
import com.clickstream.app.proto.User
import com.google.protobuf.Timestamp
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.Flow
Expand Down Expand Up @@ -49,14 +47,22 @@ class MainViewModel @Inject constructor(val dispatcher: Dispatcher) : ViewModel(
}

private fun sendMockCSEvent() {
val customerProto = DroppedPropertiesBatch.newBuilder().apply {
appType = AppType.Consumer
product = Product.GoSend
meta = EventMeta.newBuilder().apply {
eventGuid = "123"
val customerProto = User.newBuilder().apply {
guid = "Some Guid"
name = "John Doe"
age = 35
gender = "male"
phoneNumber = 1234567890
email = "[email protected]"
app = App.newBuilder().apply {
version = "0.0.1"
packageName = "com.clickstream"
}.build()
eventTimestamp = Timestamp.newBuilder().apply {
seconds = System.currentTimeMillis() / 1000L
device = Device.newBuilder().apply {
operatingSystem = "android"
operatingSystemVersion = "29"
deviceMake = "Samsung"
deviceModel = "SM2028"
}.build()
}.build()

Expand Down
Loading