Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanLiou committed Apr 20, 2024
1 parent 1581d39 commit 0d4bb64
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 29 deletions.
36 changes: 21 additions & 15 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,47 @@
[versions]
agp = "8.2.2"
kotlin = "1.9.23"
core-ktx = "1.10.1"
junit = "4.13.2"
androidx-test-ext-junit = "1.1.5"
espresso-core = "3.5.1"
core-ktx = "1.13.0"
appcompat = "1.6.1"
play-services-wearable = "18.0.0"
material = "1.9.0"
material = "1.11.0"
constraintlayout = "2.1.4"
percentlayout = "1.0.0"
legacy-support-v4 = "1.0.0"
recyclerview = "1.3.0"
compose-bom = "2024.04.01"
wear-compose = "1.3.1"
lifecycle-runtime-ktx = "2.6.1"
recyclerview = "1.3.2"
lifecycle-runtime-ktx = "2.7.0"
activity-compose = "1.9.0"
# https://github.com/google/ksp/releases
ksp = "1.9.23-1.0.20"
horologist = "0.4.12"

# compose
compose-bom = "2024.04.01"
wear-compose = "1.3.1"

# wear
play-services-wearable = "18.1.0"
horologist = "0.6.9"
wear-input = "1.2.0-alpha02"

# test
junit = "4.13.2"
androidx-test-ext-junit = "1.1.5"
espresso-core = "3.5.1"

# kotlinx
collections-immutable = "0.3.7"
datetime = "0.5.0"

# koin
koin = "3.4.2"
koin-annotation = "1.2.2"
koin-compose = "3.4.5"
koin = "3.5.6"
koin-annotation = "1.3.1"
koin-compose = "3.5.6"

# code check
kotlinter = "3.15.0"
slack-compose-lint = "1.2.0"

# sql delight
sqldelight = "2.0.0-rc01"
sqldelight = "2.0.2"

[libraries]
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "core-ktx" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import androidx.compose.ui.unit.dp
import androidx.wear.compose.foundation.lazy.AutoCenteringParams
import androidx.wear.compose.foundation.lazy.ScalingLazyColumn
import androidx.wear.compose.foundation.lazy.ScalingLazyListState
import com.google.android.horologist.annotations.ExperimentalHorologistApi
import com.google.android.horologist.compose.rotaryinput.rotaryWithScroll
import androidx.wear.compose.foundation.rotary.RotaryDefaults.scrollBehavior
import androidx.wear.compose.foundation.rotary.rotary
import com.rayliu.commonmain.domain.model.SportCategory
import com.rayliu.gymnote.wearos.components.CircularIndeterminateProgressBar
import com.rayliu.gymnote.wearos.theme.GymNoteTheme
Expand Down Expand Up @@ -45,7 +45,6 @@ fun CategoryListScreen(
}
}

@OptIn(ExperimentalHorologistApi::class)
@Composable
private fun CategoryList(
sportCategories: ImmutableList<SportCategory>,
Expand All @@ -58,7 +57,11 @@ private fun CategoryList(
.fillMaxWidth()
.padding(bottom = 8.dp)
ScalingLazyColumn(
modifier = modifier.rotaryWithScroll(focusRequester, listState).fillMaxSize(),
modifier =
modifier.rotary(
scrollBehavior(scrollableState = listState),
focusRequester = focusRequester
).fillMaxSize(),
autoCentering = AutoCenteringParams(itemIndex = 0),
state = listState
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import androidx.compose.ui.unit.dp
import androidx.wear.compose.foundation.lazy.AutoCenteringParams
import androidx.wear.compose.foundation.lazy.ScalingLazyColumn
import androidx.wear.compose.foundation.lazy.ScalingLazyListState
import androidx.wear.compose.foundation.rotary.RotaryDefaults
import androidx.wear.compose.foundation.rotary.rotary
import androidx.wear.compose.material.Text
import com.google.android.horologist.annotations.ExperimentalHorologistApi
import com.google.android.horologist.compose.rotaryinput.rotaryWithScroll
import com.rayliu.commonmain.domain.model.DistanceTimeRecord
import com.rayliu.commonmain.domain.model.Record
import com.rayliu.commonmain.domain.model.SportRecordType
Expand All @@ -37,7 +37,6 @@ import kotlinx.datetime.Clock
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toLocalDateTime

@OptIn(ExperimentalHorologistApi::class)
@Composable
fun WorkoutScreen(
listState: ScalingLazyListState,
Expand All @@ -49,9 +48,11 @@ fun WorkoutScreen(
modifier: Modifier = Modifier
) {
ScalingLazyColumn(
modifier = modifier
.rotaryWithScroll(focusRequester, listState)
.fillMaxSize(),
modifier =
modifier.rotary(
RotaryDefaults.scrollBehavior(scrollableState = listState),
focusRequester = focusRequester
).fillMaxSize(),
autoCentering = AutoCenteringParams(itemIndex = 0),
state = listState,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import androidx.compose.ui.unit.dp
import androidx.wear.compose.foundation.lazy.AutoCenteringParams
import androidx.wear.compose.foundation.lazy.ScalingLazyColumn
import androidx.wear.compose.foundation.lazy.ScalingLazyListState
import com.google.android.horologist.annotations.ExperimentalHorologistApi
import com.google.android.horologist.compose.rotaryinput.rotaryWithScroll
import androidx.wear.compose.foundation.rotary.RotaryDefaults.scrollBehavior
import androidx.wear.compose.foundation.rotary.rotary
import com.rayliu.commonmain.domain.model.SportRecordType
import com.rayliu.commonmain.domain.model.WorkoutInfo
import com.rayliu.gymnote.wearos.theme.GymNoteTheme
Expand Down Expand Up @@ -50,7 +50,6 @@ fun WorkoutListScreen(
}
}

@OptIn(ExperimentalHorologistApi::class)
@Composable
private fun WorkoutInfoList(
workoutInfos: ImmutableList<WorkoutInfo>,
Expand All @@ -63,7 +62,11 @@ private fun WorkoutInfoList(
.fillMaxWidth()
.padding(bottom = 8.dp)
ScalingLazyColumn(
modifier = modifier.rotaryWithScroll(focusRequester, listState).fillMaxSize(),
modifier =
modifier.rotary(
scrollBehavior(scrollableState = listState),
focusRequester = focusRequester
).fillMaxSize(),
autoCentering = AutoCenteringParams(itemIndex = 0),
state = listState
) {
Expand Down

0 comments on commit 0d4bb64

Please sign in to comment.