Skip to content

Commit 482c117

Browse files
authored
🤖 Update Dependencies (#1521)
Updated depedencies
2 parents 56230a7 + 7da743b commit 482c117

File tree

10 files changed

+148
-167
lines changed

10 files changed

+148
-167
lines changed

‎JetLagged/gradle/libs.versions.toml‎

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,55 @@
33
# Do not add a dependency to an individual sample, edit the global version instead.
44
#####
55
[versions]
6-
accompanist = "0.36.0"
7-
androidGradlePlugin = "8.7.2"
6+
accompanist = "0.37.0"
7+
androidGradlePlugin = "8.7.3"
88
androidx-activity-compose = "1.9.3"
99
androidx-appcompat = "1.7.0"
10-
androidx-benchmark = "1.2.4"
11-
androidx-benchmark-junit4 = "1.2.4"
12-
androidx-compose-bom = "2024.10.01"
13-
androidx-constraintlayout = "1.1.0-alpha13"
10+
androidx-compose-bom = "2024.12.01"
11+
androidx-constraintlayout = "1.1.0"
1412
androidx-core-splashscreen = "1.0.1"
1513
androidx-corektx = "1.15.0"
16-
androidx-glance = "1.1.0"
14+
androidx-glance = "1.1.1"
1715
androidx-lifecycle = "2.8.2"
1816
androidx-lifecycle-compose = "2.8.7"
1917
androidx-lifecycle-runtime-compose = "2.8.7"
20-
androidx-navigation = "2.8.3"
18+
androidx-navigation = "2.8.5"
2119
androidx-palette = "1.0.0"
2220
androidx-test = "1.6.1"
2321
androidx-test-espresso = "3.6.1"
2422
androidx-test-ext-junit = "1.2.1"
25-
androidx-test-ext-truth = "1.5.0"
23+
androidx-test-ext-truth = "1.6.0"
2624
androidx-tv-foundation = "1.0.0-alpha11"
2725
androidx-tv-material = "1.0.0"
28-
androidx-wear-compose = "1.3.1"
26+
androidx-wear-compose = "1.4.0"
2927
androidx-window = "1.3.0"
3028
androidxHiltNavigationCompose = "1.2.0"
3129
androix-test-uiautomator = "2.3.0"
32-
coil = "2.6.0"
30+
coil = "2.7.0"
3331
# @keep
3432
compileSdk = "35"
3533
coroutines = "1.9.0"
3634
google-maps = "18.2.0"
3735
gradle-versions = "0.51.0"
38-
hilt = "2.51.1"
36+
hilt = "2.53.1"
3937
hiltExt = "1.2.0"
40-
horologist = "0.6.19"
38+
horologist = "0.6.22"
4139
# @pin When updating to AGP 7.4.0-alpha10 and up we can update this https://developer.android.com/studio/write/java8-support#library-desugaring-versions
4240
jdkDesugar = "1.2.2"
4341
junit = "4.13.2"
44-
kotlin = "2.0.21"
42+
kotlin = "2.1.0"
4543
kotlinx-serialization-json = "1.7.3"
4644
kotlinx_immutable = "0.3.8"
47-
ksp = "2.0.20-1.0.24"
45+
ksp = "2.1.0-1.0.29"
4846
maps-compose = "3.1.1"
4947
# @keep
5048
minSdk = "21"
51-
okhttp = "4.11.0"
49+
okhttp = "4.12.0"
5250
play-services-wearable = "18.1.0"
53-
robolectric = "4.13"
54-
roborazzi = "1.12.0"
51+
robolectric = "4.14.1"
52+
roborazzi = "1.37.0"
5553
rome = "1.18.0"
56-
room = "2.6.0"
54+
room = "2.6.1"
5755
secrets = "2.0.1"
5856
# @keep
5957
targetSdk = "33"
@@ -62,12 +60,9 @@ version-catalog-update = "0.8.5"
6260
[libraries]
6361
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
6462
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
65-
accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
6663
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
6764
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity-compose" }
6865
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
69-
androidx-benchmark-macrobenchmark = { module = "androidx.benchmark:benchmark-macro", version.ref = "androidx-benchmark" }
70-
androidx-benchmark-macrobenchmark-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark-junit4" }
7166
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
7267
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
7368
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }

‎JetNews/app/build.gradle.kts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ dependencies {
9999
debugImplementation(libs.androidx.compose.ui.test.manifest)
100100
debugImplementation(libs.androidx.compose.ui.tooling)
101101

102-
implementation(libs.accompanist.swiperefresh)
103-
104102
implementation(libs.androidx.appcompat)
105103
implementation(libs.androidx.activity.ktx)
106104
implementation(libs.androidx.core.ktx)

‎JetNews/app/src/main/java/com/example/jetnews/ui/home/HomeScreens.kt‎

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ import androidx.compose.material.icons.Icons
5252
import androidx.compose.material.icons.filled.Search
5353
import androidx.compose.material3.CenterAlignedTopAppBar
5454
import androidx.compose.material3.CircularProgressIndicator
55-
import androidx.compose.material3.Divider
5655
import androidx.compose.material3.ExperimentalMaterial3Api
56+
import androidx.compose.material3.HorizontalDivider
5757
import androidx.compose.material3.Icon
5858
import androidx.compose.material3.IconButton
5959
import androidx.compose.material3.MaterialTheme
@@ -67,6 +67,9 @@ import androidx.compose.material3.TextButton
6767
import androidx.compose.material3.TopAppBarDefaults
6868
import androidx.compose.material3.TopAppBarScrollBehavior
6969
import androidx.compose.material3.TopAppBarState
70+
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
71+
import androidx.compose.material3.pulltorefresh.PullToRefreshDefaults.Indicator
72+
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
7073
import androidx.compose.material3.rememberTopAppBarState
7174
import androidx.compose.runtime.Composable
7275
import androidx.compose.runtime.LaunchedEffect
@@ -110,8 +113,6 @@ import com.example.jetnews.ui.utils.BookmarkButton
110113
import com.example.jetnews.ui.utils.FavoriteButton
111114
import com.example.jetnews.ui.utils.ShareButton
112115
import com.example.jetnews.ui.utils.TextSettingsButton
113-
import com.google.accompanist.swiperefresh.SwipeRefresh
114-
import com.google.accompanist.swiperefresh.rememberSwipeRefreshState
115116
import kotlinx.coroutines.currentCoroutineContext
116117
import kotlinx.coroutines.isActive
117118
import kotlinx.coroutines.runBlocking
@@ -306,6 +307,7 @@ private fun HomeScreenWithList(
306307
val contentModifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection)
307308

308309
LoadingContent(
310+
modifier = Modifier.padding(innerPadding),
309311
empty = when (uiState) {
310312
is HomeUiState.HasPosts -> false
311313
is HomeUiState.NoPosts -> uiState.isLoading
@@ -317,12 +319,15 @@ private fun HomeScreenWithList(
317319
when (uiState) {
318320
is HomeUiState.HasPosts ->
319321
hasPostsContent(uiState, innerPadding, contentModifier)
322+
320323
is HomeUiState.NoPosts -> {
321324
if (uiState.errorMessages.isEmpty()) {
322325
// if there are no posts, and no error, let the user refresh manually
323326
TextButton(
324327
onClick = onRefreshPosts,
325-
modifier.padding(innerPadding).fillMaxSize()
328+
modifier
329+
.padding(innerPadding)
330+
.fillMaxSize()
326331
) {
327332
Text(
328333
stringResource(id = R.string.home_tap_to_load_content),
@@ -383,21 +388,34 @@ private fun HomeScreenWithList(
383388
* @param onRefresh (event) event to request refresh
384389
* @param content (slot) the main content to show
385390
*/
391+
@OptIn(ExperimentalMaterial3Api::class)
386392
@Composable
387393
private fun LoadingContent(
388394
empty: Boolean,
389395
emptyContent: @Composable () -> Unit,
390396
loading: Boolean,
391397
onRefresh: () -> Unit,
392-
content: @Composable () -> Unit
398+
content: @Composable () -> Unit,
399+
modifier: Modifier = Modifier
393400
) {
394401
if (empty) {
395402
emptyContent()
396403
} else {
397-
SwipeRefresh(
398-
state = rememberSwipeRefreshState(loading),
404+
val refreshState = rememberPullToRefreshState()
405+
PullToRefreshBox(
406+
isRefreshing = loading,
399407
onRefresh = onRefresh,
400-
content = content,
408+
content = { content() },
409+
state = refreshState,
410+
indicator = {
411+
Indicator(
412+
modifier = modifier
413+
.align(Alignment.TopCenter)
414+
.padding(),
415+
isRefreshing = loading,
416+
state = refreshState
417+
)
418+
}
401419
)
402420
}
403421
}
@@ -582,7 +600,7 @@ private fun PostListHistorySection(
582600
*/
583601
@Composable
584602
private fun PostListDivider() {
585-
Divider(
603+
HorizontalDivider(
586604
modifier = Modifier.padding(horizontal = 14.dp),
587605
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f)
588606
)

‎JetNews/gradle/libs.versions.toml‎

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,55 @@
33
# Do not add a dependency to an individual sample, edit the global version instead.
44
#####
55
[versions]
6-
accompanist = "0.36.0"
7-
androidGradlePlugin = "8.7.2"
6+
accompanist = "0.37.0"
7+
androidGradlePlugin = "8.7.3"
88
androidx-activity-compose = "1.9.3"
99
androidx-appcompat = "1.7.0"
10-
androidx-benchmark = "1.2.4"
11-
androidx-benchmark-junit4 = "1.2.4"
12-
androidx-compose-bom = "2024.10.01"
13-
androidx-constraintlayout = "1.1.0-alpha13"
10+
androidx-compose-bom = "2024.12.01"
11+
androidx-constraintlayout = "1.1.0"
1412
androidx-core-splashscreen = "1.0.1"
1513
androidx-corektx = "1.15.0"
16-
androidx-glance = "1.1.0"
14+
androidx-glance = "1.1.1"
1715
androidx-lifecycle = "2.8.2"
1816
androidx-lifecycle-compose = "2.8.7"
1917
androidx-lifecycle-runtime-compose = "2.8.7"
20-
androidx-navigation = "2.8.3"
18+
androidx-navigation = "2.8.5"
2119
androidx-palette = "1.0.0"
2220
androidx-test = "1.6.1"
2321
androidx-test-espresso = "3.6.1"
2422
androidx-test-ext-junit = "1.2.1"
25-
androidx-test-ext-truth = "1.5.0"
23+
androidx-test-ext-truth = "1.6.0"
2624
androidx-tv-foundation = "1.0.0-alpha11"
2725
androidx-tv-material = "1.0.0"
28-
androidx-wear-compose = "1.3.1"
26+
androidx-wear-compose = "1.4.0"
2927
androidx-window = "1.3.0"
3028
androidxHiltNavigationCompose = "1.2.0"
3129
androix-test-uiautomator = "2.3.0"
32-
coil = "2.6.0"
30+
coil = "2.7.0"
3331
# @keep
3432
compileSdk = "35"
3533
coroutines = "1.9.0"
3634
google-maps = "18.2.0"
3735
gradle-versions = "0.51.0"
38-
hilt = "2.51.1"
36+
hilt = "2.53.1"
3937
hiltExt = "1.2.0"
40-
horologist = "0.6.19"
38+
horologist = "0.6.22"
4139
# @pin When updating to AGP 7.4.0-alpha10 and up we can update this https://developer.android.com/studio/write/java8-support#library-desugaring-versions
4240
jdkDesugar = "1.2.2"
4341
junit = "4.13.2"
44-
kotlin = "2.0.21"
42+
kotlin = "2.1.0"
4543
kotlinx-serialization-json = "1.7.3"
4644
kotlinx_immutable = "0.3.8"
47-
ksp = "2.0.20-1.0.24"
45+
ksp = "2.1.0-1.0.29"
4846
maps-compose = "3.1.1"
4947
# @keep
5048
minSdk = "21"
51-
okhttp = "4.11.0"
49+
okhttp = "4.12.0"
5250
play-services-wearable = "18.1.0"
53-
robolectric = "4.13"
54-
roborazzi = "1.12.0"
51+
robolectric = "4.14.1"
52+
roborazzi = "1.37.0"
5553
rome = "1.18.0"
56-
room = "2.6.0"
54+
room = "2.6.1"
5755
secrets = "2.0.1"
5856
# @keep
5957
targetSdk = "33"
@@ -62,12 +60,9 @@ version-catalog-update = "0.8.5"
6260
[libraries]
6361
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
6462
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
65-
accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
6663
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
6764
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity-compose" }
6865
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
69-
androidx-benchmark-macrobenchmark = { module = "androidx.benchmark:benchmark-macro", version.ref = "androidx-benchmark" }
70-
androidx-benchmark-macrobenchmark-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark-junit4" }
7166
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
7267
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
7368
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }

‎Jetcaster/gradle/libs.versions.toml‎

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,55 @@
33
# Do not add a dependency to an individual sample, edit the global version instead.
44
#####
55
[versions]
6-
accompanist = "0.36.0"
7-
androidGradlePlugin = "8.7.2"
6+
accompanist = "0.37.0"
7+
androidGradlePlugin = "8.7.3"
88
androidx-activity-compose = "1.9.3"
99
androidx-appcompat = "1.7.0"
10-
androidx-benchmark = "1.2.4"
11-
androidx-benchmark-junit4 = "1.2.4"
12-
androidx-compose-bom = "2024.10.01"
13-
androidx-constraintlayout = "1.1.0-alpha13"
10+
androidx-compose-bom = "2024.12.01"
11+
androidx-constraintlayout = "1.1.0"
1412
androidx-core-splashscreen = "1.0.1"
1513
androidx-corektx = "1.15.0"
16-
androidx-glance = "1.1.0"
14+
androidx-glance = "1.1.1"
1715
androidx-lifecycle = "2.8.2"
1816
androidx-lifecycle-compose = "2.8.7"
1917
androidx-lifecycle-runtime-compose = "2.8.7"
20-
androidx-navigation = "2.8.3"
18+
androidx-navigation = "2.8.5"
2119
androidx-palette = "1.0.0"
2220
androidx-test = "1.6.1"
2321
androidx-test-espresso = "3.6.1"
2422
androidx-test-ext-junit = "1.2.1"
25-
androidx-test-ext-truth = "1.5.0"
23+
androidx-test-ext-truth = "1.6.0"
2624
androidx-tv-foundation = "1.0.0-alpha11"
2725
androidx-tv-material = "1.0.0"
28-
androidx-wear-compose = "1.3.1"
26+
androidx-wear-compose = "1.4.0"
2927
androidx-window = "1.3.0"
3028
androidxHiltNavigationCompose = "1.2.0"
3129
androix-test-uiautomator = "2.3.0"
32-
coil = "2.6.0"
30+
coil = "2.7.0"
3331
# @keep
3432
compileSdk = "35"
3533
coroutines = "1.9.0"
3634
google-maps = "18.2.0"
3735
gradle-versions = "0.51.0"
38-
hilt = "2.51.1"
36+
hilt = "2.53.1"
3937
hiltExt = "1.2.0"
40-
horologist = "0.6.19"
38+
horologist = "0.6.22"
4139
# @pin When updating to AGP 7.4.0-alpha10 and up we can update this https://developer.android.com/studio/write/java8-support#library-desugaring-versions
4240
jdkDesugar = "1.2.2"
4341
junit = "4.13.2"
44-
kotlin = "2.0.21"
42+
kotlin = "2.1.0"
4543
kotlinx-serialization-json = "1.7.3"
4644
kotlinx_immutable = "0.3.8"
47-
ksp = "2.0.20-1.0.24"
45+
ksp = "2.1.0-1.0.29"
4846
maps-compose = "3.1.1"
4947
# @keep
5048
minSdk = "21"
51-
okhttp = "4.11.0"
49+
okhttp = "4.12.0"
5250
play-services-wearable = "18.1.0"
53-
robolectric = "4.13"
54-
roborazzi = "1.12.0"
51+
robolectric = "4.14.1"
52+
roborazzi = "1.37.0"
5553
rome = "1.18.0"
56-
room = "2.6.0"
54+
room = "2.6.1"
5755
secrets = "2.0.1"
5856
# @keep
5957
targetSdk = "33"
@@ -62,12 +60,9 @@ version-catalog-update = "0.8.5"
6260
[libraries]
6361
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
6462
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
65-
accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
6663
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
6764
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity-compose" }
6865
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
69-
androidx-benchmark-macrobenchmark = { module = "androidx.benchmark:benchmark-macro", version.ref = "androidx-benchmark" }
70-
androidx-benchmark-macrobenchmark-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark-junit4" }
7166
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
7267
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
7368
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }

0 commit comments

Comments
 (0)