Skip to content

Commit

Permalink
🤖 Update Dependencies (#1521)
Browse files Browse the repository at this point in the history
Updated depedencies
  • Loading branch information
riggaroo authored Dec 19, 2024
2 parents 56230a7 + 7da743b commit 482c117
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 167 deletions.
39 changes: 17 additions & 22 deletions JetLagged/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,55 @@
# Do not add a dependency to an individual sample, edit the global version instead.
#####
[versions]
accompanist = "0.36.0"
androidGradlePlugin = "8.7.2"
accompanist = "0.37.0"
androidGradlePlugin = "8.7.3"
androidx-activity-compose = "1.9.3"
androidx-appcompat = "1.7.0"
androidx-benchmark = "1.2.4"
androidx-benchmark-junit4 = "1.2.4"
androidx-compose-bom = "2024.10.01"
androidx-constraintlayout = "1.1.0-alpha13"
androidx-compose-bom = "2024.12.01"
androidx-constraintlayout = "1.1.0"
androidx-core-splashscreen = "1.0.1"
androidx-corektx = "1.15.0"
androidx-glance = "1.1.0"
androidx-glance = "1.1.1"
androidx-lifecycle = "2.8.2"
androidx-lifecycle-compose = "2.8.7"
androidx-lifecycle-runtime-compose = "2.8.7"
androidx-navigation = "2.8.3"
androidx-navigation = "2.8.5"
androidx-palette = "1.0.0"
androidx-test = "1.6.1"
androidx-test-espresso = "3.6.1"
androidx-test-ext-junit = "1.2.1"
androidx-test-ext-truth = "1.5.0"
androidx-test-ext-truth = "1.6.0"
androidx-tv-foundation = "1.0.0-alpha11"
androidx-tv-material = "1.0.0"
androidx-wear-compose = "1.3.1"
androidx-wear-compose = "1.4.0"
androidx-window = "1.3.0"
androidxHiltNavigationCompose = "1.2.0"
androix-test-uiautomator = "2.3.0"
coil = "2.6.0"
coil = "2.7.0"
# @keep
compileSdk = "35"
coroutines = "1.9.0"
google-maps = "18.2.0"
gradle-versions = "0.51.0"
hilt = "2.51.1"
hilt = "2.53.1"
hiltExt = "1.2.0"
horologist = "0.6.19"
horologist = "0.6.22"
# @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
jdkDesugar = "1.2.2"
junit = "4.13.2"
kotlin = "2.0.21"
kotlin = "2.1.0"
kotlinx-serialization-json = "1.7.3"
kotlinx_immutable = "0.3.8"
ksp = "2.0.20-1.0.24"
ksp = "2.1.0-1.0.29"
maps-compose = "3.1.1"
# @keep
minSdk = "21"
okhttp = "4.11.0"
okhttp = "4.12.0"
play-services-wearable = "18.1.0"
robolectric = "4.13"
roborazzi = "1.12.0"
robolectric = "4.14.1"
roborazzi = "1.37.0"
rome = "1.18.0"
room = "2.6.0"
room = "2.6.1"
secrets = "2.0.1"
# @keep
targetSdk = "33"
Expand All @@ -62,12 +60,9 @@ version-catalog-update = "0.8.5"
[libraries]
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity-compose" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-benchmark-macrobenchmark = { module = "androidx.benchmark:benchmark-macro", version.ref = "androidx-benchmark" }
androidx-benchmark-macrobenchmark-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark-junit4" }
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }
Expand Down
2 changes: 0 additions & 2 deletions JetNews/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ dependencies {
debugImplementation(libs.androidx.compose.ui.test.manifest)
debugImplementation(libs.androidx.compose.ui.tooling)

implementation(libs.accompanist.swiperefresh)

implementation(libs.androidx.appcompat)
implementation(libs.androidx.activity.ktx)
implementation(libs.androidx.core.ktx)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Search
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.Divider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
Expand All @@ -67,6 +67,9 @@ import androidx.compose.material3.TextButton
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.TopAppBarScrollBehavior
import androidx.compose.material3.TopAppBarState
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
import androidx.compose.material3.pulltorefresh.PullToRefreshDefaults.Indicator
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
import androidx.compose.material3.rememberTopAppBarState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
Expand Down Expand Up @@ -110,8 +113,6 @@ import com.example.jetnews.ui.utils.BookmarkButton
import com.example.jetnews.ui.utils.FavoriteButton
import com.example.jetnews.ui.utils.ShareButton
import com.example.jetnews.ui.utils.TextSettingsButton
import com.google.accompanist.swiperefresh.SwipeRefresh
import com.google.accompanist.swiperefresh.rememberSwipeRefreshState
import kotlinx.coroutines.currentCoroutineContext
import kotlinx.coroutines.isActive
import kotlinx.coroutines.runBlocking
Expand Down Expand Up @@ -306,6 +307,7 @@ private fun HomeScreenWithList(
val contentModifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection)

LoadingContent(
modifier = Modifier.padding(innerPadding),
empty = when (uiState) {
is HomeUiState.HasPosts -> false
is HomeUiState.NoPosts -> uiState.isLoading
Expand All @@ -317,12 +319,15 @@ private fun HomeScreenWithList(
when (uiState) {
is HomeUiState.HasPosts ->
hasPostsContent(uiState, innerPadding, contentModifier)

is HomeUiState.NoPosts -> {
if (uiState.errorMessages.isEmpty()) {
// if there are no posts, and no error, let the user refresh manually
TextButton(
onClick = onRefreshPosts,
modifier.padding(innerPadding).fillMaxSize()
modifier
.padding(innerPadding)
.fillMaxSize()
) {
Text(
stringResource(id = R.string.home_tap_to_load_content),
Expand Down Expand Up @@ -383,21 +388,34 @@ private fun HomeScreenWithList(
* @param onRefresh (event) event to request refresh
* @param content (slot) the main content to show
*/
@OptIn(ExperimentalMaterial3Api::class)
@Composable
private fun LoadingContent(
empty: Boolean,
emptyContent: @Composable () -> Unit,
loading: Boolean,
onRefresh: () -> Unit,
content: @Composable () -> Unit
content: @Composable () -> Unit,
modifier: Modifier = Modifier
) {
if (empty) {
emptyContent()
} else {
SwipeRefresh(
state = rememberSwipeRefreshState(loading),
val refreshState = rememberPullToRefreshState()
PullToRefreshBox(
isRefreshing = loading,
onRefresh = onRefresh,
content = content,
content = { content() },
state = refreshState,
indicator = {
Indicator(
modifier = modifier
.align(Alignment.TopCenter)
.padding(),
isRefreshing = loading,
state = refreshState
)
}
)
}
}
Expand Down Expand Up @@ -582,7 +600,7 @@ private fun PostListHistorySection(
*/
@Composable
private fun PostListDivider() {
Divider(
HorizontalDivider(
modifier = Modifier.padding(horizontal = 14.dp),
color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f)
)
Expand Down
39 changes: 17 additions & 22 deletions JetNews/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,55 @@
# Do not add a dependency to an individual sample, edit the global version instead.
#####
[versions]
accompanist = "0.36.0"
androidGradlePlugin = "8.7.2"
accompanist = "0.37.0"
androidGradlePlugin = "8.7.3"
androidx-activity-compose = "1.9.3"
androidx-appcompat = "1.7.0"
androidx-benchmark = "1.2.4"
androidx-benchmark-junit4 = "1.2.4"
androidx-compose-bom = "2024.10.01"
androidx-constraintlayout = "1.1.0-alpha13"
androidx-compose-bom = "2024.12.01"
androidx-constraintlayout = "1.1.0"
androidx-core-splashscreen = "1.0.1"
androidx-corektx = "1.15.0"
androidx-glance = "1.1.0"
androidx-glance = "1.1.1"
androidx-lifecycle = "2.8.2"
androidx-lifecycle-compose = "2.8.7"
androidx-lifecycle-runtime-compose = "2.8.7"
androidx-navigation = "2.8.3"
androidx-navigation = "2.8.5"
androidx-palette = "1.0.0"
androidx-test = "1.6.1"
androidx-test-espresso = "3.6.1"
androidx-test-ext-junit = "1.2.1"
androidx-test-ext-truth = "1.5.0"
androidx-test-ext-truth = "1.6.0"
androidx-tv-foundation = "1.0.0-alpha11"
androidx-tv-material = "1.0.0"
androidx-wear-compose = "1.3.1"
androidx-wear-compose = "1.4.0"
androidx-window = "1.3.0"
androidxHiltNavigationCompose = "1.2.0"
androix-test-uiautomator = "2.3.0"
coil = "2.6.0"
coil = "2.7.0"
# @keep
compileSdk = "35"
coroutines = "1.9.0"
google-maps = "18.2.0"
gradle-versions = "0.51.0"
hilt = "2.51.1"
hilt = "2.53.1"
hiltExt = "1.2.0"
horologist = "0.6.19"
horologist = "0.6.22"
# @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
jdkDesugar = "1.2.2"
junit = "4.13.2"
kotlin = "2.0.21"
kotlin = "2.1.0"
kotlinx-serialization-json = "1.7.3"
kotlinx_immutable = "0.3.8"
ksp = "2.0.20-1.0.24"
ksp = "2.1.0-1.0.29"
maps-compose = "3.1.1"
# @keep
minSdk = "21"
okhttp = "4.11.0"
okhttp = "4.12.0"
play-services-wearable = "18.1.0"
robolectric = "4.13"
roborazzi = "1.12.0"
robolectric = "4.14.1"
roborazzi = "1.37.0"
rome = "1.18.0"
room = "2.6.0"
room = "2.6.1"
secrets = "2.0.1"
# @keep
targetSdk = "33"
Expand All @@ -62,12 +60,9 @@ version-catalog-update = "0.8.5"
[libraries]
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity-compose" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-benchmark-macrobenchmark = { module = "androidx.benchmark:benchmark-macro", version.ref = "androidx-benchmark" }
androidx-benchmark-macrobenchmark-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark-junit4" }
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }
Expand Down
39 changes: 17 additions & 22 deletions Jetcaster/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,55 @@
# Do not add a dependency to an individual sample, edit the global version instead.
#####
[versions]
accompanist = "0.36.0"
androidGradlePlugin = "8.7.2"
accompanist = "0.37.0"
androidGradlePlugin = "8.7.3"
androidx-activity-compose = "1.9.3"
androidx-appcompat = "1.7.0"
androidx-benchmark = "1.2.4"
androidx-benchmark-junit4 = "1.2.4"
androidx-compose-bom = "2024.10.01"
androidx-constraintlayout = "1.1.0-alpha13"
androidx-compose-bom = "2024.12.01"
androidx-constraintlayout = "1.1.0"
androidx-core-splashscreen = "1.0.1"
androidx-corektx = "1.15.0"
androidx-glance = "1.1.0"
androidx-glance = "1.1.1"
androidx-lifecycle = "2.8.2"
androidx-lifecycle-compose = "2.8.7"
androidx-lifecycle-runtime-compose = "2.8.7"
androidx-navigation = "2.8.3"
androidx-navigation = "2.8.5"
androidx-palette = "1.0.0"
androidx-test = "1.6.1"
androidx-test-espresso = "3.6.1"
androidx-test-ext-junit = "1.2.1"
androidx-test-ext-truth = "1.5.0"
androidx-test-ext-truth = "1.6.0"
androidx-tv-foundation = "1.0.0-alpha11"
androidx-tv-material = "1.0.0"
androidx-wear-compose = "1.3.1"
androidx-wear-compose = "1.4.0"
androidx-window = "1.3.0"
androidxHiltNavigationCompose = "1.2.0"
androix-test-uiautomator = "2.3.0"
coil = "2.6.0"
coil = "2.7.0"
# @keep
compileSdk = "35"
coroutines = "1.9.0"
google-maps = "18.2.0"
gradle-versions = "0.51.0"
hilt = "2.51.1"
hilt = "2.53.1"
hiltExt = "1.2.0"
horologist = "0.6.19"
horologist = "0.6.22"
# @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
jdkDesugar = "1.2.2"
junit = "4.13.2"
kotlin = "2.0.21"
kotlin = "2.1.0"
kotlinx-serialization-json = "1.7.3"
kotlinx_immutable = "0.3.8"
ksp = "2.0.20-1.0.24"
ksp = "2.1.0-1.0.29"
maps-compose = "3.1.1"
# @keep
minSdk = "21"
okhttp = "4.11.0"
okhttp = "4.12.0"
play-services-wearable = "18.1.0"
robolectric = "4.13"
roborazzi = "1.12.0"
robolectric = "4.14.1"
roborazzi = "1.37.0"
rome = "1.18.0"
room = "2.6.0"
room = "2.6.1"
secrets = "2.0.1"
# @keep
targetSdk = "33"
Expand All @@ -62,12 +60,9 @@ version-catalog-update = "0.8.5"
[libraries]
accompanist-adaptive = { module = "com.google.accompanist:accompanist-adaptive", version.ref = "accompanist" }
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
accompanist-swiperefresh = { module = "com.google.accompanist:accompanist-swiperefresh", version.ref = "accompanist" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity-compose" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
androidx-benchmark-macrobenchmark = { module = "androidx.benchmark:benchmark-macro", version.ref = "androidx-benchmark" }
androidx-benchmark-macrobenchmark-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark-junit4" }
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidx-compose-bom" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }
Expand Down
Loading

0 comments on commit 482c117

Please sign in to comment.