Skip to content

Commit 693a77e

Browse files
committed
⬆️ chore: updated deps and fixed deprecations
Signed-off-by: shub39 <cptnshubham39@gmail.com>
1 parent 63b2390 commit 693a77e

5 files changed

Lines changed: 18 additions & 21 deletions

File tree

androidApp/src/main/java/com/shub39/grit/core/data/Converters.kt

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
*/
1717
package com.shub39.grit.core.data
1818

19-
import androidx.room3.TypeConverter
20-
import kotlin.time.ExperimentalTime
19+
import androidx.room3.ColumnTypeConverter
2120
import kotlin.time.Instant
2221
import kotlinx.datetime.DayOfWeek
2322
import kotlinx.datetime.LocalDate
@@ -29,37 +28,35 @@ import kotlinx.datetime.toLocalDateTime
2928
object Converters {
3029
val allDays = dayOfWeekToString(DayOfWeek.entries.toSet())
3130

32-
@TypeConverter
31+
@ColumnTypeConverter
3332
fun dayOfWeekToString(value: Set<DayOfWeek>): String {
3433
return value.joinToString(",") { it.name }
3534
}
3635

37-
@TypeConverter
36+
@ColumnTypeConverter
3837
fun dayOfWeekFromString(value: String): Set<DayOfWeek> {
3938
return if (value.isBlank()) emptySet()
4039
else value.split(",").map { DayOfWeek.valueOf(it) }.toSet()
4140
}
4241

43-
@OptIn(ExperimentalTime::class)
44-
@TypeConverter
42+
@ColumnTypeConverter
4543
fun dateFromTimestamp(value: Long?): LocalDateTime? {
4644
return value?.let {
4745
Instant.fromEpochSeconds(value).toLocalDateTime(TimeZone.currentSystemDefault())
4846
}
4947
}
5048

51-
@OptIn(ExperimentalTime::class)
52-
@TypeConverter
49+
@ColumnTypeConverter
5350
fun dateToTimestamp(date: LocalDateTime?): Long? {
5451
return date?.toInstant(TimeZone.currentSystemDefault())?.epochSeconds
5552
}
5653

57-
@TypeConverter
54+
@ColumnTypeConverter
5855
fun dayFromTimestamp(value: Long): LocalDate {
5956
return value.let { LocalDate.fromEpochDays(value) }
6057
}
6158

62-
@TypeConverter
59+
@ColumnTypeConverter
6360
fun dayToTimestamp(date: LocalDate): Long {
6461
return date.toEpochDays()
6562
}

androidApp/src/main/java/com/shub39/grit/habits/data/database/HabitDatabase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
package com.shub39.grit.habits.data.database
1818

1919
import androidx.room3.AutoMigration
20+
import androidx.room3.ColumnTypeConverters
2021
import androidx.room3.Database
2122
import androidx.room3.RoomDatabase
22-
import androidx.room3.TypeConverters
2323
import androidx.room3.migration.Migration
2424
import androidx.sqlite.SQLiteConnection
2525
import androidx.sqlite.execSQL
@@ -31,7 +31,7 @@ import com.shub39.grit.core.data.Converters
3131
exportSchema = true,
3232
autoMigrations = [AutoMigration(from = 4, to = 5)],
3333
)
34-
@TypeConverters(Converters::class)
34+
@ColumnTypeConverters(Converters::class)
3535
abstract class HabitDatabase : RoomDatabase() {
3636
abstract fun habitDao(): HabitsDao
3737

androidApp/src/main/java/com/shub39/grit/tasks/data/database/TaskDatabase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
package com.shub39.grit.tasks.data.database
1818

1919
import androidx.room3.AutoMigration
20+
import androidx.room3.ColumnTypeConverters
2021
import androidx.room3.Database
2122
import androidx.room3.RoomDatabase
22-
import androidx.room3.TypeConverters
2323
import com.shub39.grit.core.data.Converters
2424

2525
@Database(
@@ -28,7 +28,7 @@ import com.shub39.grit.core.data.Converters
2828
exportSchema = true,
2929
autoMigrations = [AutoMigration(from = 4, to = 5)],
3030
)
31-
@TypeConverters(Converters::class)
31+
@ColumnTypeConverters(Converters::class)
3232
abstract class TaskDatabase : RoomDatabase() {
3333
abstract fun taskDao(): TasksDao
3434

gradle/libs.versions.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ espresso-core = "3.7.0"
88
junit = "4.13.2"
99
junit-version = "1.3.0"
1010
kotlinx-datetime = "0.8.0"
11-
purchases = "10.9.0"
11+
purchases = "10.10.0"
1212
splashscreen = "1.2.0"
1313
datastore = "1.2.1"
1414
colorpicker = "1.2.0"
1515
glance = "1.2.0-rc01"
16-
koin = "4.2.1"
16+
koin = "4.2.2"
1717
koin-plugin = "1.0.1"
1818
kotlin = "2.4.0"
1919
ksp = "2.3.9"
2020
material3 = "1.11.0-alpha07"
2121
reorderable = "3.1.0"
22-
room3 = "3.0.0-alpha06"
22+
room3 = "3.0.0-rc01"
2323
navigation = "1.1.1"
2424
materialkolor = "4.1.1"
25-
compose-junit = "1.11.2"
25+
compose-junit = "1.11.3"
2626
biometric = "1.4.0-alpha02"
2727
truth = "1.4.5"
2828
compose-multiplatform = "1.11.1"
2929
kotlinx-coroutines = "1.11.0"
3030
kotlinx-serialization-json = "1.11.0"
31-
spotless = "8.6.0"
32-
filekit = "0.14.1"
31+
spotless = "8.7.0"
32+
filekit = "0.14.2"
3333
ktfmt = "0.61"
3434
browser-preloader = "1.0.3"
3535

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
3-
</resources>
3+
</resources>

0 commit comments

Comments
 (0)