diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e04a904..07010c3 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -73,9 +73,6 @@ dependencies { // jetpack implementation(libs.androidx.startup) - implementation(libs.hilt.android) - implementation(libs.androidx.hilt.navigation.compose) - kapt(libs.hilt.compiler) // image loading implementation(libs.landscapist.glide) diff --git a/build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt index 37d1e3c..007af84 100644 --- a/build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt @@ -8,7 +8,7 @@ class AndroidHiltConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { with(pluginManager) { - apply("org.jetbrains.kotlin.kapt") + apply("com.google.devtools.ksp") } val libs = extensions.getByType().named("libs") @@ -16,7 +16,7 @@ class AndroidHiltConventionPlugin : Plugin { dependencies { add("implementation", libs.findLibrary("hilt.android").get()) add("implementation", libs.findLibrary("androidx.hilt.navigation.compose").get()) - add("kapt", libs.findLibrary("hilt.compiler").get()) + add("ksp", libs.findLibrary("hilt.compiler").get()) } } } diff --git a/core/model/build.gradle.kts b/core/model/build.gradle.kts index 71ed53b..dbc465e 100644 --- a/core/model/build.gradle.kts +++ b/core/model/build.gradle.kts @@ -28,4 +28,5 @@ dependencies { api(libs.stream.client) api(libs.retrofit.kotlin.serialization) api(libs.kotlinx.serialization.json) + compileOnly(libs.compose.stable.marker) } diff --git a/core/model/src/main/kotlin/io/getstream/whatsappclone/model/WhatsAppUser.kt b/core/model/src/main/kotlin/io/getstream/whatsappclone/model/WhatsAppUser.kt index 99d9f5c..6549a45 100644 --- a/core/model/src/main/kotlin/io/getstream/whatsappclone/model/WhatsAppUser.kt +++ b/core/model/src/main/kotlin/io/getstream/whatsappclone/model/WhatsAppUser.kt @@ -17,11 +17,13 @@ package io.getstream.whatsappclone.model import android.os.Parcelable +import androidx.compose.runtime.Immutable import kotlinx.parcelize.Parcelize import kotlinx.serialization.Serializable @Parcelize @Serializable +@Immutable data class WhatsAppUser( val gender: String, val name: String, diff --git a/features/calls/src/main/kotlin/io/getstream/whatsappclone/calls/info/WhatsAppCallHistoryTopBar.kt b/features/calls/src/main/kotlin/io/getstream/whatsappclone/calls/info/WhatsAppCallHistoryTopBar.kt index d487284..4ebc70d 100644 --- a/features/calls/src/main/kotlin/io/getstream/whatsappclone/calls/info/WhatsAppCallHistoryTopBar.kt +++ b/features/calls/src/main/kotlin/io/getstream/whatsappclone/calls/info/WhatsAppCallHistoryTopBar.kt @@ -20,11 +20,10 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.size +import androidx.compose.material.TopAppBar import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.SmallTopAppBar import androidx.compose.material3.Text -import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource @@ -40,7 +39,7 @@ import io.getstream.whatsappclone.navigation.WhatsAppCloneComposeNavigator fun WhatsAppCallHistoryTopBar( composeNavigator: AppComposeNavigator ) { - SmallTopAppBar( + TopAppBar( modifier = Modifier.fillMaxWidth(), navigationIcon = { Icon( @@ -78,9 +77,7 @@ fun WhatsAppCallHistoryTopBar( contentDescription = null ) }, - colors = TopAppBarDefaults.smallTopAppBarColors( - containerColor = MaterialTheme.colorScheme.primary - ) + contentColor = MaterialTheme.colorScheme.primary ) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cbb13c3..c564b95 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,24 +13,25 @@ androidxComposeCompiler = "1.5.3" androidxComposeMaterial3 = "1.0.0-alpha13" androidxComposeConstraintLayout = "1.0.1" androidxComposeNavigation = "2.5.3" -androidxCore = "1.8.0" +androidxCore = "1.12.0" androidxHiltNavigationCompose = "1.0.0" -androidxLifecycle = "2.6.1" +androidxLifecycle = "2.6.2" androidxMacroBenchmark = "1.1.1" androidxNavigation = "2.5.0" -androidxProfileinstaller = "1.3.0" +androidxProfileinstaller = "1.3.1" androidxStartup = "1.1.1" -androidxRoom = "2.5.1" -androidxTest = "1.4.0" +androidxRoom = "2.5.2" +androidxTest = "1.5.0" androidxTestExt = "1.1.3" androidxTracing = "1.1.0" androidxUiAutomator = "2.2.0" -hilt = "2.46" +composeStableMarker = "1.0.1" +hilt = "2.48.1" hiltExt = "1.0.0" junit4 = "4.13.2" kotlin = "1.9.10" -kotlinxCoroutines = "1.7.2" -kotlinxSerializationJson = "1.5.1" +kotlinxCoroutines = "1.7.3" +kotlinxSerializationJson = "1.6.0" ksp = "1.9.10-1.0.13" ktlint = "0.43.0" okhttp = "4.11.0" @@ -78,6 +79,7 @@ androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = androidx-test-rules = { group = "androidx.test", name = "rules", version.ref = "androidxTest" } androidx-test-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "androidxUiAutomator" } androidx-startup = { group = "androidx.startup", name = "startup-runtime", version.ref = "androidxStartup" } +compose-stable-marker = { group = "com.github.skydoves", name = "compose-stable-marker", version.ref = "composeStableMarker" } hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" } hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" } hilt-android-testing = { group = "com.google.dagger", name = "hilt-android-testing", version.ref = "hilt" }