diff --git a/app-nia-catalog/dependencies/releaseRuntimeClasspath.txt b/app-nia-catalog/dependencies/releaseRuntimeClasspath.txt index bfb84ef6a..d5a487997 100644 --- a/app-nia-catalog/dependencies/releaseRuntimeClasspath.txt +++ b/app-nia-catalog/dependencies/releaseRuntimeClasspath.txt @@ -8,7 +8,7 @@ androidx.appcompat:appcompat-resources:1.6.1 androidx.arch.core:core-common:2.2.0 androidx.arch.core:core-runtime:2.2.0 androidx.autofill:autofill:1.0.0 -androidx.browser:browser:1.6.0 +androidx.browser:browser:1.8.0 androidx.collection:collection-jvm:1.4.0 androidx.collection:collection-ktx:1.4.0 androidx.collection:collection:1.4.0 diff --git a/app/dependencies/prodReleaseRuntimeClasspath.txt b/app/dependencies/prodReleaseRuntimeClasspath.txt index 44ab9d844..b7eecc088 100644 --- a/app/dependencies/prodReleaseRuntimeClasspath.txt +++ b/app/dependencies/prodReleaseRuntimeClasspath.txt @@ -9,7 +9,7 @@ androidx.appcompat:appcompat:1.6.1 androidx.arch.core:core-common:2.2.0 androidx.arch.core:core-runtime:2.2.0 androidx.autofill:autofill:1.0.0 -androidx.browser:browser:1.6.0 +androidx.browser:browser:1.8.0 androidx.collection:collection-jvm:1.4.0 androidx.collection:collection-ktx:1.4.0 androidx.collection:collection:1.4.0 @@ -68,8 +68,8 @@ androidx.emoji2:emoji2:1.3.0 androidx.exifinterface:exifinterface:1.3.7 androidx.fragment:fragment:1.5.1 androidx.hilt:hilt-common:1.1.0 -androidx.hilt:hilt-navigation-compose:1.0.0 -androidx.hilt:hilt-navigation:1.0.0 +androidx.hilt:hilt-navigation-compose:1.2.0 +androidx.hilt:hilt-navigation:1.2.0 androidx.hilt:hilt-work:1.1.0 androidx.interpolator:interpolator:1.0.0 androidx.legacy:legacy-support-core-utils:1.0.0 @@ -211,9 +211,9 @@ org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.8.0 org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.8.0 org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.5.0 org.jetbrains.kotlinx:kotlinx-datetime:0.5.0 -org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.0 -org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.6.0 -org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.0 -org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.6.0 -org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0 +org.jetbrains.kotlinx:kotlinx-serialization-bom:1.6.3 +org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.6.3 +org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3 +org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.6.3 +org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3 org.jetbrains:annotations:23.0.0 diff --git a/app/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt b/app/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt index 732e527bb..7c9dfcc7a 100644 --- a/app/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt +++ b/app/src/androidTest/kotlin/com/google/samples/apps/nowinandroid/ui/NiaAppStateTest.kt @@ -167,7 +167,7 @@ class NiaAppStateTest { } @Test - fun stateIsOfflineWhenNetworkMonitorIsOffline() = runTest(UnconfinedTestDispatcher()) { + fun niaAppState_whenNetworkMonitorIsOffline_StateIsOffline() = runTest(UnconfinedTestDispatcher()) { composeTestRule.setContent { state = NiaAppState( navController = NavHostController(LocalContext.current), @@ -214,7 +214,7 @@ class NiaAppStateTest { @Composable private fun rememberTestNavController(): TestNavHostController { val context = LocalContext.current - return remember { + return remember { TestNavHostController(context).apply { navigatorProvider.addNavigator(ComposeNavigator()) graph = createGraph(startDestination = "a") { diff --git a/feature/topic/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicScreen.kt b/feature/topic/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicScreen.kt index 4402cecd4..5ac766675 100644 --- a/feature/topic/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicScreen.kt +++ b/feature/topic/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicScreen.kt @@ -79,7 +79,7 @@ internal fun TopicRoute( viewModel: TopicViewModel = hiltViewModel(), ) { val topicUiState: TopicUiState by viewModel.topicUiState.collectAsStateWithLifecycle() - val newsUiState: NewsUiState by viewModel.newUiState.collectAsStateWithLifecycle() + val newsUiState: NewsUiState by viewModel.newsUiState.collectAsStateWithLifecycle() TrackScreenViewEvent(screenName = "Topic: ${viewModel.topicId}") TopicScreen( diff --git a/feature/topic/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModel.kt b/feature/topic/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModel.kt index ff1eee319..9fe6a2dd2 100644 --- a/feature/topic/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModel.kt +++ b/feature/topic/src/main/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModel.kt @@ -62,7 +62,7 @@ class TopicViewModel @Inject constructor( initialValue = TopicUiState.Loading, ) - val newUiState: StateFlow = newsUiState( + val newsUiState: StateFlow = newsUiState( topicId = topicArgs.topicId, userDataRepository = userDataRepository, userNewsResourceRepository = userNewsResourceRepository, diff --git a/feature/topic/src/test/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt b/feature/topic/src/test/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt index a9c9d96dc..565732f59 100644 --- a/feature/topic/src/test/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt +++ b/feature/topic/src/test/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt @@ -91,7 +91,7 @@ class TopicViewModelTest { @Test fun uiStateNews_whenInitialized_thenShowLoading() = runTest { - assertEquals(NewsUiState.Loading, viewModel.newUiState.value) + assertEquals(NewsUiState.Loading, viewModel.newsUiState.value) } @Test @@ -117,7 +117,7 @@ class TopicViewModelTest { topicsRepository.sendTopics(testInputTopics.map { it.topic }) userDataRepository.setFollowedTopicIds(setOf(testInputTopics[1].topic.id)) val topicUiState = viewModel.topicUiState.value - val newsUiState = viewModel.newUiState.value + val newsUiState = viewModel.newsUiState.value assertIs(topicUiState) assertIs(newsUiState) @@ -131,7 +131,7 @@ class TopicViewModelTest { val collectJob = launch(UnconfinedTestDispatcher()) { combine( viewModel.topicUiState, - viewModel.newUiState, + viewModel.newsUiState, ::Pair, ).collect() } @@ -139,7 +139,7 @@ class TopicViewModelTest { userDataRepository.setFollowedTopicIds(setOf(testInputTopics[1].topic.id)) newsRepository.sendNewsResources(sampleNewsResources) val topicUiState = viewModel.topicUiState.value - val newsUiState = viewModel.newUiState.value + val newsUiState = viewModel.newsUiState.value assertIs(topicUiState) assertIs(newsUiState) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 54d8403c2..5b9fd8408 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,7 +6,7 @@ androidGradlePlugin = "8.3.0" androidTools = "31.3.0" androidxActivity = "1.8.0" androidxAppCompat = "1.6.1" -androidxBrowser = "1.6.0" +androidxBrowser = "1.8.0" androidxComposeBom = "2024.02.01" androidxComposeCompiler = "1.5.10" androidxComposeMaterial3Adaptive = "1.0.0-alpha06" @@ -15,7 +15,7 @@ androidxCore = "1.12.0" androidxCoreSplashscreen = "1.0.1" androidxDataStore = "1.0.0" androidxEspresso = "3.5.1" -androidxHiltNavigationCompose = "1.0.0" +androidxHiltNavigationCompose = "1.2.0" androidxLifecycle = "2.7.0" androidxMacroBenchmark = "1.2.3" androidxMetrics = "1.0.0-alpha04" @@ -44,7 +44,7 @@ junit4 = "4.13.2" kotlin = "1.9.22" kotlinxCoroutines = "1.8.0" kotlinxDatetime = "0.5.0" -kotlinxSerializationJson = "1.6.0" +kotlinxSerializationJson = "1.6.3" ksp = "1.9.22-1.0.18" okhttp = "4.12.0" protobuf = "3.25.2"