diff --git a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/preview/PreviewResource.kt b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/preview/PreviewResource.kt index 3dd00beb..0a8700ba 100644 --- a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/preview/PreviewResource.kt +++ b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/preview/PreviewResource.kt @@ -12,6 +12,7 @@ import com.patrykandpatryk.liftapp.domain.text.StringProvider import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.flowOf +import kotlinx.coroutines.flow.update object PreviewResource { val stringProvider: StringProvider @@ -46,6 +47,10 @@ object PreviewResource { override suspend fun set(value: T) { flow.value = value } + + override suspend fun update(function: (T) -> T) { + flow.update(function) + } } } } diff --git a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/Backdrop.kt b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/Backdrop.kt index 88995338..58b2669b 100644 --- a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/Backdrop.kt +++ b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/Backdrop.kt @@ -1,10 +1,13 @@ package com.patrykandpatryk.liftapp.core.ui -import androidx.compose.animation.core.spring -import androidx.compose.animation.splineBasedDecay +import androidx.compose.animation.core.LinearOutSlowInEasing +import androidx.compose.animation.core.tween +import androidx.compose.foundation.gestures.AnchoredDraggableDefaults import androidx.compose.foundation.gestures.AnchoredDraggableState import androidx.compose.foundation.gestures.DraggableAnchors +import androidx.compose.foundation.gestures.FlingBehavior import androidx.compose.foundation.gestures.Orientation +import androidx.compose.foundation.gestures.ScrollScope import androidx.compose.foundation.gestures.anchoredDraggable import androidx.compose.foundation.layout.Box import androidx.compose.runtime.Composable @@ -16,56 +19,40 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.geometry.Offset import androidx.compose.ui.input.nestedscroll.NestedScrollConnection import androidx.compose.ui.input.nestedscroll.NestedScrollSource +import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.layout.Layout -import androidx.compose.ui.platform.LocalDensity -import androidx.compose.ui.unit.Density import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.Velocity -import androidx.compose.ui.unit.dp import kotlin.math.roundToInt enum class BackdropValue { - Opened, + Open, Closed, } @Immutable -data class BackdropState( - val initialState: BackdropValue = BackdropValue.Closed, - private val density: Density, -) { - internal val anchoredDraggableState = - AnchoredDraggableState( - initialValue = BackdropValue.Closed, - positionalThreshold = { distance -> distance / 2 }, - velocityThreshold = { with(density) { 200.dp.toPx() } }, - snapAnimationSpec = spring(), - decayAnimationSpec = splineBasedDecay(density), - ) - - val nestedScrollConnection: NestedScrollConnection = - BackdropNestedScrollConnection(anchoredDraggableState) +data class BackdropState(val initialValue: BackdropValue) { + internal val anchoredDraggableState = AnchoredDraggableState(initialValue) - val isOpened: Boolean by derivedStateOf { - anchoredDraggableState.currentValue == BackdropValue.Opened + val isOpen: Boolean by derivedStateOf { + anchoredDraggableState.currentValue == BackdropValue.Open } val offset: Float by derivedStateOf { - anchoredDraggableState.offset - anchoredDraggableState.anchors.minAnchor() + anchoredDraggableState.offset - + anchoredDraggableState.anchors.positionOf(BackdropValue.Closed) } val offsetFraction: Float by derivedStateOf { offset / - (anchoredDraggableState.anchors.maxAnchor() - - anchoredDraggableState.anchors.minAnchor()) + (anchoredDraggableState.anchors.positionOf(BackdropValue.Open) - + anchoredDraggableState.anchors.positionOf(BackdropValue.Closed)) } } @Composable -fun rememberBackdropState(initialState: BackdropValue = BackdropValue.Closed): BackdropState { - val density = LocalDensity.current - return remember(initialState, density) { BackdropState(initialState, density) } -} +fun rememberBackdropState(initialState: BackdropValue = BackdropValue.Closed) = + remember(initialState) { BackdropState(initialState) } @Composable fun Backdrop( @@ -76,10 +63,19 @@ fun Backdrop( state: BackdropState = rememberBackdropState(), content: @Composable () -> Unit, ) { + val flingBehavior = + AnchoredDraggableDefaults.flingBehavior( + state = state.anchoredDraggableState, + animationSpec = tween(easing = LinearOutSlowInEasing), + ) + val scrollConnection = + remember(state.anchoredDraggableState, flingBehavior) { + BackdropNestedScrollConnection(state.anchoredDraggableState, flingBehavior) + } Layout( content = { Box { backContent() } - Box { content() } + Box(Modifier.nestedScroll(scrollConnection)) { content() } }, measurePolicy = { measurables, constraints -> val backdrop = measurables[0].measure(constraints) @@ -96,8 +92,8 @@ fun Backdrop( state.anchoredDraggableState.updateAnchors( DraggableAnchors { + BackdropValue.Open at backdropOpenLength BackdropValue.Closed at backPeekHeight.toPx() - BackdropValue.Opened at backdropOpenLength } ) layout(constraints.maxWidth, constraints.maxHeight) { @@ -105,25 +101,32 @@ fun Backdrop( front.place(0, state.anchoredDraggableState.offset.roundToInt()) } }, - modifier = modifier.anchoredDraggable(state.anchoredDraggableState, Orientation.Vertical), + modifier = + modifier.anchoredDraggable( + state = state.anchoredDraggableState, + orientation = Orientation.Vertical, + flingBehavior = flingBehavior, + ), ) } private class BackdropNestedScrollConnection( - private val anchoredDraggableState: AnchoredDraggableState + private val anchoredDraggableState: AnchoredDraggableState, + private val flingBehavior: FlingBehavior, ) : NestedScrollConnection { - var blockDrag: Boolean? = null - var blockScroll: Boolean? = null + var lastPositiveScrollSource: NestedScrollSource? = null + val scrollScope = + object : ScrollScope { + override fun scrollBy(pixels: Float) = anchoredDraggableState.dispatchRawDelta(pixels) + } - override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset = + override fun onPreScroll(available: Offset, source: NestedScrollSource) = if ( - blockScroll == true || - available.y < 0 && - anchoredDraggableState.offset != anchoredDraggableState.anchors.minAnchor() + available.y < 0 && + anchoredDraggableState.offset != + anchoredDraggableState.anchors.positionOf(BackdropValue.Closed) ) { - blockScroll = true - anchoredDraggableState.dispatchRawDelta(available.y) - available + Offset(0f, anchoredDraggableState.dispatchRawDelta(available.y)) } else { Offset.Zero } @@ -133,43 +136,36 @@ private class BackdropNestedScrollConnection( available: Offset, source: NestedScrollSource, ): Offset { - if (blockDrag == null) blockDrag = available.y == 0f - return when { - available.y > 0 -> { - val consumedY = - if (blockDrag == true) { - 0f - } else { - anchoredDraggableState.dispatchRawDelta(available.y) - } - Offset(available.x, consumedY) - } - - blockScroll == true -> Offset(0f, available.y) - else -> Offset.Zero + if (available.y <= 0) return Offset.Zero + lastPositiveScrollSource = source + return if (source == NestedScrollSource.UserInput) { + Offset(0f, anchoredDraggableState.dispatchRawDelta(available.y)) + } else { + Offset.Zero } } - override suspend fun onPreFling(available: Velocity): Velocity = + override suspend fun onPreFling(available: Velocity) = if ( available.y < 0 && - anchoredDraggableState.offset != anchoredDraggableState.anchors.minAnchor() + anchoredDraggableState.offset != + anchoredDraggableState.anchors.positionOf(BackdropValue.Closed) ) { - anchoredDraggableState.settle(available.y / 4) + with(flingBehavior) { scrollScope.performFling(available.y) } Velocity(0f, available.y) } else { - val consumedVelocityY = - when { - available.y > 0f && blockDrag == true -> 0f - blockScroll == true -> available.y - else -> anchoredDraggableState.settle(available.y) - } - Velocity(0f, consumedVelocityY) + Velocity.Zero } - override suspend fun onPostFling(consumed: Velocity, available: Velocity): Velocity { - blockDrag = null - blockScroll = null - return Velocity(0f, anchoredDraggableState.settle(available.y)) - } + override suspend fun onPostFling(consumed: Velocity, available: Velocity) = + if ( + available.y >= 0 && + lastPositiveScrollSource != null && + lastPositiveScrollSource == NestedScrollSource.UserInput + ) { + with(flingBehavior) { scrollScope.performFling(available.y) } + Velocity(0f, available.y) + } else { + Velocity.Zero + } } diff --git a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/dimens/Dimens.kt b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/dimens/Dimens.kt index 4794c5b2..d16e2364 100644 --- a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/dimens/Dimens.kt +++ b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/dimens/Dimens.kt @@ -116,7 +116,6 @@ data class Dimens( @Immutable data class Swipe( val fractionalThreshold: Float = .4f, - val velocityThreshold: Dp = 124.dp, val backgroundVisibilityThreshold: Dp = 56.dp, val swipeElevation: Dp = 2.dp, ) diff --git a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/input/TimePicker.kt b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/input/TimePicker.kt index 19c7171f..1277a48e 100644 --- a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/input/TimePicker.kt +++ b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/input/TimePicker.kt @@ -305,7 +305,7 @@ fun rememberTimePickerState( minute: Int, is24h: Boolean = true, ) = - remember(keys = arrayOf(is24h, hour, minute)) { + remember(is24h, hour, minute) { TimePickerState(isShowing = isShowing, hour = hour, minute = minute, is24h = is24h) } diff --git a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/swipe/SwipeContainer.kt b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/swipe/SwipeContainer.kt index e2e8d049..32524ede 100644 --- a/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/swipe/SwipeContainer.kt +++ b/core/src/main/kotlin/com/patrykandpatryk/liftapp/core/ui/swipe/SwipeContainer.kt @@ -1,8 +1,6 @@ package com.patrykandpatryk.liftapp.core.ui.swipe import androidx.compose.animation.core.animateFloatAsState -import androidx.compose.animation.core.spring -import androidx.compose.animation.splineBasedDecay import androidx.compose.foundation.background import androidx.compose.foundation.gestures.AnchoredDraggableState import androidx.compose.foundation.gestures.DraggableAnchors @@ -30,7 +28,6 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.layout.Layout -import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.Constraints import androidx.compose.ui.zIndex @@ -47,20 +44,7 @@ fun SwipeContainer( modifier: Modifier = Modifier, onDismiss: () -> Unit, ) { - val dimens = LocalDimens.current - val density = LocalDensity.current - val velocityThreshold = with(density) { dimens.swipe.velocityThreshold.toPx() } - - val anchoredDraggableState = remember { - AnchoredDraggableState( - initialValue = SwipeContainerState.Idle, - positionalThreshold = { dimens.swipe.fractionalThreshold * it }, - velocityThreshold = { velocityThreshold }, - snapAnimationSpec = spring(), - decayAnimationSpec = splineBasedDecay(density), - ) - } - + val anchoredDraggableState = remember { AnchoredDraggableState(SwipeContainerState.Idle) } val swipeOffset = anchoredDraggableState.offset.takeIf { it.isFinite() }.orZero var containerWidth by remember { mutableFloatStateOf(1f) } val swipeProgress = swipeOffset / containerWidth diff --git a/domain-testing/src/main/kotlin/com/patrykandpatryk/liftapp/testing/TestPreferenceRepository.kt b/domain-testing/src/main/kotlin/com/patrykandpatryk/liftapp/testing/TestPreferenceRepository.kt index 5d4de5d9..7966addc 100644 --- a/domain-testing/src/main/kotlin/com/patrykandpatryk/liftapp/testing/TestPreferenceRepository.kt +++ b/domain-testing/src/main/kotlin/com/patrykandpatryk/liftapp/testing/TestPreferenceRepository.kt @@ -12,6 +12,7 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.update class TestPreferenceRepository : PreferenceRepository { @@ -67,5 +68,9 @@ class TestPreferenceRepository : PreferenceRepository { override suspend fun set(value: T) { impl.value = value } + + override suspend fun update(function: (T) -> T) { + impl.update(function) + } } } diff --git a/feature/newexercise/src/main/java/com/patrykandpatryk/liftapp/feature/newexercise/ui/DropdownMenus.kt b/feature/newexercise/src/main/java/com/patrykandpatryk/liftapp/feature/newexercise/ui/DropdownMenus.kt index 9d9d7a4d..02bdf266 100644 --- a/feature/newexercise/src/main/java/com/patrykandpatryk/liftapp/feature/newexercise/ui/DropdownMenus.kt +++ b/feature/newexercise/src/main/java/com/patrykandpatryk/liftapp/feature/newexercise/ui/DropdownMenus.kt @@ -3,10 +3,10 @@ package com.patrykandpatryk.liftapp.feature.newexercise.ui import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.material3.DropdownMenuItem +import androidx.compose.material3.ExposedDropdownMenuAnchorType import androidx.compose.material3.ExposedDropdownMenuBox import androidx.compose.material3.ExposedDropdownMenuDefaults import androidx.compose.material3.Icon -import androidx.compose.material3.MenuAnchorType import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.Surface import androidx.compose.material3.Text @@ -79,7 +79,9 @@ fun DropdownMenu( ) { Column { OutlinedTextField( - modifier = Modifier.menuAnchor(MenuAnchorType.PrimaryNotEditable).fillMaxWidth(), + modifier = + Modifier.menuAnchor(ExposedDropdownMenuAnchorType.PrimaryNotEditable) + .fillMaxWidth(), readOnly = true, value = getItemsText(selectedItems), onValueChange = {}, diff --git a/feature/workout/src/main/kotlin/com/patrykandpatrick/liftapp/feature/workout/ui/ExerciseListPicker.kt b/feature/workout/src/main/kotlin/com/patrykandpatrick/liftapp/feature/workout/ui/ExerciseListPicker.kt index bfb65d93..6ee8317b 100644 --- a/feature/workout/src/main/kotlin/com/patrykandpatrick/liftapp/feature/workout/ui/ExerciseListPicker.kt +++ b/feature/workout/src/main/kotlin/com/patrykandpatrick/liftapp/feature/workout/ui/ExerciseListPicker.kt @@ -58,12 +58,12 @@ fun ExerciseListPicker( text = exercise.name.getDisplayName(), style = MaterialTheme.typography.titleLarge, modifier = - Modifier.onPositionChange { offset, viewPortOffset -> + Modifier.onPositionChange { offset, _ -> positionOffset.floatValue = abs(offset) } .graphicsLayer { alpha = - if (positionOffset.floatValue == 0f || !backdropState.isOpened) { + if (positionOffset.floatValue == 0f || !backdropState.isOpen) { 1f } else { backdropState.offsetFraction diff --git a/feature/workout/src/main/kotlin/com/patrykandpatrick/liftapp/feature/workout/ui/WorkoutScreen.kt b/feature/workout/src/main/kotlin/com/patrykandpatrick/liftapp/feature/workout/ui/WorkoutScreen.kt index d629d53d..e2489192 100644 --- a/feature/workout/src/main/kotlin/com/patrykandpatrick/liftapp/feature/workout/ui/WorkoutScreen.kt +++ b/feature/workout/src/main/kotlin/com/patrykandpatrick/liftapp/feature/workout/ui/WorkoutScreen.kt @@ -19,7 +19,6 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier -import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel @@ -93,7 +92,7 @@ fun WorkoutScreen( state = backdropState, modifier = Modifier.padding(paddingValues).imePadding(), ) { - Column(modifier = Modifier.nestedScroll(backdropState.nestedScrollConnection)) { + Column { SinHorizontalDivider( bottomBackgroundColor = MaterialTheme.colorScheme.background ) diff --git a/functionality/preference/src/main/kotlin/com/patrykandpatryk/liftapp/functionality/preference/repository/PreferenceRepositoryImpl.kt b/functionality/preference/src/main/kotlin/com/patrykandpatryk/liftapp/functionality/preference/repository/PreferenceRepositoryImpl.kt index cc97f94e..532c0941 100644 --- a/functionality/preference/src/main/kotlin/com/patrykandpatryk/liftapp/functionality/preference/repository/PreferenceRepositoryImpl.kt +++ b/functionality/preference/src/main/kotlin/com/patrykandpatryk/liftapp/functionality/preference/repository/PreferenceRepositoryImpl.kt @@ -27,10 +27,8 @@ private const val KEY_GOAL_INFO_VISIBLE = "goal_info_visible" class PreferenceRepositoryImpl @Inject -constructor( - override val preferencesDataStore: DataStore, - private val application: Application, -) : PreferenceRepository, PreferenceManager { +constructor(override val dataStore: DataStore, private val application: Application) : + PreferenceRepository, PreferenceManager { override val massUnit = enumPreference(KEY_MASS_UNIT, MassUnit.Kilograms) @@ -62,15 +60,15 @@ constructor( } override val allPreferences = - preferencesDataStore.data.map { preferences -> - val longDistanceUnit = longDistanceUnit.getFromPreferences(preferences = preferences) + dataStore.data.map { preferences -> + val longDistanceUnit = longDistanceUnit.get(preferences) AllPreferences( - massUnit = massUnit.getFromPreferences(preferences = preferences), + massUnit = massUnit.get(preferences), longDistanceUnit = longDistanceUnit, mediumDistanceUnit = longDistanceUnit.getCorrespondingMediumDistanceUnit(), shortDistanceUnit = longDistanceUnit.getCorrespondingShortDistanceUnit(), - hourFormat = hourFormat.getFromPreferences(preferences = preferences), + hourFormat = hourFormat.get(preferences), ) } } @@ -78,7 +76,7 @@ constructor( private inline fun > PreferenceManager.enumPreference( key: String, defaultValue: E, -): PreferenceImpl = +): PreferenceImpl = preference( stringPreferencesKey(key), defaultValue = defaultValue, diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e28b4d2a..bc707ddb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,45 +1,45 @@ [versions] -activity = "1.9.3" +activity = "1.10.0-rc01" appcompat = "1.7.0" -coil = "2.2.2" -compose = "1.7.5" -composeNavigation = "2.8.4" +coil = "2.7.0" +composeBom = "2024.12.01" +composeNavigation = "2.9.0-alpha04" coroutines = "1.9.0" datastore = "1.1.1" documentfile = "1.1.0-alpha01" -hilt = "2.52" +hilt = "2.53.1" hiltNavigation = "1.2.0" -immutableCollections = "0.3.7" +immutableCollections = "0.3.8" junit = "4.13.2" jupiter = "5.11.3" -kotlin = "2.0.21" +kotlin = "2.1.0" kotlinxSerialization = "1.7.3" -kotlinxSerializationConverter = "0.8.0" -lifecycle = "2.8.7" -material3 = "1.3.1" -material3Adaptive = "1.1.0-alpha07" -opto = "1.1.0" +kotlinxSerializationConverter = "1.0.0" +lifecycle = "2.9.0-alpha08" +opto = "1.2.0" retrofit = "2.11.0" -room = "2.6.1" -viewmodel = "2.8.7" +room = "2.7.0-alpha12" +viewmodel = "2.9.0-alpha08" timber = "5.0.1" -vico = "1.13.0-alpha.9" +vico = "1.16.0" androidPlugin = "8.7.3" -kspPlugin = "2.0.21-1.0.28" +kspPlugin = "2.1.0-1.0.29" [libraries] activity = { module = "androidx.activity:activity-compose", version.ref = "activity" } appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } coil = { module = "io.coil-kt:coil-compose", version.ref = "coil" } -compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" } -compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "compose" } -compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" } -compose-ui-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" } -compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" } -compose-material3-adaptive = { module = "androidx.compose.material3.adaptive:adaptive", version.ref = "material3Adaptive" } +compose-bom = { group = "androidx.compose", name = "compose-bom-alpha", version.ref = "composeBom" } +compose-ui = { module = "androidx.compose.ui:ui" } +compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } +compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } +compose-ui-preview = { module = "androidx.compose.ui:ui-tooling-preview" } +compose-material-icons = { module = "androidx.compose.material:material-icons-core" } +compose-material3 = { module = "androidx.compose.material3:material3" } +compose-material3-adaptive = { module = "androidx.compose.material3.adaptive:adaptive" } compose-navigation = { module = "androidx.navigation:navigation-compose", version.ref = "composeNavigation" } -compose-navigation-material = { module = "androidx.compose.material:material-navigation", version = "1.7.0-beta01" } +compose-navigation-material = { module = "androidx.compose.material:material-navigation" } datastore = { module = "androidx.datastore:datastore-preferences", version.ref = "datastore" } documentfile = { module = "androidx.documentfile:documentfile", version.ref = "documentfile" } hilt-android-testing = { module = "com.google.dagger:hilt-android-testing", version.ref = "hilt" } @@ -73,7 +73,7 @@ viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version kotlin = ["kotlin-stdlib", "kotlin-coroutines"] hilt = ["hilt-android", "hilt-navigation"] opto = ["opto-core", "opto-domain"] -ui = ["coil", "compose-ui", "compose-ui-preview", "compose-material3", "compose-navigation", "vico", "immutable-collections", "compose-navigation-material", "compose-material3-adaptive"] +ui = ["coil", "compose-ui", "compose-ui-preview", "compose-material-icons", "compose-material3", "compose-navigation", "vico", "immutable-collections", "compose-navigation-material", "compose-material3-adaptive"] testing = ["junit", "jupiter", "kotlin-test", "kotlin-coroutines-test"] [plugins] diff --git a/gradle/ui-module-base.gradle b/gradle/ui-module-base.gradle index d819a00b..a860d1c4 100644 --- a/gradle/ui-module-base.gradle +++ b/gradle/ui-module-base.gradle @@ -33,9 +33,7 @@ kotlin { dependencies { implementation project(":domain") - - debugImplementation libs.compose.ui.test.manifest - + implementation platform(libs.compose.bom) implementation libs.bundles.hilt implementation libs.bundles.ui implementation libs.activity @@ -43,10 +41,12 @@ dependencies { implementation libs.lifecycle.runtime implementation libs.timber implementation libs.viewmodel - debugImplementation libs.compose.ui.tooling - ksp libs.hilt.compiler + debugImplementation libs.compose.ui.test.manifest + debugImplementation libs.compose.ui.tooling testImplementation project(":domain-testing") testImplementation libs.bundles.testing + + ksp libs.hilt.compiler }