Update dependencies versions (#203)

This commit is contained in:
Kirill Kamakin
2024-02-17 11:22:34 +01:00
committed by GitHub
parent c03c65a96b
commit 7461decd73
4 changed files with 38 additions and 37 deletions

View File

@@ -51,9 +51,10 @@ internal fun SearchTextField(
), ),
singleLine = true, singleLine = true,
colors = TextFieldDefaults.colors( colors = TextFieldDefaults.colors(
focusedIndicatorColor = Color.Unspecified, focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Unspecified, unfocusedIndicatorColor = Color.Transparent,
disabledIndicatorColor = Color.Unspecified, disabledIndicatorColor = Color.Transparent,
errorIndicatorColor = Color.Transparent
) )
) )
} }

View File

@@ -21,21 +21,21 @@ import androidx.compose.material.icons.filled.Edit
import androidx.compose.material.icons.filled.NoMeals import androidx.compose.material.icons.filled.NoMeals
import androidx.compose.material.icons.filled.Restaurant import androidx.compose.material.icons.filled.Restaurant
import androidx.compose.material3.Checkbox import androidx.compose.material3.Checkbox
import androidx.compose.material3.DismissState
import androidx.compose.material3.DismissValue
import androidx.compose.material3.Divider
import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.ExposedDropdownMenuBox import androidx.compose.material3.ExposedDropdownMenuBox
import androidx.compose.material3.ExposedDropdownMenuDefaults import androidx.compose.material3.ExposedDropdownMenuDefaults
import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.SwipeToDismiss import androidx.compose.material3.SwipeToDismissBox
import androidx.compose.material3.SwipeToDismissBoxState
import androidx.compose.material3.SwipeToDismissBoxValue
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.material3.rememberDismissState import androidx.compose.material3.rememberSwipeToDismissBoxState
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState import androidx.compose.runtime.collectAsState
@@ -516,22 +516,22 @@ fun ShoppingListItem(
onCheckedChange: (Boolean) -> Unit = {}, onCheckedChange: (Boolean) -> Unit = {},
onDismissed: () -> Unit = {}, onDismissed: () -> Unit = {},
onEditStart: () -> Unit = {}, onEditStart: () -> Unit = {},
dismissState: DismissState = rememberDismissState( dismissState: SwipeToDismissBoxState = rememberSwipeToDismissBoxState(
confirmValueChange = { confirmValueChange = {
when (it) { when (it) {
DismissValue.DismissedToStart -> onDismissed() SwipeToDismissBoxValue.EndToStart -> onDismissed()
DismissValue.DismissedToEnd -> onEditStart() SwipeToDismissBoxValue.StartToEnd -> onEditStart()
DismissValue.Default -> Unit SwipeToDismissBoxValue.Settled -> Unit
} }
true true
} }
), ),
) { ) {
val shoppingListItem = itemState.item val shoppingListItem = itemState.item
SwipeToDismiss( SwipeToDismissBox(
state = dismissState, state = dismissState,
background = { backgroundContent = {
if (dismissState.targetValue == DismissValue.DismissedToStart) { if (dismissState.targetValue == SwipeToDismissBoxValue.EndToStart) {
val color by animateColorAsState(MaterialTheme.colorScheme.error) val color by animateColorAsState(MaterialTheme.colorScheme.error)
val iconColor by animateColorAsState(MaterialTheme.colorScheme.onError) val iconColor by animateColorAsState(MaterialTheme.colorScheme.onError)
Box( Box(
@@ -548,7 +548,7 @@ fun ShoppingListItem(
.padding(end = Dimens.Small) .padding(end = Dimens.Small)
) )
} }
} else if (dismissState.targetValue == DismissValue.DismissedToEnd) { } else if (dismissState.targetValue == SwipeToDismissBoxValue.StartToEnd) {
val color by animateColorAsState(MaterialTheme.colorScheme.primary) val color by animateColorAsState(MaterialTheme.colorScheme.primary)
val iconColor by animateColorAsState(MaterialTheme.colorScheme.onPrimary) val iconColor by animateColorAsState(MaterialTheme.colorScheme.onPrimary)
Box( Box(
@@ -567,14 +567,14 @@ fun ShoppingListItem(
} }
} }
}, },
dismissContent = { content = {
Column( Column(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.background(MaterialTheme.colorScheme.surface), .background(MaterialTheme.colorScheme.surface),
) { ) {
if (showDivider) { if (showDivider) {
Divider() HorizontalDivider()
} }
Row( Row(
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
@@ -637,8 +637,8 @@ fun PreviewShoppingListItemDismissed() {
ShoppingListItem( ShoppingListItem(
itemState = ShoppingListItemState.ExistingItem(PreviewData.blackTeaBags), itemState = ShoppingListItemState.ExistingItem(PreviewData.blackTeaBags),
showDivider = false, showDivider = false,
dismissState = rememberDismissState( dismissState = rememberSwipeToDismissBoxState(
initialValue = DismissValue.DismissedToStart, initialValue = SwipeToDismissBoxValue.EndToStart,
), ),
) )
} }
@@ -652,8 +652,8 @@ fun PreviewShoppingListItemEditing() {
ShoppingListItem( ShoppingListItem(
itemState = ShoppingListItemState.ExistingItem(PreviewData.blackTeaBags), itemState = ShoppingListItemState.ExistingItem(PreviewData.blackTeaBags),
showDivider = false, showDivider = false,
dismissState = rememberDismissState( dismissState = rememberSwipeToDismissBoxState(
initialValue = DismissValue.DismissedToEnd, initialValue = SwipeToDismissBoxValue.StartToEnd,
), ),
) )
} }

View File

@@ -1,12 +1,12 @@
[versions] [versions]
# https://maven.google.com/web/index.html?q=com.android.tools.build#com.android.tools.build:gradle # https://maven.google.com/web/index.html?q=com.android.tools.build#com.android.tools.build:gradle
androidGradlePlugin = "8.1.4" androidGradlePlugin = "8.2.2"
# https://github.com/JetBrains/kotlin/releases # https://github.com/JetBrains/kotlin/releases
kotlin = "1.9.22" kotlin = "1.9.22"
# https://dagger.dev/hilt/gradle-setup # https://dagger.dev/hilt/gradle-setup
hilt = "2.50" hilt = "2.50"
# https://github.com/protocolbuffers/protobuf/releases # https://github.com/protocolbuffers/protobuf/releases
protobuf = "3.25.2" protobuf = "3.25.3"
# https://github.com/google/protobuf-gradle-plugin/releases # https://github.com/google/protobuf-gradle-plugin/releases
protobufPlugin = "0.9.4" protobufPlugin = "0.9.4"
# https://plugins.gradle.org/plugin/org.sonarqube # https://plugins.gradle.org/plugin/org.sonarqube
@@ -26,7 +26,7 @@ lifecycle = "2.7.0"
# https://developer.android.com/jetpack/androidx/releases/arch-core # https://developer.android.com/jetpack/androidx/releases/arch-core
coreTesting = "2.2.0" coreTesting = "2.2.0"
# https://github.com/Kotlin/kotlinx.serialization/releases # https://github.com/Kotlin/kotlinx.serialization/releases
kotlinxSerialization = "1.6.2" kotlinxSerialization = "1.6.3"
# https://github.com/square/okhttp/tags # https://github.com/square/okhttp/tags
okhttp = "4.12.0" okhttp = "4.12.0"
# https://developer.android.com/jetpack/androidx/releases/paging # https://developer.android.com/jetpack/androidx/releases/paging
@@ -42,11 +42,11 @@ security = "1.0.0"
# https://github.com/junit-team/junit4/releases # https://github.com/junit-team/junit4/releases
junit = "4.13.2" junit = "4.13.2"
# https://github.com/Kotlin/kotlinx.coroutines/releases # https://github.com/Kotlin/kotlinx.coroutines/releases
coroutines = "1.7.3" coroutines = "1.8.0"
# https://github.com/robolectric/robolectric/releases # https://github.com/robolectric/robolectric/releases
robolectric = "4.11.1" robolectric = "4.11.1"
# https://mvnrepository.com/artifact/com.google.truth/truth # https://mvnrepository.com/artifact/com.google.truth/truth
truth = "1.2.0" truth = "1.4.0"
# https://mockk.io/ # https://mockk.io/
mockk = "1.13.9" mockk = "1.13.9"
# https://github.com/square/leakcanary/releases # https://github.com/square/leakcanary/releases
@@ -56,11 +56,11 @@ chucker = "4.0.0"
# https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md # https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md
desugar = "2.0.4" desugar = "2.0.4"
# https://github.com/google/ksp/releases # https://github.com/google/ksp/releases
kspPlugin = "1.9.22-1.0.16" kspPlugin = "1.9.22-1.0.17"
# https://developer.android.com/jetpack/androidx/releases/sharetarget # https://developer.android.com/jetpack/androidx/releases/sharetarget
shareTarget = "1.2.0" shareTarget = "1.2.0"
# https://github.com/KasperskyLab/Kaspresso/releases # https://github.com/KasperskyLab/Kaspresso/releases
kaspresso = "1.5.3" kaspresso = "1.5.4"
# https://developer.android.com/jetpack/androidx/releases/test # https://developer.android.com/jetpack/androidx/releases/test
androidXTestCore = "1.5.0" androidXTestCore = "1.5.0"
androidXTestRules = "1.5.0" androidXTestRules = "1.5.0"
@@ -68,19 +68,19 @@ androidXTestRunner = "1.5.2"
androidXTestOrchestrator = "1.4.2" androidXTestOrchestrator = "1.4.2"
junitKtx = "1.1.5" junitKtx = "1.1.5"
# https://mvnrepository.com/artifact/androidx.compose/compose-bom # https://mvnrepository.com/artifact/androidx.compose/compose-bom
composeBom = "2023.10.01" composeBom = "2024.02.00"
# https://developer.android.com/jetpack/androidx/releases/compose-kotlin # https://developer.android.com/jetpack/androidx/releases/compose-kotlin
composeKotlinCompilerExtension = "1.5.8" composeKotlinCompilerExtension = "1.5.9"
# https://google.github.io/accompanist/ # https://google.github.io/accompanist/
accompanistVersion = "0.32.0" accompanistVersion = "0.34.0"
# https://developer.android.com/jetpack/androidx/releases/compose-material # https://developer.android.com/jetpack/androidx/releases/compose-material
materialCompose = "1.5.4" materialCompose = "1.6.1"
# https://github.com/raamcosta/compose-destinations/releases # https://github.com/raamcosta/compose-destinations/releases
composeDestinations = "1.9.59" composeDestinations = "1.9.63"
# https://developer.android.com/jetpack/androidx/releases/hilt # https://developer.android.com/jetpack/androidx/releases/hilt
androidxHilt = "1.1.0" androidxHilt = "1.1.0"
# https://github.com/ktorio/ktor/releases # https://github.com/ktorio/ktor/releases
ktor = "2.3.7" ktor = "2.3.8"
# https://github.com/coil-kt/coil/releases # https://github.com/coil-kt/coil/releases
coil = "2.5.0" coil = "2.5.0"
# https://github.com/Kotlin/kotlinx-kover/releases # https://github.com/Kotlin/kotlinx-kover/releases

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026 distributionSha256Sum=9631d53cf3e74bfa726893aee1f8994fee4e060c401335946dba2156f440f24c
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists