Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
Update dependencies versions (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirmanak authored Feb 17, 2024
1 parent c03c65a commit 7461dec
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ internal fun SearchTextField(
),
singleLine = true,
colors = TextFieldDefaults.colors(
focusedIndicatorColor = Color.Unspecified,
unfocusedIndicatorColor = Color.Unspecified,
disabledIndicatorColor = Color.Unspecified,
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
disabledIndicatorColor = Color.Transparent,
errorIndicatorColor = Color.Transparent
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ import androidx.compose.material.icons.filled.Edit
import androidx.compose.material.icons.filled.NoMeals
import androidx.compose.material.icons.filled.Restaurant
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.ExperimentalMaterial3Api
import androidx.compose.material3.ExposedDropdownMenuBox
import androidx.compose.material3.ExposedDropdownMenuDefaults
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
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.rememberDismissState
import androidx.compose.material3.rememberSwipeToDismissBoxState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
Expand Down Expand Up @@ -516,22 +516,22 @@ fun ShoppingListItem(
onCheckedChange: (Boolean) -> Unit = {},
onDismissed: () -> Unit = {},
onEditStart: () -> Unit = {},
dismissState: DismissState = rememberDismissState(
dismissState: SwipeToDismissBoxState = rememberSwipeToDismissBoxState(
confirmValueChange = {
when (it) {
DismissValue.DismissedToStart -> onDismissed()
DismissValue.DismissedToEnd -> onEditStart()
DismissValue.Default -> Unit
SwipeToDismissBoxValue.EndToStart -> onDismissed()
SwipeToDismissBoxValue.StartToEnd -> onEditStart()
SwipeToDismissBoxValue.Settled -> Unit
}
true
}
),
) {
val shoppingListItem = itemState.item
SwipeToDismiss(
SwipeToDismissBox(
state = dismissState,
background = {
if (dismissState.targetValue == DismissValue.DismissedToStart) {
backgroundContent = {
if (dismissState.targetValue == SwipeToDismissBoxValue.EndToStart) {
val color by animateColorAsState(MaterialTheme.colorScheme.error)
val iconColor by animateColorAsState(MaterialTheme.colorScheme.onError)
Box(
Expand All @@ -548,7 +548,7 @@ fun ShoppingListItem(
.padding(end = Dimens.Small)
)
}
} else if (dismissState.targetValue == DismissValue.DismissedToEnd) {
} else if (dismissState.targetValue == SwipeToDismissBoxValue.StartToEnd) {
val color by animateColorAsState(MaterialTheme.colorScheme.primary)
val iconColor by animateColorAsState(MaterialTheme.colorScheme.onPrimary)
Box(
Expand All @@ -567,14 +567,14 @@ fun ShoppingListItem(
}
}
},
dismissContent = {
content = {
Column(
modifier = Modifier
.fillMaxWidth()
.background(MaterialTheme.colorScheme.surface),
) {
if (showDivider) {
Divider()
HorizontalDivider()
}
Row(
verticalAlignment = Alignment.CenterVertically,
Expand Down Expand Up @@ -637,8 +637,8 @@ fun PreviewShoppingListItemDismissed() {
ShoppingListItem(
itemState = ShoppingListItemState.ExistingItem(PreviewData.blackTeaBags),
showDivider = false,
dismissState = rememberDismissState(
initialValue = DismissValue.DismissedToStart,
dismissState = rememberSwipeToDismissBoxState(
initialValue = SwipeToDismissBoxValue.EndToStart,
),
)
}
Expand All @@ -652,8 +652,8 @@ fun PreviewShoppingListItemEditing() {
ShoppingListItem(
itemState = ShoppingListItemState.ExistingItem(PreviewData.blackTeaBags),
showDivider = false,
dismissState = rememberDismissState(
initialValue = DismissValue.DismissedToEnd,
dismissState = rememberSwipeToDismissBoxState(
initialValue = SwipeToDismissBoxValue.StartToEnd,
),
)
}
Expand Down
26 changes: 13 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]
# 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
kotlin = "1.9.22"
# https://dagger.dev/hilt/gradle-setup
hilt = "2.50"
# https://github.com/protocolbuffers/protobuf/releases
protobuf = "3.25.2"
protobuf = "3.25.3"
# https://github.com/google/protobuf-gradle-plugin/releases
protobufPlugin = "0.9.4"
# https://plugins.gradle.org/plugin/org.sonarqube
Expand All @@ -26,7 +26,7 @@ lifecycle = "2.7.0"
# https://developer.android.com/jetpack/androidx/releases/arch-core
coreTesting = "2.2.0"
# https://github.com/Kotlin/kotlinx.serialization/releases
kotlinxSerialization = "1.6.2"
kotlinxSerialization = "1.6.3"
# https://github.com/square/okhttp/tags
okhttp = "4.12.0"
# https://developer.android.com/jetpack/androidx/releases/paging
Expand All @@ -42,11 +42,11 @@ security = "1.0.0"
# https://github.com/junit-team/junit4/releases
junit = "4.13.2"
# https://github.com/Kotlin/kotlinx.coroutines/releases
coroutines = "1.7.3"
coroutines = "1.8.0"
# https://github.com/robolectric/robolectric/releases
robolectric = "4.11.1"
# https://mvnrepository.com/artifact/com.google.truth/truth
truth = "1.2.0"
truth = "1.4.0"
# https://mockk.io/
mockk = "1.13.9"
# https://github.com/square/leakcanary/releases
Expand All @@ -56,31 +56,31 @@ chucker = "4.0.0"
# https://github.com/google/desugar_jdk_libs/blob/master/CHANGELOG.md
desugar = "2.0.4"
# 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
shareTarget = "1.2.0"
# https://github.com/KasperskyLab/Kaspresso/releases
kaspresso = "1.5.3"
kaspresso = "1.5.4"
# https://developer.android.com/jetpack/androidx/releases/test
androidXTestCore = "1.5.0"
androidXTestRules = "1.5.0"
androidXTestRunner = "1.5.2"
androidXTestOrchestrator = "1.4.2"
junitKtx = "1.1.5"
# 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
composeKotlinCompilerExtension = "1.5.8"
composeKotlinCompilerExtension = "1.5.9"
# https://google.github.io/accompanist/
accompanistVersion = "0.32.0"
accompanistVersion = "0.34.0"
# https://developer.android.com/jetpack/androidx/releases/compose-material
materialCompose = "1.5.4"
materialCompose = "1.6.1"
# https://github.com/raamcosta/compose-destinations/releases
composeDestinations = "1.9.59"
composeDestinations = "1.9.63"
# https://developer.android.com/jetpack/androidx/releases/hilt
androidxHilt = "1.1.0"
# https://github.com/ktorio/ktor/releases
ktor = "2.3.7"
ktor = "2.3.8"
# https://github.com/coil-kt/coil/releases
coil = "2.5.0"
# https://github.com/Kotlin/kotlinx-kover/releases
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=9d926787066a081739e8200858338b4a69e837c3a821a33aca9db09dd4a41026
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionSha256Sum=9631d53cf3e74bfa726893aee1f8994fee4e060c401335946dba2156f440f24c
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 7461dec

Please sign in to comment.