Skip to content

Commit

Permalink
Merge branch 'refs/heads/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandar-apostolov committed Jul 2, 2024
2 parents 352cb7e + 65517b8 commit 79a1873
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ internal fun Project.configureAndroidCompose(
extensions.configure<ComposeCompilerGradlePluginExtension> {
enableStrongSkippingMode = true
reportsDestination = layout.buildDirectory.dir("compose_compiler")
stabilityConfigurationFile = rootProject.layout.projectDirectory.file("compose_compiler_config.conf")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ object Configuration {
const val minSdk = 24
const val majorVersion = 1
const val minorVersion = 0
const val patchVersion = 7
const val patchVersion = 8
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
const val versionCode = 31
const val versionCode = 32
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
const val artifactGroup = "io.getstream"
const val streamVideoCallGooglePlayVersion = "1.1.4"
Expand Down
11 changes: 8 additions & 3 deletions compose_compiler_config.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
kotlin.collections.List
org.threeten.bp.OffsetDateTime
org.threeten.bp.LocalDateTime
// Kotlin collections and datetime classes
kotlin.collections.*
org.threeten.bp.*
java.time.*

// We always use immutable classes for our data model, to avoid running the Compose compiler
// in the module we declare it to be stable here.
io.getstream.video.android.core.model.*
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package io.getstream.video.android

import android.content.Intent
import android.os.Bundle
import android.os.PersistableBundle
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
Expand All @@ -28,12 +30,16 @@ import io.getstream.result.onSuccessSuspend
import io.getstream.video.android.compose.ui.ComposeStreamCallActivity
import io.getstream.video.android.compose.ui.StreamCallActivityComposeDelegate
import io.getstream.video.android.core.Call
import io.getstream.video.android.core.StreamVideo
import io.getstream.video.android.datastore.delegate.StreamUserDataStore
import io.getstream.video.android.ui.call.CallScreen
import io.getstream.video.android.ui.common.StreamActivityUiDelegate
import io.getstream.video.android.ui.common.StreamCallActivity
import io.getstream.video.android.ui.common.StreamCallActivityConfiguration
import io.getstream.video.android.ui.common.util.StreamCallActivityDelicateApi
import io.getstream.video.android.util.FullScreenCircleProgressBar
import io.getstream.video.android.util.StreamVideoInitHelper
import kotlinx.coroutines.runBlocking

@OptIn(StreamCallActivityDelicateApi::class)
class CallActivity : ComposeStreamCallActivity() {
Expand All @@ -42,6 +48,16 @@ class CallActivity : ComposeStreamCallActivity() {
override val configuration: StreamCallActivityConfiguration =
StreamCallActivityConfiguration(closeScreenOnCallEnded = false)

@StreamCallActivityDelicateApi
override fun onPreCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
runBlocking {
if (!StreamVideo.isInstalled) {
runBlocking { StreamVideoInitHelper.reloadSdk(StreamUserDataStore.instance()) }
}
}
super.onPreCreate(savedInstanceState, persistentState)
}

private class StreamDemoUiDelegate : StreamCallActivityComposeDelegate() {

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.launch

/**
* Main entry point for remote / local configuration
Expand Down Expand Up @@ -88,7 +87,7 @@ object AppConfig {
* @param coroutineScope the scope used to run [onLoaded]
*/
@OptIn(DelicateCoroutinesApi::class)
fun load(
suspend fun load(
context: Context,
coroutineScope: CoroutineScope = GlobalScope,
onLoaded: suspend () -> Unit = {},
Expand All @@ -103,10 +102,7 @@ object AppConfig {
}
val which = selectedEnvironment ?: availableEnvironments[0]
selectEnv(which)
currentEnvironment.value = which
coroutineScope.launch {
onLoaded()
}
onLoaded()
} catch (e: Exception) {
logger.e(e) { "Failed to parse remote config. Deeplinks not working!" }
}
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/Android/02-tutorials/01-video-calling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If you're new to android, note that there are 2 `build.gradle` files, you want t
```kotlin
dependencies {
// Stream Video Compose SDK
implementation("io.getstream:stream-video-android-ui-compose:1.0.7")
implementation("io.getstream:stream-video-android-ui-compose:1.0.8")

// Optionally add Jetpack Compose if Android studio didn't automatically include them
implementation(platform("androidx.compose:compose-bom:2023.08.00"))
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/Android/02-tutorials/02-audio-room.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If you're new to android, note that there are 2 `build.gradle` files, you want t
```groovy
dependencies {
// Stream Video Compose SDK
implementation("io.getstream:stream-video-android-ui-compose:1.0.7")
implementation("io.getstream:stream-video-android-ui-compose:1.0.8")
// Jetpack Compose (optional/ android studio typically adds them when you create a new project)
implementation(platform("androidx.compose:compose-bom:2023.08.00"))
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/Android/02-tutorials/03-livestream.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If you're new to android, note that there are 2 `build.gradle` files, you want t
```kotlin
dependencies {
// Stream Video Compose SDK
implementation("io.getstream:stream-video-android-ui-compose:1.0.7")
implementation("io.getstream:stream-video-android-ui-compose:1.0.8")

// Jetpack Compose (optional/ android studio typically adds them when you create a new project)
implementation(platform("androidx.compose:compose-bom:2023.08.00"))
Expand Down
2 changes: 1 addition & 1 deletion docusaurus/docs/Android/06-advanced/07-chat-with-video.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Let the project sync. It should have all the dependencies required for you to fi
```groovy
dependencies {
// Stream Video Compose SDK
implementation("io.getstream:stream-video-android-ui-compose:1.0.7")
implementation("io.getstream:stream-video-android-ui-compose:1.0.8")
// Stream Chat
implementation(libs.stream.chat.compose)
Expand Down
9 changes: 4 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cameraCamera2 = "1.3.0"
spotless = "6.21.0"
nexusPlugin = "1.3.0"
kotlin = "2.0.0"
ksp = "2.0.0-1.0.21"
ksp = "2.0.0-1.0.22"
kotlinSerialization = "1.6.3"
kotlinSerializationConverter = "1.0.0"
kotlinxCoroutines = "1.8.0"
Expand All @@ -22,15 +22,14 @@ androidxActivity = "1.9.0"
androidxDataStore = "1.0.0"
googleService = "4.3.14"

androidxComposeBom = "2024.05.00"
androidxComposeCompiler = "1.5.11"
androidxComposeBom = "2024.06.00"
androidxComposeTracing = "1.0.0-beta01"
androidxHiltNavigation = "1.2.0"
androidxComposeNavigation = "2.7.7"
composeStableMarker = "1.0.2"
composeStableMarker = "1.0.5"

coil = "2.6.0"
landscapist = "2.3.3"
landscapist = "2.3.5"
accompanist = "0.32.0"
telephoto = "0.3.0"
audioswitch = "1.1.8"
Expand Down
6 changes: 5 additions & 1 deletion stream-video-android-core/consumer-proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>

# With R8 full mode generic signatures are stripped for classes that are not kept.
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking class retrofit2.Response

# Prevent R8 from stripping notification-handling classes.
-keep class io.getstream.video.android.core.notifications.internal.VideoPushDelegate { *; }
-keep class io.getstream.android.push.delegate.PushDelegate { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public class StreamVideoBuilder @JvmOverloads constructor(
}.onError {
streamLog { it.message }
}
} catch (e: Exception) {
} catch (e: Throwable) {
// If the connect continuation was resumed with an exception, we catch it here.
streamLog { e.message.orEmpty() }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import java.util.Collections

internal data class Timer(val name: String, val start: Long = System.currentTimeMillis()) {
var end: Long = 0
Expand Down Expand Up @@ -58,7 +59,7 @@ internal class DebugInfo(val client: StreamVideoImpl) {
private val logger by taggedLogger("DebugInfo")

// timers to help track performance issues in prod
val timers = mutableListOf<Timer>()
val timers = Collections.synchronizedList(mutableListOf<Timer>())
// last 20 events

// phone type
Expand Down

0 comments on commit 79a1873

Please sign in to comment.