Skip to content

Commit

Permalink
Dependency updates
Browse files Browse the repository at this point in the history
Missed several libraries in the previous commit.
  • Loading branch information
olshevski committed Jan 27, 2024
1 parent a3fa2d5 commit 665ddfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
android-sdk-min = "21"
android-sdk-target = "34"
android-sdk-compile = "34"
dagger = "2.47"
dagger = "2.50"
compose-compiler = "1.5.8"
lifecycle = "2.7.0"

Expand All @@ -28,7 +28,7 @@ hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "dag
javapoet = "com.squareup:javapoet:1.13.0"
lifecycle-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version.ref = "lifecycle" }
lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" }
koin-compose = "io.insert-koin:koin-androidx-compose:3.4.6"
koin-compose = "io.insert-koin:koin-androidx-compose:3.5.3"

# test libraries
espresso-core = "androidx.test.espresso:espresso-core:3.5.1"
Expand All @@ -41,7 +41,7 @@ android-gradle-plugin = "com.android.tools.build:gradle:8.2.2"
kotlin-gradle-plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22"

[plugins]
anvil = { id = "com.squareup.anvil", version = "2.4.7" }
anvil = { id = "com.squareup.anvil", version = "2.4.9" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version = "1.3.0" }
versions = { id = "com.github.ben-manes.versions", version = "0.51.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import dev.olshevski.navigation.reimagined.NavHost
import dev.olshevski.navigation.reimagined.navigate
import dev.olshevski.navigation.reimagined.rememberNavController
import dev.olshevski.navigation.reimagined.sample.koin.R
import org.koin.androidx.compose.getViewModel
import org.koin.androidx.compose.koinViewModel
import org.koin.core.parameter.parametersOf

Expand All @@ -35,12 +34,14 @@ fun MainScreen() = ScreenLayout(
navController.navigate(MainDestination.Second(DemoId))
}
)

is MainDestination.Second -> SecondScreen(
id = destination.id,
onOpenThirdScreenButtonClick = {
navController.navigate(MainDestination.Third(DemoText))
}
)

is MainDestination.Third -> ThirdScreen(destination.text)
}
}
Expand All @@ -52,7 +53,7 @@ private fun FirstScreen(
) = ContentLayout(
title = stringResource(R.string.first_screen_title)
) {
val viewModel = getViewModel<FirstViewModel>()
val viewModel = koinViewModel<FirstViewModel>()

Button(
onClick = { onOpenSecondScreenButtonClick() }
Expand All @@ -68,7 +69,7 @@ private fun SecondScreen(
) = ContentLayout(
title = stringResource(R.string.second_screen_title, id)
) {
val viewModel = getViewModel<SecondViewModel> { parametersOf(id) }
val viewModel = koinViewModel<SecondViewModel> { parametersOf(id) }

Button(
onClick = { onOpenThirdScreenButtonClick() }
Expand Down

0 comments on commit 665ddfc

Please sign in to comment.