Modern Apps git

← Modern-Apps.git

room: migrate all app modules to Room 3 and add a lint guard

Commit
d4a2ee8b1326a4cd2a287941a5601b70f0e414dc
Author
vayun-mathur <[email protected]>
When
2026-08-26 23:10 UTC (3 months ago)
Parents
6606838

Diff

SUPPLY_CHAIN_RISKS.md
diff --git a/SUPPLY_CHAIN_RISKS.md b/SUPPLY_CHAIN_RISKS.mdindex 934b247703..fc80a78f59 100644--- a/SUPPLY_CHAIN_RISKS.md+++ b/SUPPLY_CHAIN_RISKS.md@@ -132,7 +132,7 @@ Summed old per-crate locks (before workspace) = 712 total (641 excluding voxels) | `org.maplibre.compose:maplibre-compose` | `0.13.0` → `libmaplibre.so` native | `maps`, `weather`, `findfamily`, `photos` | Community-maintained FOSS renderer, better than Mapbox but smaller than Google Maps | `libs.versions.toml:78` | | `com.google.mediapipe:tasks-vision` | `0.10.35` (unified) | `camera` (face), vision segmentation | Native lib size; inline `0.10.14` drift resolved | `camera/build.gradle.kts:124`, `libs.versions.toml` | | `com.microsoft.onnxruntime:onnxruntime-android` | `1.27.0` | `openassistant` (SigLIP), `speech` (whisper-tiny int8), `photos` (TinyCLIP int8) | MIT, Microsoft-maintained, low risk but native `.so` (~27 MB arm64, 35% of the `speech` APK). The reduced `onnxruntime-mobile` package is not usable: it lacks `ConvInteger`, which whisper's quantized Conv1d stem needs, and its last release was 1.18.0 in May 2024 | `openassistant/build.gradle.kts`, `speech/build.gradle.kts`, `photos/build.gradle.kts`, `libs.versions.toml:85` |-| `net.zetetic:sqlcipher-android` | `4.17.0` | `library:room` → `passwords`, `notes` | Small company, adds ~2MB `.so`, encrypted DB | `library/room/build.gradle.kts`, `libs.versions.toml:31` |+| `net.zetetic:sqlcipher-android` | `4.18.0` | `library:room` → `passwords`, `notes` | Small company, adds ~2MB `.so`, encrypted DB. `4.18.0` is the first release with `SQLCipherDriver` (an `androidx.sqlite.SQLiteDriver`), which is what lets encrypted databases work on Room 3 at all: Room 3 removed `openHelperFactory(...)` | `library/room/build.gradle.kts`, `libs.versions.toml:117` | | `io.coil-kt:coil-compose` + `coil-svg` + `coil-video` | `2.7.0` | `photos`, `maps`, `email`, `travel`, `education`, `pdf` | <3 maintainers, but widely adopted image loader | `libs.versions.toml:50` | | `org.bouncycastle:bcprov-jdk18on` + `bcpkix-jdk18on` | `1.85` | `pdf`, `passwords`, `messages`, `e2ee-p2p` | Small org, long-lived, well-audited PQC ML-KEM/ML-DSA; resource conflicts handled in `common-conventions-app` | `libs.versions.toml:84,226` | | `com.google.zxing:core` | `3.5.4` | `messages` (QR), `library:ocr`, `pdf` | Old, community fork `zxing-cpp` preferred | `libs.versions.toml:83` |@@ -140,7 +140,7 @@ Summed old per-crate locks (before workspace) = 712 total (641 excluding voxels)  ### Low Risk / Platform (Google/JetBrains) — Not Critical -Well-maintained: `androidx.*` (`core-ktx 1.19.0`, `lifecycle 2.11.0`, `room 2.8.4`, `sqlite 2.7.0`, `work 2.11.2`, `datastore`, `camera`, `webkit`, `browser 1.9.0`, `biometric`, `glance`, `exifinterface`, `credentials`, `autofill`), `composeBom 2026.06.01`, `material3 1.5.0-alpha23`, `material 1.14.0`, `foundation 1.12.0-beta02`, `ink 1.1.0-alpha04`, `navigation3`, `media3-exoplayer 1.11.0-beta01`, `okhttp 4.12.0` + `okio 3.17.0`, `kotlin 2.4.0` + `coroutines 1.11.0` + `serialization-json 1.11.0` + `datetime 0.8.0`, `ksp 2.3.10`, `protobuf 4.36.0-RC1` / `protobuf-javalite 4.35.0`, `libphonenumber 9.0.34`, `fhir-model 1.0.0-beta02`, `health/connect-client 1.2.0-alpha04`, etc.+Well-maintained: `androidx.*` (`core-ktx 1.19.0`, `lifecycle 2.11.0`, `room3 3.0.2`, `sqlite 2.7.0`, `work 2.11.2`, `datastore`, `camera`, `webkit`, `browser 1.9.0`, `biometric`, `glance`, `exifinterface`, `credentials`, `autofill`), `composeBom 2026.06.01`, `material3 1.5.0-alpha23`, `material 1.14.0`, `foundation 1.12.0-beta02`, `ink 1.1.0-alpha04`, `navigation3`, `media3-exoplayer 1.11.0-beta01`, `okhttp 4.12.0` + `okio 3.17.0`, `kotlin 2.4.0` + `coroutines 1.11.0` + `serialization-json 1.11.0` + `datetime 0.8.0`, `ksp 2.3.10`, `protobuf 4.36.0-RC1` / `protobuf-javalite 4.35.0`, `libphonenumber 9.0.34`, `fhir-model 1.0.0-beta02`, `health/connect-client 1.2.0-alpha04`, etc.  --- 
appstore/src/main/java/com/vayunmathur/appstore/data/AppDatabase.kt
diff --git a/appstore/src/main/java/com/vayunmathur/appstore/data/AppDatabase.kt b/appstore/src/main/java/com/vayunmathur/appstore/data/AppDatabase.ktindex 17ad34ccb1..0292e01066 100644--- a/appstore/src/main/java/com/vayunmathur/appstore/data/AppDatabase.kt+++ b/appstore/src/main/java/com/vayunmathur/appstore/data/AppDatabase.kt@@ -1,15 +1,16 @@ package com.vayunmathur.appstore.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Upsert-import androidx.room.migration.Migration-import androidx.sqlite.db.SupportSQLiteDatabase+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.room3.migration.Migration+import androidx.sqlite.SQLiteConnection+import androidx.sqlite.execSQL import kotlinx.coroutines.flow.Flow  const val DB_NAME = "appstore-db"@@ -207,7 +208,7 @@ interface AccrescentTrustDao {      * an app id it no longer lists must stop being trusted — so this clears first, in one      * transaction, rather than merging.      */-    @androidx.room.Transaction+    @androidx.room3.Transaction     suspend fun replaceAll(entries: List<AccrescentTrustEntity>) {         clearAll()         upsertAll(entries)@@ -328,28 +329,28 @@ abstract class AppDatabase : RoomDatabase() {     companion object : com.vayunmathur.library.util.DatabaseMigrations {         override val migrations = listOf(             object : Migration(1, 2) {-                override fun migrate(db: SupportSQLiteDatabase) {-                    db.execSQL("DROP TABLE IF EXISTS FavoriteEntity")+                override suspend fun migrate(connection: SQLiteConnection) {+                    connection.execSQL("DROP TABLE IF EXISTS FavoriteEntity")                 }             },             object : Migration(2, 3) {-                override fun migrate(db: SupportSQLiteDatabase) {-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN targetSdk INTEGER")+                override suspend fun migrate(connection: SQLiteConnection) {+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN targetSdk INTEGER")                 }             },             object : Migration(3, 4) {-                override fun migrate(db: SupportSQLiteDatabase) {-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN expectedSigners TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN apkSha256 TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN license TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN website TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN sourceCode TEXT")+                override suspend fun migrate(connection: SQLiteConnection) {+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN expectedSigners TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN apkSha256 TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN license TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN website TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN sourceCode TEXT")                     // Rows cached before this version carry no signer or hash, and the                     // reproducible-only filter had not run yet. Drop them so nothing                     // unverifiable survives the upgrade; the next sync repopulates.-                    db.execSQL("DELETE FROM CachedAppEntity")-                    db.execSQL("DELETE FROM RepoEntity")-                    db.execSQL(+                    connection.execSQL("DELETE FROM CachedAppEntity")+                    connection.execSQL("DELETE FROM RepoEntity")+                    connection.execSQL(                         "CREATE TABLE IF NOT EXISTS PinnedStampEntity (" +                             "packageName TEXT NOT NULL PRIMARY KEY, " +                             "stampSha256 TEXT NOT NULL, " +@@ -358,36 +359,36 @@ abstract class AppDatabase : RoomDatabase() {                 }             },             object : Migration(4, 5) {-                override fun migrate(db: SupportSQLiteDatabase) {+                override suspend fun migrate(connection: SQLiteConnection) {                     // Listing media and store metadata. All nullable or defaulted, so                     // existing rows stay usable and fill in on the next sync.-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN screenshots TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN featureGraphic TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN rating REAL")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN ratingCount INTEGER NOT NULL DEFAULT 0")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN installs INTEGER NOT NULL DEFAULT 0")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN updatedOn TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN contentRating TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN containsAds INTEGER NOT NULL DEFAULT 0")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN antiFeatures TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN whatsNew TEXT")-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN addedTimestamp INTEGER NOT NULL DEFAULT 0")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN screenshots TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN featureGraphic TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN rating REAL")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN ratingCount INTEGER NOT NULL DEFAULT 0")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN installs INTEGER NOT NULL DEFAULT 0")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN updatedOn TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN contentRating TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN containsAds INTEGER NOT NULL DEFAULT 0")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN antiFeatures TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN whatsNew TEXT")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN addedTimestamp INTEGER NOT NULL DEFAULT 0")                 }             },             object : Migration(5, 6) {-                override fun migrate(db: SupportSQLiteDatabase) {+                override suspend fun migrate(connection: SQLiteConnection) {                     // Reproducibility became a per-app badge rather than an import gate, so                     // the catalogue now lists non-reproduced F-Droid apps too. Existing rows                     // predate the badge; the next sync repopulates it. Default false.-                    db.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN reproducible INTEGER NOT NULL DEFAULT 0")+                    connection.execSQL("ALTER TABLE CachedAppEntity ADD COLUMN reproducible INTEGER NOT NULL DEFAULT 0")                 }             },             object : Migration(6, 7) {-                override fun migrate(db: SupportSQLiteDatabase) {+                override suspend fun migrate(connection: SQLiteConnection) {                     // Accrescent's signed allowlist, cached as a trust anchor. Empty until the                     // first repodata fetch verifies and populates it; nothing installs from                     // Accrescent until then, which is the intended fail-closed default.-                    db.execSQL(+                    connection.execSQL(                         "CREATE TABLE IF NOT EXISTS AccrescentTrustEntity (" +                             "appId TEXT NOT NULL PRIMARY KEY, " +                             "signingCertHash TEXT NOT NULL, " +
clock/src/main/java/com/vayunmathur/clock/data/ClockDatabase.kt
diff --git a/clock/src/main/java/com/vayunmathur/clock/data/ClockDatabase.kt b/clock/src/main/java/com/vayunmathur/clock/data/ClockDatabase.ktindex e0987e0ebb..137ddd23c3 100644--- a/clock/src/main/java/com/vayunmathur/clock/data/ClockDatabase.kt+++ b/clock/src/main/java/com/vayunmathur/clock/data/ClockDatabase.kt@@ -1,17 +1,18 @@ package com.vayunmathur.clock.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverters-import androidx.room.Upsert+import androidx.room3.ColumnTypeConverters+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseItem import com.vayunmathur.library.util.DefaultConverters-import androidx.room.migration.Migration+import androidx.room3.migration.Migration import kotlinx.coroutines.flow.Flow import kotlinx.datetime.LocalTime import kotlin.time.Clock@@ -89,7 +90,7 @@ interface AlarmDao {     suspend fun delete(value: Alarm): Int } -@TypeConverters(DefaultConverters::class)+@ColumnTypeConverters(DefaultConverters::class) @Database(entities = [Timer::class, Alarm::class], version = 2, exportSchema = false) abstract class ClockDatabase: RoomDatabase() {     abstract fun timerDao(): TimerDao
communicate/src/main/java/com/vayunmathur/communicate/data/signal/SignalDatabase.kt
diff --git a/communicate/src/main/java/com/vayunmathur/communicate/data/signal/SignalDatabase.kt b/communicate/src/main/java/com/vayunmathur/communicate/data/signal/SignalDatabase.ktindex e67e3e57eb..dd6c057b5c 100644--- a/communicate/src/main/java/com/vayunmathur/communicate/data/signal/SignalDatabase.kt+++ b/communicate/src/main/java/com/vayunmathur/communicate/data/signal/SignalDatabase.kt@@ -1,17 +1,19 @@ package com.vayunmathur.communicate.data.signal  import android.content.Context-import androidx.room.ColumnInfo-import androidx.room.Dao-import androidx.room.Database-import androidx.room.Entity-import androidx.room.Insert-import androidx.room.OnConflictStrategy-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverter-import androidx.room.TypeConverters+import androidx.room3.ColumnInfo+import androidx.room3.ColumnTypeConverter+import androidx.room3.ColumnTypeConverters+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Entity+import androidx.room3.Insert+import androidx.room3.OnConflictStrategy+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.sqlite.SQLiteConnection+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseMigrations  /**@@ -43,7 +45,7 @@ import com.vayunmathur.library.util.DatabaseMigrations     version = 5,     exportSchema = false )-@TypeConverters(SignalTypeConverters::class)+@ColumnTypeConverters(SignalTypeConverters::class) abstract class SignalDatabase : RoomDatabase() {     abstract fun deviceDao(): SignalDeviceDao     abstract fun sessionDao(): SignalSessionDao@@ -68,18 +70,18 @@ abstract class SignalDatabase : RoomDatabase() {          * pre-keys, plus the (kyberPreKeyId, signedPreKeyId, baseKey) tuples that make last-resort          * keys single-use — reusing one is what `ReusedBaseKeyException` guards against.          */-        private val MIGRATION_1_2 = object : androidx.room.migration.Migration(1, 2) {-            override fun migrate(db: androidx.sqlite.db.SupportSQLiteDatabase) {+        private val MIGRATION_1_2 = object : androidx.room3.migration.Migration(1, 2) {+            override suspend fun migrate(connection: SQLiteConnection) {                 // Must match Room's generated createAllTables statements byte for byte, including the                 // absence of column defaults — TableInfo validation compares them and throws on a                 // mismatch. Both tables are new, so there is nothing to backfill.-                db.execSQL(+                connection.execSQL(                     "CREATE TABLE IF NOT EXISTS `signal_e2e_kyber_pre_keys` (" +                         "`id` INTEGER NOT NULL, `record` BLOB NOT NULL, " +                         "`lastResort` INTEGER NOT NULL, `uploaded` INTEGER NOT NULL, " +                         "PRIMARY KEY(`id`))",                 )-                db.execSQL(+                connection.execSQL(                     "CREATE TABLE IF NOT EXISTS `signal_e2e_kyber_used_base_keys` (" +                         "`kyberPreKeyId` INTEGER NOT NULL, `signedPreKeyId` INTEGER NOT NULL, " +                         "`baseKeyB64` TEXT NOT NULL, " +@@ -93,15 +95,15 @@ abstract class SignalDatabase : RoomDatabase() {          * profile keys are secret material used to derive unidentified-access keys — both belong in the          * encrypted database rather than the plaintext preferences blob.          */-        private val MIGRATION_2_3 = object : androidx.room.migration.Migration(2, 3) {-            override fun migrate(db: androidx.sqlite.db.SupportSQLiteDatabase) {-                db.execSQL(+        private val MIGRATION_2_3 = object : androidx.room3.migration.Migration(2, 3) {+            override suspend fun migrate(connection: SQLiteConnection) {+                connection.execSQL(                     "CREATE TABLE IF NOT EXISTS `signal_sender_certificate` (" +                         "`id` INTEGER NOT NULL, `record` BLOB NOT NULL, " +                         "`expiration` INTEGER NOT NULL, `includesE164` INTEGER NOT NULL, " +                         "PRIMARY KEY(`id`))",                 )-                db.execSQL(+                connection.execSQL(                     "CREATE TABLE IF NOT EXISTS `signal_profile_keys` (" +                         "`address` TEXT NOT NULL, `profileKey` BLOB NOT NULL, " +                         "PRIMARY KEY(`address`))",@@ -118,23 +120,23 @@ abstract class SignalDatabase : RoomDatabase() {          * stored, so the new id is not recoverable from the old one — so they are dropped and will be          * recreated from inbound traffic.          */-        private val MIGRATION_3_4 = object : androidx.room.migration.Migration(3, 4) {-            override fun migrate(db: androidx.sqlite.db.SupportSQLiteDatabase) {-                db.execSQL("ALTER TABLE signal_conversation ADD COLUMN groupMasterKey BLOB")-                db.execSQL("ALTER TABLE signal_conversation ADD COLUMN groupRevision INTEGER NOT NULL DEFAULT 0")-                db.execSQL("DELETE FROM signal_cached_message WHERE conversationId LIKE 'group:%'")-                db.execSQL("DELETE FROM signal_conversation WHERE chatId LIKE 'group:%'")+        private val MIGRATION_3_4 = object : androidx.room3.migration.Migration(3, 4) {+            override suspend fun migrate(connection: SQLiteConnection) {+                connection.execSQL("ALTER TABLE signal_conversation ADD COLUMN groupMasterKey BLOB")+                connection.execSQL("ALTER TABLE signal_conversation ADD COLUMN groupRevision INTEGER NOT NULL DEFAULT 0")+                connection.execSQL("DELETE FROM signal_cached_message WHERE conversationId LIKE 'group:%'")+                connection.execSQL("DELETE FROM signal_conversation WHERE chatId LIKE 'group:%'")             }         }          /** v4 → v5: keep the PNI from contact discovery, which is how a new contact is addressed. */-        private val MIGRATION_4_5 = object : androidx.room.migration.Migration(4, 5) {-            override fun migrate(db: androidx.sqlite.db.SupportSQLiteDatabase) {-                db.execSQL("ALTER TABLE signal_contact ADD COLUMN pni TEXT NOT NULL DEFAULT ''")+        private val MIGRATION_4_5 = object : androidx.room3.migration.Migration(4, 5) {+            override suspend fun migrate(connection: SQLiteConnection) {+                connection.execSQL("ALTER TABLE signal_contact ADD COLUMN pni TEXT NOT NULL DEFAULT ''")             }         } -        override val migrations = listOf<androidx.room.migration.Migration>(MIGRATION_1_2, MIGRATION_2_3, MIGRATION_3_4, MIGRATION_4_5)+        override val migrations = listOf<androidx.room3.migration.Migration>(MIGRATION_1_2, MIGRATION_2_3, MIGRATION_3_4, MIGRATION_4_5)          fun getDatabase(context: Context): SignalDatabase =             SignalRepository.get(context).database()@@ -142,10 +144,10 @@ abstract class SignalDatabase : RoomDatabase() { }  class SignalTypeConverters {-    @TypeConverter+    @ColumnTypeConverter     fun fromStringList(value: List<String>): String = value.joinToString(",") -    @TypeConverter+    @ColumnTypeConverter     fun toStringList(value: String): List<String> =         if (value.isEmpty()) emptyList() else value.split(",") }
communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDatabase.kt
diff --git a/communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDatabase.kt b/communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDatabase.ktindex 9f9d849f35..64e1e94bcd 100644--- a/communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDatabase.kt+++ b/communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDatabase.kt@@ -1,18 +1,19 @@ package com.vayunmathur.communicate.data.whatsapp  import android.content.Context-import androidx.room.Database-import androidx.room.Dao-import androidx.room.Entity-import androidx.room.Insert-import androidx.room.OnConflictStrategy-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverter-import androidx.room.TypeConverters-import androidx.room.migration.Migration-import androidx.sqlite.db.SupportSQLiteDatabase+import androidx.room3.ColumnTypeConverter+import androidx.room3.ColumnTypeConverters+import androidx.room3.Database+import androidx.room3.Dao+import androidx.room3.Entity+import androidx.room3.Insert+import androidx.room3.OnConflictStrategy+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.migration.Migration+import androidx.sqlite.SQLiteConnection+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseMigrations  /**@@ -53,7 +54,7 @@ import com.vayunmathur.library.util.DatabaseMigrations     version = 4,     exportSchema = false )-@TypeConverters(WhatsAppTypeConverters::class)+@ColumnTypeConverters(WhatsAppTypeConverters::class) abstract class WhatsAppDatabase : RoomDatabase() {     abstract fun deviceDao(): WhatsAppDeviceDao     abstract fun sessionDao(): WhatsAppSessionDao@@ -78,17 +79,17 @@ abstract class WhatsAppDatabase : RoomDatabase() {          * columns are additive with defaults, so existing rows stay valid.          */         private val MIGRATION_1_2 = object : Migration(1, 2) {-            override fun migrate(db: SupportSQLiteDatabase) {-                db.execSQL(+            override suspend fun migrate(connection: SQLiteConnection) {+                connection.execSQL(                     "ALTER TABLE whatsapp_cached_message ADD COLUMN status INTEGER NOT NULL DEFAULT 0",                 )-                db.execSQL(+                connection.execSQL(                     "ALTER TABLE whatsapp_history_sync_conversation ADD COLUMN isGroup INTEGER NOT NULL DEFAULT 0",                 )-                db.execSQL(+                connection.execSQL(                     "ALTER TABLE whatsapp_history_sync_conversation ADD COLUMN name TEXT",                 )-                db.execSQL(+                connection.execSQL(                     "ALTER TABLE whatsapp_history_sync_conversation ADD COLUMN participants TEXT NOT NULL DEFAULT ''",                 )             }@@ -96,8 +97,8 @@ abstract class WhatsAppDatabase : RoomDatabase() {          /** v2 → v3: device-contact sync table (address book → WhatsApp LID/phone mapping). */         private val MIGRATION_2_3 = object : Migration(2, 3) {-            override fun migrate(db: SupportSQLiteDatabase) {-                db.execSQL(+            override suspend fun migrate(connection: SQLiteConnection) {+                connection.execSQL(                     "CREATE TABLE IF NOT EXISTS whatsapp_contact (" +                         "phoneE164 TEXT NOT NULL PRIMARY KEY, " +                         "lid TEXT NOT NULL DEFAULT '', " +@@ -110,8 +111,8 @@ abstract class WhatsAppDatabase : RoomDatabase() {          /** v3 → v4: call-log table for the WhatsApp calling stack. */         private val MIGRATION_3_4 = object : Migration(3, 4) {-            override fun migrate(db: SupportSQLiteDatabase) {-                db.execSQL(+            override suspend fun migrate(connection: SQLiteConnection) {+                connection.execSQL(                     "CREATE TABLE IF NOT EXISTS whatsapp_call_log (" +                         "callId TEXT NOT NULL PRIMARY KEY, " +                         "peerJid TEXT NOT NULL DEFAULT '', " +@@ -133,12 +134,12 @@ abstract class WhatsAppDatabase : RoomDatabase() { }  class WhatsAppTypeConverters {-    @TypeConverter+    @ColumnTypeConverter     fun fromStringList(value: List<String>): String {         return value.joinToString(",")     } -    @TypeConverter+    @ColumnTypeConverter     fun toStringList(value: String): List<String> {         return if (value.isEmpty()) emptyList() else value.split(",")     }
communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDevice.kt
diff --git a/communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDevice.kt b/communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDevice.ktindex eb8ed8b799..5e6c4856c9 100644--- a/communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDevice.kt+++ b/communicate/src/main/java/com/vayunmathur/communicate/data/whatsapp/WhatsAppDevice.kt@@ -1,11 +1,11 @@ package com.vayunmathur.communicate.data.whatsapp -import androidx.room.Dao-import androidx.room.Entity-import androidx.room.Insert-import androidx.room.OnConflictStrategy-import androidx.room.PrimaryKey-import androidx.room.Query+import androidx.room3.Dao+import androidx.room3.Entity+import androidx.room3.Insert+import androidx.room3.OnConflictStrategy+import androidx.room3.PrimaryKey+import androidx.room3.Query  /**  * Device information for WhatsApp Web companion.
education/src/main/java/com/vayunmathur/education/data/Deadline.kt
diff --git a/education/src/main/java/com/vayunmathur/education/data/Deadline.kt b/education/src/main/java/com/vayunmathur/education/data/Deadline.ktindex b9ee67c47e..a45cd307c0 100644--- a/education/src/main/java/com/vayunmathur/education/data/Deadline.kt+++ b/education/src/main/java/com/vayunmathur/education/data/Deadline.kt@@ -1,7 +1,7 @@ package com.vayunmathur.education.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import kotlinx.serialization.Serializable  /**
education/src/main/java/com/vayunmathur/education/data/EducationDatabase.kt
diff --git a/education/src/main/java/com/vayunmathur/education/data/EducationDatabase.kt b/education/src/main/java/com/vayunmathur/education/data/EducationDatabase.ktindex b680f549cf..95e846fc87 100644--- a/education/src/main/java/com/vayunmathur/education/data/EducationDatabase.kt+++ b/education/src/main/java/com/vayunmathur/education/data/EducationDatabase.kt@@ -1,11 +1,11 @@ package com.vayunmathur.education.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert import com.vayunmathur.library.util.DatabaseMigrations import kotlinx.coroutines.flow.Flow @@ -64,6 +64,6 @@ abstract class EducationDatabase : RoomDatabase() {     abstract fun deadlineDao(): DeadlineDao      companion object : DatabaseMigrations {-        override val migrations = emptyList<androidx.room.migration.Migration>()+        override val migrations = emptyList<androidx.room3.migration.Migration>()     } }
education/src/main/java/com/vayunmathur/education/data/Learner.kt
diff --git a/education/src/main/java/com/vayunmathur/education/data/Learner.kt b/education/src/main/java/com/vayunmathur/education/data/Learner.ktindex fef7ae2681..cfef9d73e5 100644--- a/education/src/main/java/com/vayunmathur/education/data/Learner.kt+++ b/education/src/main/java/com/vayunmathur/education/data/Learner.kt@@ -1,7 +1,7 @@ package com.vayunmathur.education.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import kotlinx.serialization.Serializable  /**
education/src/main/java/com/vayunmathur/education/data/SkillProgress.kt
diff --git a/education/src/main/java/com/vayunmathur/education/data/SkillProgress.kt b/education/src/main/java/com/vayunmathur/education/data/SkillProgress.ktindex 54457314e0..9d70a5db45 100644--- a/education/src/main/java/com/vayunmathur/education/data/SkillProgress.kt+++ b/education/src/main/java/com/vayunmathur/education/data/SkillProgress.kt@@ -1,7 +1,7 @@ package com.vayunmathur.education.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import kotlinx.serialization.Serializable  /**
email/src/main/java/com/vayunmathur/email/data/EmailDao.kt
diff --git a/email/src/main/java/com/vayunmathur/email/data/EmailDao.kt b/email/src/main/java/com/vayunmathur/email/data/EmailDao.ktindex 21b8d344d3..e3f70cc991 100644--- a/email/src/main/java/com/vayunmathur/email/data/EmailDao.kt+++ b/email/src/main/java/com/vayunmathur/email/data/EmailDao.kt@@ -1,6 +1,6 @@ package com.vayunmathur.email.data -import androidx.room.*+import androidx.room3.* import com.vayunmathur.email.data.Attachment import com.vayunmathur.email.data.EmailAccount import com.vayunmathur.email.data.EmailFolder
email/src/main/java/com/vayunmathur/email/data/EmailDatabase.kt
diff --git a/email/src/main/java/com/vayunmathur/email/data/EmailDatabase.kt b/email/src/main/java/com/vayunmathur/email/data/EmailDatabase.ktindex 0259999a0d..931b6feffe 100644--- a/email/src/main/java/com/vayunmathur/email/data/EmailDatabase.kt+++ b/email/src/main/java/com/vayunmathur/email/data/EmailDatabase.kt@@ -1,9 +1,10 @@ package com.vayunmathur.email.data  import android.content.Context-import androidx.room.Database-import androidx.room.RoomDatabase-import androidx.room.migration.Migration+import androidx.room3.Database+import androidx.room3.RoomDatabase+import androidx.room3.migration.Migration+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseMigrations import com.vayunmathur.email.data.EmailFolder import com.vayunmathur.email.data.EmailMessage
email/src/main/java/com/vayunmathur/email/data/EmailModels.kt
diff --git a/email/src/main/java/com/vayunmathur/email/data/EmailModels.kt b/email/src/main/java/com/vayunmathur/email/data/EmailModels.ktindex bcd051381a..56d7319ed9 100644--- a/email/src/main/java/com/vayunmathur/email/data/EmailModels.kt+++ b/email/src/main/java/com/vayunmathur/email/data/EmailModels.kt@@ -1,8 +1,8 @@ package com.vayunmathur.email.data -import androidx.room.ColumnInfo-import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.ColumnInfo+import androidx.room3.Entity+import androidx.room3.PrimaryKey import androidx.core.text.HtmlCompat import kotlinx.serialization.Serializable import com.vayunmathur.email.network.imap.MimeParser
findfamily/src/main/java/com/vayunmathur/findfamily/data/FFDatabase.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/data/FFDatabase.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/data/FFDatabase.ktindex bc66b75671..f6240b4e5e 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/data/FFDatabase.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/data/FFDatabase.kt@@ -1,14 +1,15 @@ package com.vayunmathur.findfamily.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Insert-import androidx.room.OnConflictStrategy-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverters-import androidx.room.Upsert+import androidx.room3.ColumnTypeConverters+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Insert+import androidx.room3.OnConflictStrategy+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DefaultConverters import kotlinx.coroutines.flow.Flow @@ -150,7 +151,7 @@ interface TemporaryLinkDao { }  @Database(entities = [User::class, Waypoint::class, LocationValue::class, TemporaryLink::class], version = 11, exportSchema = false)-@TypeConverters(DefaultConverters::class)+@ColumnTypeConverters(DefaultConverters::class) abstract class FFDatabase : RoomDatabase() {     abstract fun userDao(): UserDao     abstract fun waypointDao(): WaypointDao@@ -158,26 +159,26 @@ abstract class FFDatabase : RoomDatabase() {     abstract fun temporaryLinkDao(): TemporaryLinkDao      companion object : com.vayunmathur.library.util.DatabaseMigrations {-        override val migrations: List<androidx.room.migration.Migration> = listOf(-            androidx.room.migration.Migration(1, 2) {+        override val migrations: List<androidx.room3.migration.Migration> = listOf(+            androidx.room3.migration.Migration(1, 2) {                 it.execSQL("CREATE INDEX IF NOT EXISTS index_LocationValue_timestamp ON LocationValue (timestamp)")             },-            androidx.room.migration.Migration(2, 3) {+            androidx.room3.migration.Migration(2, 3) {                 it.execSQL(                     "CREATE INDEX IF NOT EXISTS `index_LocationValue_userid_timestamp` " +                         "ON `LocationValue` (`userid`, `timestamp`)"                 )             },-            androidx.room.migration.Migration(3, 4) {+            androidx.room3.migration.Migration(3, 4) {                 it.execSQL("ALTER TABLE `User` ADD COLUMN `lastWaypointId` INTEGER")             },-            androidx.room.migration.Migration(4, 5) {+            androidx.room3.migration.Migration(4, 5) {                 it.execSQL("ALTER TABLE `User` ADD COLUMN `platform` TEXT")             },-            androidx.room.migration.Migration(5, 6) {+            androidx.room3.migration.Migration(5, 6) {                 it.execSQL("ALTER TABLE `User` ADD COLUMN `sharingAutoToggleAt` INTEGER")             },-            androidx.room.migration.Migration(6, 7) {+            androidx.room3.migration.Migration(6, 7) {                 it.execSQL("ALTER TABLE `User` ADD COLUMN `pqcEncryptionKey` TEXT")                 it.execSQL("ALTER TABLE `TemporaryLink` ADD COLUMN `pqcPublicKey` TEXT")                 it.execSQL("ALTER TABLE `TemporaryLink` ADD COLUMN `pqcKey` TEXT")@@ -192,7 +193,7 @@ abstract class FFDatabase : RoomDatabase() {             // link expires within a week. Rows with no PQC bundle are dropped rather than             // carried over: under PQC-only they can never publish again, so keeping them would             // just leave dead entries in the list.-            androidx.room.migration.Migration(7, 8) {+            androidx.room3.migration.Migration(7, 8) {                 it.execSQL(                     "CREATE TABLE IF NOT EXISTS `TemporaryLink_new` (" +                         "`name` TEXT NOT NULL, `deleteAt` INTEGER NOT NULL, " +@@ -209,19 +210,19 @@ abstract class FFDatabase : RoomDatabase() {                 it.execSQL("DROP TABLE `TemporaryLink`")                 it.execSQL("ALTER TABLE `TemporaryLink_new` RENAME TO `TemporaryLink`")             },-            androidx.room.migration.Migration(8, 9) {+            androidx.room3.migration.Migration(8, 9) {                 it.execSQL("ALTER TABLE `User` ADD COLUMN `sharingAutoToggleWaypointId` INTEGER")             },             // Custom UWB tracker support (DEV_BUILD): a `User` can now be a person or a             // tracker. Room stores the enum as its name; existing rows default to PERSON.-            androidx.room.migration.Migration(9, 10) {+            androidx.room3.migration.Migration(9, 10) {                 it.execSQL("ALTER TABLE `User` ADD COLUMN `kind` TEXT NOT NULL DEFAULT 'PERSON'")             },             // Share links carry a 32-byte ML-KEM seed (`pqcSeed`) instead of a full private             // bundle, so `pqcKey` becomes nullable and only legacy rows keep it. SQLite cannot             // drop NOT NULL in place, so rebuild the table as in Migration(7, 8). Rows keep             // their ids — those URLs are already shared.-            androidx.room.migration.Migration(10, 11) {+            androidx.room3.migration.Migration(10, 11) {                 it.execSQL(                     "CREATE TABLE IF NOT EXISTS `TemporaryLink_new` (" +                         "`name` TEXT NOT NULL, `deleteAt` INTEGER NOT NULL, " +
findfamily/src/main/java/com/vayunmathur/findfamily/data/LocationValue.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/data/LocationValue.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/data/LocationValue.ktindex de951ecbb8..39c4ade3b3 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/data/LocationValue.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/data/LocationValue.kt@@ -1,10 +1,10 @@ package com.vayunmathur.findfamily.data -import androidx.room.ColumnInfo-import androidx.room.Embedded-import androidx.room.Entity-import androidx.room.Index-import androidx.room.PrimaryKey+import androidx.room3.ColumnInfo+import androidx.room3.Embedded+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable import kotlin.time.Instant
findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.ktindex 2c3e04d315..36eb90c2dd 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/data/TemporaryLink.kt@@ -1,7 +1,7 @@ package com.vayunmathur.findfamily.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable import kotlin.random.Random
findfamily/src/main/java/com/vayunmathur/findfamily/data/User.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/data/User.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/data/User.ktindex abbc1e72f7..eaffb2adef 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/data/User.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/data/User.kt@@ -1,7 +1,7 @@ package com.vayunmathur.findfamily.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable import kotlin.time.Clock
findfamily/src/main/java/com/vayunmathur/findfamily/data/Waypoint.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/data/Waypoint.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/data/Waypoint.ktindex cfe297f67c..06ca126c5b 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/data/Waypoint.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/data/Waypoint.kt@@ -1,8 +1,8 @@ package com.vayunmathur.findfamily.data -import androidx.room.Embedded-import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Embedded+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable 
flashcards/src/main/java/com/vayunmathur/flashcards/data/Card.kt
diff --git a/flashcards/src/main/java/com/vayunmathur/flashcards/data/Card.kt b/flashcards/src/main/java/com/vayunmathur/flashcards/data/Card.ktindex 87f2837662..d4c6686d88 100644--- a/flashcards/src/main/java/com/vayunmathur/flashcards/data/Card.kt+++ b/flashcards/src/main/java/com/vayunmathur/flashcards/data/Card.kt@@ -1,8 +1,8 @@ package com.vayunmathur.flashcards.data -import androidx.room.Entity-import androidx.room.Index-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.ReorderableDatabaseItem import kotlinx.serialization.Serializable 
flashcards/src/main/java/com/vayunmathur/flashcards/data/CardTemplate.kt
diff --git a/flashcards/src/main/java/com/vayunmathur/flashcards/data/CardTemplate.kt b/flashcards/src/main/java/com/vayunmathur/flashcards/data/CardTemplate.ktindex 7d8ee42326..c7c64c2524 100644--- a/flashcards/src/main/java/com/vayunmathur/flashcards/data/CardTemplate.kt+++ b/flashcards/src/main/java/com/vayunmathur/flashcards/data/CardTemplate.kt@@ -1,8 +1,8 @@ package com.vayunmathur.flashcards.data -import androidx.room.Entity-import androidx.room.Index-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.PrimaryKey import kotlinx.serialization.Serializable  /**
flashcards/src/main/java/com/vayunmathur/flashcards/data/Deck.kt
diff --git a/flashcards/src/main/java/com/vayunmathur/flashcards/data/Deck.kt b/flashcards/src/main/java/com/vayunmathur/flashcards/data/Deck.ktindex 15836e8c03..39af5aa408 100644--- a/flashcards/src/main/java/com/vayunmathur/flashcards/data/Deck.kt+++ b/flashcards/src/main/java/com/vayunmathur/flashcards/data/Deck.kt@@ -1,7 +1,7 @@ package com.vayunmathur.flashcards.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.ReorderableDatabaseItem import kotlinx.serialization.Serializable 
flashcards/src/main/java/com/vayunmathur/flashcards/data/FlashcardsDatabase.kt
diff --git a/flashcards/src/main/java/com/vayunmathur/flashcards/data/FlashcardsDatabase.kt b/flashcards/src/main/java/com/vayunmathur/flashcards/data/FlashcardsDatabase.ktindex a8cf3fb9e4..8e99b30386 100644--- a/flashcards/src/main/java/com/vayunmathur/flashcards/data/FlashcardsDatabase.kt+++ b/flashcards/src/main/java/com/vayunmathur/flashcards/data/FlashcardsDatabase.kt@@ -1,14 +1,15 @@ package com.vayunmathur.flashcards.data  import android.content.Context-import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Insert-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Upsert-import androidx.room.migration.Migration+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Insert+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.room3.migration.Migration+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseHelper import com.vayunmathur.library.util.DatabaseMigrations import kotlinx.coroutines.flow.Flow
flashcards/src/main/java/com/vayunmathur/flashcards/data/Note.kt
diff --git a/flashcards/src/main/java/com/vayunmathur/flashcards/data/Note.kt b/flashcards/src/main/java/com/vayunmathur/flashcards/data/Note.ktindex 1999a1a9e3..ffbd974c36 100644--- a/flashcards/src/main/java/com/vayunmathur/flashcards/data/Note.kt+++ b/flashcards/src/main/java/com/vayunmathur/flashcards/data/Note.kt@@ -1,8 +1,8 @@ package com.vayunmathur.flashcards.data -import androidx.room.Entity-import androidx.room.Index-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.ReorderableDatabaseItem import kotlinx.serialization.Serializable 
flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteType.kt
diff --git a/flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteType.kt b/flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteType.ktindex 7b38a5bec7..40e54665ea 100644--- a/flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteType.kt+++ b/flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteType.kt@@ -1,7 +1,7 @@ package com.vayunmathur.flashcards.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import kotlinx.serialization.Serializable  /** [NoteType.type] values (mirrors Anki's `models[*].type`). */
flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteTypeField.kt
diff --git a/flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteTypeField.kt b/flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteTypeField.ktindex 37608feda6..033db37c98 100644--- a/flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteTypeField.kt+++ b/flashcards/src/main/java/com/vayunmathur/flashcards/data/NoteTypeField.kt@@ -1,8 +1,8 @@ package com.vayunmathur.flashcards.data -import androidx.room.Entity-import androidx.room.Index-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.PrimaryKey import kotlinx.serialization.Serializable  /**
flashcards/src/main/java/com/vayunmathur/flashcards/data/ReviewLog.kt
diff --git a/flashcards/src/main/java/com/vayunmathur/flashcards/data/ReviewLog.kt b/flashcards/src/main/java/com/vayunmathur/flashcards/data/ReviewLog.ktindex d1cbf60af7..4b4fc7a4c8 100644--- a/flashcards/src/main/java/com/vayunmathur/flashcards/data/ReviewLog.kt+++ b/flashcards/src/main/java/com/vayunmathur/flashcards/data/ReviewLog.kt@@ -1,7 +1,7 @@ package com.vayunmathur.flashcards.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import kotlinx.serialization.Serializable  /**
games/hub/src/main/java/com/vayunmathur/games/hub/data/GamesHubDatabase.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/GamesHubDatabase.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/GamesHubDatabase.ktindex 3095dc99dc..16779f8730 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/GamesHubDatabase.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/GamesHubDatabase.kt@@ -1,8 +1,9 @@ package com.vayunmathur.games.hub.data -import androidx.room.Database-import androidx.room.RoomDatabase-import androidx.room.migration.Migration+import androidx.room3.Database+import androidx.room3.RoomDatabase+import androidx.room3.migration.Migration+import androidx.sqlite.execSQL import com.vayunmathur.games.hub.data.dao.ActivityDao import com.vayunmathur.games.hub.data.dao.AchievementDao import com.vayunmathur.games.hub.data.dao.GameDao
games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/AchievementDao.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/AchievementDao.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/AchievementDao.ktindex 60dc064e09..d0ca63dbc0 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/AchievementDao.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/AchievementDao.kt@@ -1,8 +1,8 @@ package com.vayunmathur.games.hub.data.dao -import androidx.room.Dao-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Query+import androidx.room3.Upsert import com.vayunmathur.games.hub.data.entities.AchievementDefEntity import com.vayunmathur.games.hub.data.entities.AchievementProgressEntity import kotlinx.coroutines.flow.Flow
games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ActivityDao.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ActivityDao.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ActivityDao.ktindex 6ccd0535a8..b6ebc80a30 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ActivityDao.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ActivityDao.kt@@ -1,8 +1,8 @@ package com.vayunmathur.games.hub.data.dao -import androidx.room.Dao-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Query+import androidx.room3.Upsert import com.vayunmathur.games.hub.data.entities.ActivityEventEntity import kotlinx.coroutines.flow.Flow 
games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/GameDao.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/GameDao.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/GameDao.ktindex 54b1f754cf..c0eb4d19ce 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/GameDao.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/GameDao.kt@@ -1,8 +1,8 @@ package com.vayunmathur.games.hub.data.dao -import androidx.room.Dao-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Query+import androidx.room3.Upsert import com.vayunmathur.games.hub.data.entities.HubGameEntity import kotlinx.coroutines.flow.Flow 
games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ProfileDao.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ProfileDao.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ProfileDao.ktindex ed4863f948..4d9a620bbd 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ProfileDao.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/ProfileDao.kt@@ -1,8 +1,8 @@ package com.vayunmathur.games.hub.data.dao -import androidx.room.Dao-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Query+import androidx.room3.Upsert import com.vayunmathur.games.hub.data.entities.PlayerProfileEntity import kotlinx.coroutines.flow.Flow 
games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/SessionDao.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/SessionDao.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/SessionDao.ktindex 4616105e37..b7b9761ba7 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/SessionDao.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/SessionDao.kt@@ -1,8 +1,8 @@ package com.vayunmathur.games.hub.data.dao -import androidx.room.Dao-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Query+import androidx.room3.Upsert import com.vayunmathur.games.hub.data.entities.PlaySessionEntity import kotlinx.coroutines.flow.Flow 
games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/StreakDao.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/StreakDao.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/StreakDao.ktindex d7d5dcd205..9718ea12eb 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/StreakDao.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/dao/StreakDao.kt@@ -1,8 +1,8 @@ package com.vayunmathur.games.hub.data.dao -import androidx.room.Dao-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Query+import androidx.room3.Upsert import com.vayunmathur.games.hub.data.entities.DailyStreakEntity import kotlinx.coroutines.flow.Flow 
games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementDefEntity.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementDefEntity.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementDefEntity.ktindex a5ba2d5af4..4be715b3ff 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementDefEntity.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementDefEntity.kt@@ -1,6 +1,6 @@ package com.vayunmathur.games.hub.data.entities -import androidx.room.Entity+import androidx.room3.Entity  @Entity(tableName = "achievement_defs", primaryKeys = ["gameId", "achievementId"]) data class AchievementDefEntity(
games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementProgressEntity.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementProgressEntity.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementProgressEntity.ktindex bb377ec16d..584dc9e21c 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementProgressEntity.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/AchievementProgressEntity.kt@@ -1,6 +1,6 @@ package com.vayunmathur.games.hub.data.entities -import androidx.room.Entity+import androidx.room3.Entity  @Entity(tableName = "achievement_progress", primaryKeys = ["gameId", "achievementId"]) data class AchievementProgressEntity(
games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/ActivityEventEntity.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/ActivityEventEntity.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/ActivityEventEntity.ktindex 8a8c9b5765..175a283e30 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/ActivityEventEntity.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/ActivityEventEntity.kt@@ -1,7 +1,7 @@ package com.vayunmathur.games.hub.data.entities -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  @Entity(tableName = "activity_events") data class ActivityEventEntity(
games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/DailyStreakEntity.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/DailyStreakEntity.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/DailyStreakEntity.ktindex df86d72116..32e62288f9 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/DailyStreakEntity.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/DailyStreakEntity.kt@@ -1,7 +1,7 @@ package com.vayunmathur.games.hub.data.entities -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  /**  * A game's daily-puzzle streak, mirrored from the game.
games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/HubGameEntity.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/HubGameEntity.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/HubGameEntity.ktindex 19799f24ff..7de404139f 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/HubGameEntity.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/HubGameEntity.kt@@ -1,7 +1,7 @@ package com.vayunmathur.games.hub.data.entities -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  @Entity(tableName = "hub_games") data class HubGameEntity(
games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlaySessionEntity.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlaySessionEntity.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlaySessionEntity.ktindex 1c2483041c..9b00f825cc 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlaySessionEntity.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlaySessionEntity.kt@@ -1,8 +1,8 @@ package com.vayunmathur.games.hub.data.entities -import androidx.room.Entity-import androidx.room.Index-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.PrimaryKey  @Entity(tableName = "play_sessions", indices = [Index(value = ["sessionId"], unique = true)]) data class PlaySessionEntity(
games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlayerProfileEntity.kt
diff --git a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlayerProfileEntity.kt b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlayerProfileEntity.ktindex c82af71c9a..a309c8679c 100644--- a/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlayerProfileEntity.kt+++ b/games/hub/src/main/java/com/vayunmathur/games/hub/data/entities/PlayerProfileEntity.kt@@ -1,7 +1,7 @@ package com.vayunmathur.games.hub.data.entities -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  @Entity(tableName = "player_profile") data class PlayerProfileEntity(
health/src/main/java/com/vayunmathur/health/data/FoodModels.kt
diff --git a/health/src/main/java/com/vayunmathur/health/data/FoodModels.kt b/health/src/main/java/com/vayunmathur/health/data/FoodModels.ktindex f95312f8be..a1e8bb4a60 100644--- a/health/src/main/java/com/vayunmathur/health/data/FoodModels.kt+++ b/health/src/main/java/com/vayunmathur/health/data/FoodModels.kt@@ -3,11 +3,11 @@ package com.vayunmathur.health.data  import kotlin.uuid.Uuid-import androidx.room.Embedded-import androidx.room.Entity-import androidx.room.ForeignKey-import androidx.room.Index-import androidx.room.PrimaryKey+import androidx.room3.Embedded+import androidx.room3.Entity+import androidx.room3.ForeignKey+import androidx.room3.Index+import androidx.room3.PrimaryKey  @Entity data class Ingredient(
health/src/main/java/com/vayunmathur/health/data/Record.kt
diff --git a/health/src/main/java/com/vayunmathur/health/data/Record.kt b/health/src/main/java/com/vayunmathur/health/data/Record.ktindex 3a2e5bb8cf..826c213ab7 100644--- a/health/src/main/java/com/vayunmathur/health/data/Record.kt+++ b/health/src/main/java/com/vayunmathur/health/data/Record.kt@@ -1,19 +1,20 @@ package com.vayunmathur.health.data-import androidx.room.Dao-import androidx.room.Database-import androidx.room.Embedded-import androidx.room.Entity-import androidx.room.Index-import androidx.room.Insert-import androidx.room.OnConflictStrategy-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverter-import androidx.room.TypeConverters-import androidx.room.Update-import androidx.room.Delete-import androidx.room.migration.Migration+import androidx.room3.ColumnTypeConverter+import androidx.room3.ColumnTypeConverters+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Embedded+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.Insert+import androidx.room3.OnConflictStrategy+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Update+import androidx.room3.Delete+import androidx.room3.migration.Migration+import androidx.sqlite.execSQL import kotlinx.serialization.Serializable import kotlinx.coroutines.flow.Flow import java.time.Instant@@ -350,7 +351,7 @@ interface HealthDao {     version = 5,     exportSchema = false )-@TypeConverters(Converters::class)+@ColumnTypeConverters(Converters::class) abstract class HealthDatabase : RoomDatabase() {     abstract fun healthDao(): HealthDao @@ -369,15 +370,15 @@ abstract class HealthDatabase : RoomDatabase() { }  class Converters {-    @TypeConverter+    @ColumnTypeConverter     fun fromTimestamp(value: Long?): Instant? = value?.let { Instant.ofEpochMilli(it) } -    @TypeConverter+    @ColumnTypeConverter     fun dateToTimestamp(date: Instant?): Long? = date?.toEpochMilli() -    @TypeConverter+    @ColumnTypeConverter     fun toTS(date: kotlin.time.Instant): Long = date.toEpochMilliseconds() -    @TypeConverter+    @ColumnTypeConverter     fun fromTS(timestamp: Long): kotlin.time.Instant = kotlin.time.Instant.fromEpochMilliseconds(timestamp) }\ No newline at end of file
launcher/src/main/java/com/vayunmathur/launcher/data/LauncherDatabase.kt
diff --git a/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherDatabase.kt b/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherDatabase.ktindex dbd5837b3c..52a5cc97cd 100644--- a/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherDatabase.kt+++ b/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherDatabase.kt@@ -1,13 +1,13 @@ package com.vayunmathur.launcher.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverters-import androidx.room.Upsert-import androidx.room.migration.Migration+import androidx.room3.ColumnTypeConverters+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.room3.migration.Migration import com.vayunmathur.launcher.domain.CONTAINER_DESKTOP import com.vayunmathur.launcher.domain.CONTAINER_HOTSEAT import com.vayunmathur.library.util.DatabaseMigrations@@ -79,7 +79,7 @@ interface LauncherItemDao {     suspend fun setRank(id: Long, rank: Int) } -@TypeConverters(DefaultConverters::class, LauncherConverters::class)+@ColumnTypeConverters(DefaultConverters::class, LauncherConverters::class) @Database(entities = [LauncherItemEntity::class], version = 1, exportSchema = false) abstract class LauncherDatabase : RoomDatabase() {     abstract fun itemDao(): LauncherItemDao
launcher/src/main/java/com/vayunmathur/launcher/data/LauncherItemEntity.kt
diff --git a/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherItemEntity.kt b/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherItemEntity.ktindex c446904ae7..446f38230c 100644--- a/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherItemEntity.kt+++ b/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherItemEntity.kt@@ -1,10 +1,10 @@ package com.vayunmathur.launcher.data -import androidx.room.ColumnInfo-import androidx.room.Entity-import androidx.room.Index-import androidx.room.PrimaryKey-import androidx.room.TypeConverter+import androidx.room3.ColumnInfo+import androidx.room3.ColumnTypeConverter+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.PrimaryKey import com.vayunmathur.launcher.domain.CellRect import com.vayunmathur.launcher.domain.ContainerRef import com.vayunmathur.launcher.domain.GridItem@@ -121,9 +121,9 @@ data class LauncherItemEntity(  * reordering the enum, which an ordinal column does not.  */ class LauncherConverters {-    @TypeConverter+    @ColumnTypeConverter     fun fromItemType(value: LauncherItemType): String = value.name -    @TypeConverter+    @ColumnTypeConverter     fun toItemType(value: String): LauncherItemType = LauncherItemType.valueOf(value) }
launcher/src/main/java/com/vayunmathur/launcher/data/LauncherRepository.kt
diff --git a/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherRepository.kt b/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherRepository.ktindex 0e3da0b3aa..46d6740e88 100644--- a/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherRepository.kt+++ b/launcher/src/main/java/com/vayunmathur/launcher/data/LauncherRepository.kt@@ -1,7 +1,7 @@ package com.vayunmathur.launcher.data  import android.content.Context-import androidx.room.withTransaction+import androidx.room3.withWriteTransaction import com.vayunmathur.launcher.domain.AutoPlacer import com.vayunmathur.launcher.domain.CellRect import com.vayunmathur.launcher.domain.ContainerRef@@ -24,7 +24,7 @@ import kotlinx.coroutines.flow.Flow  * grid invariants (no two items in one cell, no folder with one child, no widget row  * without a bound id) are enforced in one place.  *- * Writes that must not be seen half-done are wrapped in [withTransaction]: creating a+ * Writes that must not be seen half-done are wrapped in [withWriteTransaction]: creating a  * folder moves two items and inserts a third, and the workspace flow re-emits promptly  * enough that an intermediate state would render.  */@@ -61,7 +61,7 @@ class LauncherRepository private constructor(context: Context) :             return         }         val screen = dao.get(id)?.screen ?: 0-        db.withTransaction {+        db.withWriteTransaction {             displaced.forEach { (other, to) ->                 dao.move(other, ContainerRef.Desktop.toRaw(), screen, to.cellX, to.cellY, 0)             }@@ -91,8 +91,8 @@ class LauncherRepository private constructor(context: Context) :      * screen does not get it refilled on the next launch.      */     suspend fun seed(spec: GridSpec, apps: List<LauncherItemEntity>, hotseat: List<LauncherItemEntity>) {-        db.withTransaction {-            if (dao.count() > 0) return@withTransaction+        db.withWriteTransaction {+            if (dao.count() > 0) return@withWriteTransaction             val placements = AutoPlacer.placeAll(spec, emptyList(), apps.map { it.rect })             dao.upsertAll(                 apps.mapIndexed { index, app ->@@ -131,7 +131,7 @@ class LauncherRepository private constructor(context: Context) :             dao.move(id, container.toRaw(), screen, rect.cellX, rect.cellY, rank)             return         }-        db.withTransaction {+        db.withWriteTransaction {             // Displaced items are neighbours on the same page, so only their cell changes.             displaced.forEach { (other, to) ->                 dao.move(other, ContainerRef.Desktop.toRaw(), screen, to.cellX, to.cellY, 0)@@ -149,7 +149,7 @@ class LauncherRepository private constructor(context: Context) :      * row the database still holds and the screen never draws.      */     suspend fun moveToHotseat(id: Long, slot: Int, spec: GridSpec) {-        db.withTransaction {+        db.withWriteTransaction {             val plan = HotseatArrange.arrange(                 current = dao.getHotseatItems().map { it.id },                 id = id,@@ -189,10 +189,10 @@ class LauncherRepository private constructor(context: Context) :      * and both items become children ranked in drop order — target first, since it was      * already there.      */-    suspend fun createFolder(targetId: Long, draggedId: Long): Long? = db.withTransaction {-        val target = dao.get(targetId) ?: return@withTransaction null-        val dragged = dao.get(draggedId) ?: return@withTransaction null-        if (!FolderRules.canMerge(dragged.itemType, target.itemType)) return@withTransaction null+    suspend fun createFolder(targetId: Long, draggedId: Long): Long? = db.withWriteTransaction {+        val target = dao.get(targetId) ?: return@withWriteTransaction null+        val dragged = dao.get(draggedId) ?: return@withWriteTransaction null+        if (!FolderRules.canMerge(dragged.itemType, target.itemType)) return@withWriteTransaction null          val folderId = dao.upsert(             LauncherItemEntity(@@ -212,7 +212,7 @@ class LauncherRepository private constructor(context: Context) :      /** Appends [itemId] to an existing folder. */     suspend fun addToFolder(folderId: Long, itemId: Long) {-        db.withTransaction {+        db.withWriteTransaction {             val ranks = dao.getFolderChildren(folderId).map { it.rank }             dao.move(itemId, folderId, 0, 0, 0, FolderRules.nextRank(ranks))         }@@ -220,7 +220,7 @@ class LauncherRepository private constructor(context: Context) :      /** Moves [itemId] to [rank] within its folder, shifting the siblings it passes. */     suspend fun reorderInFolder(folderId: Long, itemId: Long, rank: Int) {-        db.withTransaction {+        db.withWriteTransaction {             val others = dao.getFolderChildren(folderId).filter { it.id != itemId }             val reordered = others.toMutableList()             val index = rank.coerceIn(0, reordered.size)@@ -241,14 +241,14 @@ class LauncherRepository private constructor(context: Context) :      * apps out of a folder look like the folder turning back into the other app.      */     suspend fun collapseFolderIfNeeded(folderId: Long) {-        db.withTransaction {+        db.withWriteTransaction {             val remaining = dao.getFolderChildren(folderId)             FolderRules.denseRanks(remaining.map { it.id }).forEach { (id, rank) ->                 dao.setRank(id, rank)             }-            if (!FolderRules.shouldCollapse(remaining.size)) return@withTransaction+            if (!FolderRules.shouldCollapse(remaining.size)) return@withWriteTransaction -            val folder = dao.get(folderId) ?: return@withTransaction+            val folder = dao.get(folderId) ?: return@withWriteTransaction             remaining.singleOrNull()?.let { survivor ->                 dao.move(                     survivor.id,@@ -275,8 +275,8 @@ class LauncherRepository private constructor(context: Context) :      * the data layer, and leaking the id means the provider keeps being updated for a      * widget nobody can see.      */-    suspend fun remove(id: Long): Int? = db.withTransaction {-        val item = dao.get(id) ?: return@withTransaction null+    suspend fun remove(id: Long): Int? = db.withWriteTransaction {+        val item = dao.get(id) ?: return@withWriteTransaction null         val container = item.container         // Deleting a folder takes its children with it - they have no cell of their own to         // fall back to, so leaving them would strand rows nothing can reach.@@ -302,7 +302,7 @@ class LauncherRepository private constructor(context: Context) :         installed: Set<PackageKey>,         unavailable: Set<PackageKey>,         boundWidgetIds: Set<Int>,-    ): List<Int> = db.withTransaction {+    ): List<Int> = db.withWriteTransaction {         val all = dao.getAll()         val actions = ReconcileUseCase.reconcile(             items = all.map { it.toReconcileItem() },@@ -329,7 +329,7 @@ class LauncherRepository private constructor(context: Context) :      /** Re-lays out the desktop for a new grid shape. */     suspend fun regrid(to: GridSpec) {-        db.withTransaction {+        db.withWriteTransaction {             val desktop = dao.getDesktopItems()             val moved = AutoPlacer.regrid(desktop.map { it.toGridItem() }, to)             val before = desktop.associateBy { it.id }
library/src/main/java/com/vayunmathur/library/util/RoomViewModel.kt
diff --git a/library/src/main/java/com/vayunmathur/library/util/RoomViewModel.kt b/library/src/main/java/com/vayunmathur/library/util/RoomViewModel.ktindex 9381c1e403..6fd2b1b044 100644--- a/library/src/main/java/com/vayunmathur/library/util/RoomViewModel.kt+++ b/library/src/main/java/com/vayunmathur/library/util/RoomViewModel.kt@@ -1,12 +1,12 @@ package com.vayunmathur.library.util +import androidx.room3.ColumnTypeConverter import androidx.room3.Dao import androidx.room3.Delete import androidx.room3.Entity import androidx.room3.PrimaryKey import androidx.room3.Query import androidx.room3.RoomDatabase-import androidx.room3.ColumnTypeConverter import androidx.room3.Upsert import androidx.room3.migration.Migration import kotlinx.coroutines.flow.Flow
lint-rules/src/main/java/com/vayunmathur/lint/ModernAppsIssueRegistry.kt
diff --git a/lint-rules/src/main/java/com/vayunmathur/lint/ModernAppsIssueRegistry.kt b/lint-rules/src/main/java/com/vayunmathur/lint/ModernAppsIssueRegistry.ktindex fea4df39e4..45a6c25ba5 100644--- a/lint-rules/src/main/java/com/vayunmathur/lint/ModernAppsIssueRegistry.kt+++ b/lint-rules/src/main/java/com/vayunmathur/lint/ModernAppsIssueRegistry.kt@@ -14,6 +14,7 @@ class ModernAppsIssueRegistry : IssueRegistry() {         OneComposablePerFileDetector.ISSUE,         PackageStructureDetector.ISSUE,         RawScaffoldInAppDetector.ISSUE,+        Room2UsageDetector.ISSUE,         WindowInsetsInReusableComponentDetector.ISSUE,     ) 
lint-rules/src/main/java/com/vayunmathur/lint/Room2UsageDetector.kt
diff --git a/lint-rules/src/main/java/com/vayunmathur/lint/Room2UsageDetector.kt b/lint-rules/src/main/java/com/vayunmathur/lint/Room2UsageDetector.ktnew file mode 100644index 0000000000..402d6f681e--- /dev/null+++ b/lint-rules/src/main/java/com/vayunmathur/lint/Room2UsageDetector.kt@@ -0,0 +1,91 @@+package com.vayunmathur.lint++import com.android.tools.lint.client.api.UElementHandler+import com.android.tools.lint.detector.api.Category+import com.android.tools.lint.detector.api.Detector+import com.android.tools.lint.detector.api.Implementation+import com.android.tools.lint.detector.api.Issue+import com.android.tools.lint.detector.api.JavaContext+import com.android.tools.lint.detector.api.Location+import com.android.tools.lint.detector.api.Scope+import com.android.tools.lint.detector.api.Severity+import com.android.tools.lint.detector.api.SourceCodeScanner+import org.jetbrains.uast.UElement+import org.jetbrains.uast.UFile++/**+ * Forbids first-party use of Room 2 (`androidx.room.*`). Room 3 (`androidx.room3.*`) is the+ * only version this repo targets; Room 2 is in maintenance mode and its `SupportSQLite` API+ * has no SQLCipher driver path.+ *+ * Room 2 stays in the *runtime* classpath regardless, because `androidx.work:work-runtime`+ * depends on it for its internal `WorkDatabase` and 13 modules use WorkManager. That is+ * harmless — Room 3 took a new maven group and package precisely so the two can coexist — so+ * the achievable goal, and what this rule enforces, is zero *first-party* Room 2 usage.+ *+ * Matching is done on the file's source text rather than on resolved imports or method calls,+ * because several databases reference Room 2 by fully-qualified name with no import at all+ * (`object : androidx.room.migration.Migration(1, 2)`), which an import-only or+ * `getApplicableMethodNames()` check would miss entirely.+ */+class Room2UsageDetector : Detector(), SourceCodeScanner {++    override fun getApplicableUastTypes(): List<Class<out UElement>> =+        listOf(UFile::class.java)++    override fun createUastHandler(context: JavaContext): UElementHandler =+        object : UElementHandler() {+            override fun visitFile(node: UFile) {+                val source = node.sourcePsi?.text ?: return+                val file = context.file ?: return++                var from = source.indexOf(ROOM2_PREFIX)+                while (from >= 0) {+                    context.report(+                        ISSUE,+                        node,+                        Location.create(file, source, from, from + ROOM2_PREFIX.length),+                        "Room 2 is not used in this repo. Replace `androidx.room.` with " ++                            "`androidx.room3.` (`@TypeConverter`/`@TypeConverters` became " ++                            "`@ColumnTypeConverter`/`@ColumnTypeConverters`, and " ++                            "`RoomDatabase.withTransaction` became `withWriteTransaction`).",+                    )+                    from = source.indexOf(ROOM2_PREFIX, from + ROOM2_PREFIX.length)+                }+            }+        }++    companion object {+        // The trailing dot is what keeps `androidx.room3.` from matching.+        private const val ROOM2_PREFIX = "androidx.room."++        val ISSUE: Issue = Issue.create(+            id = "Room2Usage",+            briefDescription = "Room 2 (androidx.room) used instead of Room 3",+            explanation = """+                This repo is on Room 3 (`androidx.room3`). Room 2 (`androidx.room`) is in \+                maintenance mode and, more importantly, its `SupportSQLite` API is the one \+                Room 3 dropped — `openHelperFactory(...)` no longer exists, so the SQLCipher \+                encryption used by every database here is wired through \+                `setDriver(SQLCipherDriver(...))` instead.++                Replace `androidx.room.` with `androidx.room3.`. Three renames are not \+                mechanical: `@TypeConverter` and `@TypeConverters` are `@ColumnTypeConverter` \+                and `@ColumnTypeConverters`; `RoomDatabase.withTransaction { }` is \+                `withWriteTransaction { }` (or `withReadTransaction`); and `Migration.migrate` \+                takes a suspending `androidx.sqlite.SQLiteConnection` rather than a \+                `SupportSQLiteDatabase`.++                Room 2 remaining on the runtime classpath via `androidx.work:work-runtime` is \+                expected and must not be excluded — WorkManager needs it for `WorkDatabase`.+                """.trimIndent(),+            category = Category.CORRECTNESS,+            priority = 8,+            severity = Severity.ERROR,+            implementation = Implementation(+                Room2UsageDetector::class.java,+                Scope.JAVA_FILE_SCOPE,+            ),+        )+    }+}
music/src/main/java/com/vayunmathur/music/data/Album.kt
diff --git a/music/src/main/java/com/vayunmathur/music/data/Album.kt b/music/src/main/java/com/vayunmathur/music/data/Album.ktindex 735db7e03d..37709a4548 100644--- a/music/src/main/java/com/vayunmathur/music/data/Album.kt+++ b/music/src/main/java/com/vayunmathur/music/data/Album.kt@@ -3,8 +3,8 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.getValue import androidx.compose.runtime.remember-import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import com.vayunmathur.music.platform.MusicViewModel import kotlinx.serialization.Serializable
music/src/main/java/com/vayunmathur/music/data/Artist.kt
diff --git a/music/src/main/java/com/vayunmathur/music/data/Artist.kt b/music/src/main/java/com/vayunmathur/music/data/Artist.ktindex 80232916e5..d52e674b7d 100644--- a/music/src/main/java/com/vayunmathur/music/data/Artist.kt+++ b/music/src/main/java/com/vayunmathur/music/data/Artist.kt@@ -1,6 +1,6 @@ package com.vayunmathur.music.data-import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable 
music/src/main/java/com/vayunmathur/music/data/Music.kt
diff --git a/music/src/main/java/com/vayunmathur/music/data/Music.kt b/music/src/main/java/com/vayunmathur/music/data/Music.ktindex 71003057c3..8b6234de0e 100644--- a/music/src/main/java/com/vayunmathur/music/data/Music.kt+++ b/music/src/main/java/com/vayunmathur/music/data/Music.kt@@ -1,6 +1,6 @@ package com.vayunmathur.music.data-import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable 
music/src/main/java/com/vayunmathur/music/data/MusicDatabase.kt
diff --git a/music/src/main/java/com/vayunmathur/music/data/MusicDatabase.kt b/music/src/main/java/com/vayunmathur/music/data/MusicDatabase.ktindex 29c5fe079e..6a6d2ceb0c 100644--- a/music/src/main/java/com/vayunmathur/music/data/MusicDatabase.kt+++ b/music/src/main/java/com/vayunmathur/music/data/MusicDatabase.kt@@ -1,14 +1,15 @@ package com.vayunmathur.music.data-import androidx.room.Dao-import androidx.room.Database-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverters-import androidx.room.Upsert+import androidx.room3.ColumnTypeConverters+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DefaultConverters import com.vayunmathur.library.util.ManyManyMatching import com.vayunmathur.library.util.MatchingDao-import androidx.room.migration.Migration+import androidx.room3.migration.Migration import kotlinx.coroutines.flow.Flow  @Dao@@ -61,7 +62,7 @@ interface PlaylistDao {     suspend fun deleteById(id: Long) } -@TypeConverters(DefaultConverters::class)+@ColumnTypeConverters(DefaultConverters::class) @Database(entities = [Music::class, Album::class, Artist::class, Playlist::class, ManyManyMatching::class], version = 4, exportSchema = false) abstract class MusicDatabase: RoomDatabase() {     abstract fun musicDao(): MusicDao
music/src/main/java/com/vayunmathur/music/data/Playlist.kt
diff --git a/music/src/main/java/com/vayunmathur/music/data/Playlist.kt b/music/src/main/java/com/vayunmathur/music/data/Playlist.ktindex 08ef5b7f0c..4b2a2811c0 100644--- a/music/src/main/java/com/vayunmathur/music/data/Playlist.kt+++ b/music/src/main/java/com/vayunmathur/music/data/Playlist.kt@@ -1,6 +1,6 @@ package com.vayunmathur.music.data-import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable 
musicbrainz/src/main/java/com/vayunmathur/musicbrainz/data/MusicBrainzDatabase.kt
diff --git a/musicbrainz/src/main/java/com/vayunmathur/musicbrainz/data/MusicBrainzDatabase.kt b/musicbrainz/src/main/java/com/vayunmathur/musicbrainz/data/MusicBrainzDatabase.ktindex 0a591c2580..ed0358f558 100644--- a/musicbrainz/src/main/java/com/vayunmathur/musicbrainz/data/MusicBrainzDatabase.kt+++ b/musicbrainz/src/main/java/com/vayunmathur/musicbrainz/data/MusicBrainzDatabase.kt@@ -1,12 +1,12 @@ package com.vayunmathur.musicbrainz.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert  /**  * One audio file found in the user's music folder.
networklocation/build.gradle.kts
diff --git a/networklocation/build.gradle.kts b/networklocation/build.gradle.ktsindex f345e1e50a..b75d5c44b7 100644--- a/networklocation/build.gradle.kts+++ b/networklocation/build.gradle.kts@@ -160,7 +160,10 @@ dependencies {     // Apple gs-loc request/response wire format (proto/apple_wps.proto).     implementation(libs.protobuf.javalite)     // Beacon-location cache (in-memory TimedLruCache in front of a Room table).+    // No SQLCipher here — the cache holds only public beacon coordinates, so it uses+    // AndroidSQLiteDriver (platform SQLite), which Room 3 requires to be set explicitly.     implementRoom(libs)+    implementation(libs.androidx.sqlite.framework)     // Reporting loop + IO for the gs-loc queries.     implementation(libs.kotlinx.coroutines.android)     // The offline geocoder search runs natively (Rust/ruzstd) over the bundled geocoder.geodb
networklocation/src/main/java/com/vayunmathur/networklocation/cache/BeaconCache.kt
diff --git a/networklocation/src/main/java/com/vayunmathur/networklocation/cache/BeaconCache.kt b/networklocation/src/main/java/com/vayunmathur/networklocation/cache/BeaconCache.ktindex 318e235a27..2cce992812 100644--- a/networklocation/src/main/java/com/vayunmathur/networklocation/cache/BeaconCache.kt+++ b/networklocation/src/main/java/com/vayunmathur/networklocation/cache/BeaconCache.kt@@ -1,14 +1,15 @@ package com.vayunmathur.networklocation.cache  import android.content.Context-import androidx.room.Dao-import androidx.room.Database-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.Room-import androidx.room.RoomDatabase-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.Room+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.sqlite.driver.AndroidSQLiteDriver import com.vayunmathur.networklocation.BeaconFix import com.vayunmathur.networklocation.BeaconId @@ -61,7 +62,7 @@ class BeaconCache(             context.applicationContext,             BeaconDatabase::class.java,             "networklocation-beacons",-        ).build().beaconDao()+        ).setDriver(AndroidSQLiteDriver()).build().beaconDao()      /** Fetch cached fixes for [ids], checking memory first then the DB. */     suspend fun get(ids: List<BeaconId>): Map<BeaconId, BeaconFix> {
notes/src/main/java/com/vayunmathur/notes/data/Note.kt
diff --git a/notes/src/main/java/com/vayunmathur/notes/data/Note.kt b/notes/src/main/java/com/vayunmathur/notes/data/Note.ktindex b9aa6ad5e2..7dbef60e21 100644--- a/notes/src/main/java/com/vayunmathur/notes/data/Note.kt+++ b/notes/src/main/java/com/vayunmathur/notes/data/Note.kt@@ -1,7 +1,7 @@ package com.vayunmathur.notes.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.ReorderableDatabaseItem import kotlinx.serialization.Serializable 
notes/src/main/java/com/vayunmathur/notes/data/NoteDatabase.kt
diff --git a/notes/src/main/java/com/vayunmathur/notes/data/NoteDatabase.kt b/notes/src/main/java/com/vayunmathur/notes/data/NoteDatabase.ktindex 939e79911c..dac375ba2b 100644--- a/notes/src/main/java/com/vayunmathur/notes/data/NoteDatabase.kt+++ b/notes/src/main/java/com/vayunmathur/notes/data/NoteDatabase.kt@@ -1,15 +1,16 @@ package com.vayunmathur.notes.data  import android.content.Context-import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseHelper import com.vayunmathur.library.util.DatabaseMigrations-import androidx.room.migration.Migration+import androidx.room3.migration.Migration import kotlinx.coroutines.flow.Flow  const val DB_NAME = "notes-db"
openassistant/src/main/java/com/vayunmathur/openassistant/data/Database.kt
diff --git a/openassistant/src/main/java/com/vayunmathur/openassistant/data/Database.kt b/openassistant/src/main/java/com/vayunmathur/openassistant/data/Database.ktindex 8531d8289f..c6d2c055f6 100644--- a/openassistant/src/main/java/com/vayunmathur/openassistant/data/Database.kt+++ b/openassistant/src/main/java/com/vayunmathur/openassistant/data/Database.kt@@ -1,16 +1,17 @@ package com.vayunmathur.openassistant.data-import androidx.room.PrimaryKey+import androidx.room3.ColumnTypeConverters+import androidx.room3.PrimaryKey+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseItem-import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Entity-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverters-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Entity+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert import com.vayunmathur.library.util.DefaultConverters-import androidx.room.migration.Migration+import androidx.room3.migration.Migration import kotlinx.coroutines.flow.Flow  @Entity@@ -98,7 +99,7 @@ interface MemoryDao {     suspend fun delete(value: Memory): Int } -@TypeConverters(DefaultConverters::class)+@ColumnTypeConverters(DefaultConverters::class) @Database(entities = [Conversation::class, Message::class, Memory::class], version = 3, exportSchema = false) abstract class AppDatabase: RoomDatabase() {     abstract fun conversationDao(): ConversationDao
passwords/src/main/java/com/vayunmathur/passwords/data/Converters.kt
diff --git a/passwords/src/main/java/com/vayunmathur/passwords/data/Converters.kt b/passwords/src/main/java/com/vayunmathur/passwords/data/Converters.ktindex 8db357e41c..3c726e8a08 100644--- a/passwords/src/main/java/com/vayunmathur/passwords/data/Converters.kt+++ b/passwords/src/main/java/com/vayunmathur/passwords/data/Converters.kt@@ -1,15 +1,15 @@ package com.vayunmathur.passwords.data -import androidx.room.TypeConverter+import androidx.room3.ColumnTypeConverter  object Converters {     private const val DELIM = "|||" -    @TypeConverter+    @ColumnTypeConverter     @JvmStatic     fun fromWebsites(list: List<String>?): String = (list ?: emptyList()).joinToString(DELIM) -    @TypeConverter+    @ColumnTypeConverter     @JvmStatic     fun toWebsites(value: String?): List<String> = value?.takeIf { it.isNotEmpty() }?.split(DELIM) ?: emptyList() }
passwords/src/main/java/com/vayunmathur/passwords/data/Passkey.kt
diff --git a/passwords/src/main/java/com/vayunmathur/passwords/data/Passkey.kt b/passwords/src/main/java/com/vayunmathur/passwords/data/Passkey.ktindex 15caa80ede..a046ab6e6e 100644--- a/passwords/src/main/java/com/vayunmathur/passwords/data/Passkey.kt+++ b/passwords/src/main/java/com/vayunmathur/passwords/data/Passkey.kt@@ -1,7 +1,7 @@ package com.vayunmathur.passwords.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem  @Entity
passwords/src/main/java/com/vayunmathur/passwords/data/Password.kt
diff --git a/passwords/src/main/java/com/vayunmathur/passwords/data/Password.kt b/passwords/src/main/java/com/vayunmathur/passwords/data/Password.ktindex f3c99dc52c..7dc0ac03e2 100644--- a/passwords/src/main/java/com/vayunmathur/passwords/data/Password.kt+++ b/passwords/src/main/java/com/vayunmathur/passwords/data/Password.kt@@ -1,6 +1,6 @@ package com.vayunmathur.passwords.data-import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable 
passwords/src/main/java/com/vayunmathur/passwords/data/PasswordDatabase.kt
diff --git a/passwords/src/main/java/com/vayunmathur/passwords/data/PasswordDatabase.kt b/passwords/src/main/java/com/vayunmathur/passwords/data/PasswordDatabase.ktindex 88c2795eac..c97bf721ed 100644--- a/passwords/src/main/java/com/vayunmathur/passwords/data/PasswordDatabase.kt+++ b/passwords/src/main/java/com/vayunmathur/passwords/data/PasswordDatabase.kt@@ -1,13 +1,14 @@ package com.vayunmathur.passwords.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverters-import androidx.room.Upsert-import androidx.room.migration.Migration+import androidx.room3.ColumnTypeConverters+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.room3.migration.Migration+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseMigrations import kotlinx.coroutines.flow.Flow @@ -66,7 +67,7 @@ abstract class PasskeyDao {     version = 4,     exportSchema = false, )-@TypeConverters(Converters::class)+@ColumnTypeConverters(Converters::class) abstract class PasswordDatabase : RoomDatabase() {     abstract fun passwordDao(): PasswordDao     abstract fun passkeyDao(): PasskeyDao
passwords/src/main/java/com/vayunmathur/passwords/data/PasswordRepository.kt
diff --git a/passwords/src/main/java/com/vayunmathur/passwords/data/PasswordRepository.kt b/passwords/src/main/java/com/vayunmathur/passwords/data/PasswordRepository.ktindex 29c0436790..53755a2005 100644--- a/passwords/src/main/java/com/vayunmathur/passwords/data/PasswordRepository.kt+++ b/passwords/src/main/java/com/vayunmathur/passwords/data/PasswordRepository.kt@@ -1,7 +1,7 @@ package com.vayunmathur.passwords.data  import android.content.Context-import androidx.room.withTransaction+import androidx.room3.withWriteTransaction import com.vayunmathur.library.room.RoomRepository import kotlinx.coroutines.flow.Flow @@ -80,7 +80,7 @@ class PasswordRepository private constructor(context: Context) :     // Transaction     // ------------------------------------------------------------------ -    suspend fun <R> withTransaction(block: suspend () -> R): R = db.withTransaction(block)+    suspend fun <R> withTransaction(block: suspend () -> R): R = db.withWriteTransaction { block() }      companion object {         @Volatile
passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshot.kt
diff --git a/passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshot.kt b/passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshot.ktindex 4d2c57e0db..b6ca0a8525 100644--- a/passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshot.kt+++ b/passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshot.kt@@ -1,7 +1,7 @@ package com.vayunmathur.passwords.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import java.util.UUID  /** Opaque 32-char identity shared between a local row and its kdbx entry. */
passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshotDao.kt
diff --git a/passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshotDao.kt b/passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshotDao.ktindex 1d394d0d0c..0315a6397e 100644--- a/passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshotDao.kt+++ b/passwords/src/main/java/com/vayunmathur/passwords/data/SyncSnapshotDao.kt@@ -1,8 +1,8 @@ package com.vayunmathur.passwords.data -import androidx.room.Dao-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Query+import androidx.room3.Upsert  @Dao interface SyncSnapshotDao {
passwords/src/main/java/com/vayunmathur/passwords/sync/KdbxSyncEngine.kt
diff --git a/passwords/src/main/java/com/vayunmathur/passwords/sync/KdbxSyncEngine.kt b/passwords/src/main/java/com/vayunmathur/passwords/sync/KdbxSyncEngine.ktindex a2ff3df4b5..d90bf6893f 100644--- a/passwords/src/main/java/com/vayunmathur/passwords/sync/KdbxSyncEngine.kt+++ b/passwords/src/main/java/com/vayunmathur/passwords/sync/KdbxSyncEngine.kt@@ -3,7 +3,7 @@ package com.vayunmathur.passwords.sync import android.content.Context import android.net.Uri import androidx.core.net.toUri-import androidx.room.withTransaction+import androidx.room3.withWriteTransaction import com.vayunmathur.passwords.data.Passkey import com.vayunmathur.passwords.data.PasskeyDao import com.vayunmathur.passwords.data.Password@@ -76,7 +76,7 @@ class KdbxSyncEngine(         db.passkeyDao(),         db.syncSnapshotDao(),         codec,-        { db.withTransaction(it) },+        { block -> db.withWriteTransaction { block() } },     )      constructor(repository: PasswordRepository, codec: KdbxCodec) : this(
photos/src/main/java/com/vayunmathur/photos/data/FaceData.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/data/FaceData.kt b/photos/src/main/java/com/vayunmathur/photos/data/FaceData.ktindex 65859b4252..8b3c34b34f 100644--- a/photos/src/main/java/com/vayunmathur/photos/data/FaceData.kt+++ b/photos/src/main/java/com/vayunmathur/photos/data/FaceData.kt@@ -1,11 +1,11 @@ package com.vayunmathur.photos.data -import androidx.room.Dao-import androidx.room.Entity-import androidx.room.Index-import androidx.room.Insert-import androidx.room.PrimaryKey-import androidx.room.Query+import androidx.room3.Dao+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.Insert+import androidx.room3.PrimaryKey+import androidx.room3.Query import kotlinx.coroutines.flow.Flow  /**
photos/src/main/java/com/vayunmathur/photos/data/Photo.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/data/Photo.kt b/photos/src/main/java/com/vayunmathur/photos/data/Photo.ktindex 1c4cbfb632..fc0fa7c882 100644--- a/photos/src/main/java/com/vayunmathur/photos/data/Photo.kt+++ b/photos/src/main/java/com/vayunmathur/photos/data/Photo.kt@@ -1,9 +1,9 @@ package com.vayunmathur.photos.data -import androidx.room.Embedded-import androidx.room.Entity-import androidx.room.Index-import androidx.room.PrimaryKey+import androidx.room3.Embedded+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable 
photos/src/main/java/com/vayunmathur/photos/data/PhotoDatabase.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/data/PhotoDatabase.kt b/photos/src/main/java/com/vayunmathur/photos/data/PhotoDatabase.ktindex 8d5c00d6e8..7ca50b2bbf 100644--- a/photos/src/main/java/com/vayunmathur/photos/data/PhotoDatabase.kt+++ b/photos/src/main/java/com/vayunmathur/photos/data/PhotoDatabase.kt@@ -1,13 +1,14 @@ package com.vayunmathur.photos.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Transaction-import androidx.room.Upsert-import androidx.room.migration.Migration+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Transaction+import androidx.room3.Upsert+import androidx.room3.migration.Migration+import androidx.sqlite.execSQL import kotlinx.coroutines.flow.Flow  @Dao
photos/src/main/java/com/vayunmathur/photos/data/PhotosRepository.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/data/PhotosRepository.kt b/photos/src/main/java/com/vayunmathur/photos/data/PhotosRepository.ktindex 7ead9d3b02..387f32abee 100644--- a/photos/src/main/java/com/vayunmathur/photos/data/PhotosRepository.kt+++ b/photos/src/main/java/com/vayunmathur/photos/data/PhotosRepository.kt@@ -2,7 +2,7 @@ package com.vayunmathur.photos.data  import android.content.Context import com.vayunmathur.library.room.RoomRepository-import androidx.room.withTransaction+import androidx.room3.withWriteTransaction import kotlinx.coroutines.flow.Flow  /**@@ -84,7 +84,7 @@ class PhotosRepository private constructor(context: Context) :      * them. Delete-then-insert also makes a re-scan idempotent on its own.      */     suspend fun commitFaceScan(photoIds: List<Long>, faces: List<PhotoFace>) =-        db.withTransaction {+        db.withWriteTransaction {             faceDao.deletePhotoFacesByPhotoIds(photoIds)             if (faces.isNotEmpty()) faceDao.insertPhotoFaces(faces)             photoDao.setFaceScanned(photoIds)
photos/src/main/java/com/vayunmathur/photos/data/VaultDatabase.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/data/VaultDatabase.kt b/photos/src/main/java/com/vayunmathur/photos/data/VaultDatabase.ktindex 324ea4b8e3..8e1d89220b 100644--- a/photos/src/main/java/com/vayunmathur/photos/data/VaultDatabase.kt+++ b/photos/src/main/java/com/vayunmathur/photos/data/VaultDatabase.kt@@ -1,13 +1,13 @@ package com.vayunmathur.photos.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert import com.vayunmathur.library.util.DatabaseItem import kotlinx.coroutines.flow.Flow import kotlinx.serialization.Serializable
photos/src/main/java/com/vayunmathur/photos/data/VaultRepository.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/data/VaultRepository.kt b/photos/src/main/java/com/vayunmathur/photos/data/VaultRepository.ktindex 52a09630a5..d4bd134ed6 100644--- a/photos/src/main/java/com/vayunmathur/photos/data/VaultRepository.kt+++ b/photos/src/main/java/com/vayunmathur/photos/data/VaultRepository.kt@@ -1,7 +1,7 @@ package com.vayunmathur.photos.data  import android.content.Context-import androidx.room.migration.Migration+import androidx.room3.migration.Migration import com.vayunmathur.library.room.RoomRepository import kotlinx.coroutines.flow.Flow 
travel/src/main/java/com/vayunmathur/travel/data/BookedTrip.kt
diff --git a/travel/src/main/java/com/vayunmathur/travel/data/BookedTrip.kt b/travel/src/main/java/com/vayunmathur/travel/data/BookedTrip.ktindex cc74a62cd8..d473485af8 100644--- a/travel/src/main/java/com/vayunmathur/travel/data/BookedTrip.kt+++ b/travel/src/main/java/com/vayunmathur/travel/data/BookedTrip.kt@@ -1,7 +1,7 @@ package com.vayunmathur.travel.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  /**  * A booked trip, persisted after a successful order so it shows up under "My
travel/src/main/java/com/vayunmathur/travel/data/Customer.kt
diff --git a/travel/src/main/java/com/vayunmathur/travel/data/Customer.kt b/travel/src/main/java/com/vayunmathur/travel/data/Customer.ktindex b703e2c385..ecdfd91d3a 100644--- a/travel/src/main/java/com/vayunmathur/travel/data/Customer.kt+++ b/travel/src/main/java/com/vayunmathur/travel/data/Customer.kt@@ -1,7 +1,7 @@ package com.vayunmathur.travel.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  /**  * A saved Duffel customer user. [id] is the Duffel customer-user id (`icu_…`)
travel/src/main/java/com/vayunmathur/travel/data/FrequentFlyer.kt
diff --git a/travel/src/main/java/com/vayunmathur/travel/data/FrequentFlyer.kt b/travel/src/main/java/com/vayunmathur/travel/data/FrequentFlyer.ktindex 837dfe57e8..f8b86be642 100644--- a/travel/src/main/java/com/vayunmathur/travel/data/FrequentFlyer.kt+++ b/travel/src/main/java/com/vayunmathur/travel/data/FrequentFlyer.kt@@ -1,7 +1,7 @@ package com.vayunmathur.travel.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  /**  * A saved frequent-flyer account. Keyed by [airlineIata] (one account per
travel/src/main/java/com/vayunmathur/travel/data/RecentSearch.kt
diff --git a/travel/src/main/java/com/vayunmathur/travel/data/RecentSearch.kt b/travel/src/main/java/com/vayunmathur/travel/data/RecentSearch.ktindex 1644755aa1..c0278a91d2 100644--- a/travel/src/main/java/com/vayunmathur/travel/data/RecentSearch.kt+++ b/travel/src/main/java/com/vayunmathur/travel/data/RecentSearch.kt@@ -1,7 +1,7 @@ package com.vayunmathur.travel.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  /** Recent searches are flights-only now, but the column is kept for history. */ enum class Vertical { FLIGHTS }
travel/src/main/java/com/vayunmathur/travel/data/TravelDatabase.kt
diff --git a/travel/src/main/java/com/vayunmathur/travel/data/TravelDatabase.kt b/travel/src/main/java/com/vayunmathur/travel/data/TravelDatabase.ktindex 00718e07e7..ccfe9be195 100644--- a/travel/src/main/java/com/vayunmathur/travel/data/TravelDatabase.kt+++ b/travel/src/main/java/com/vayunmathur/travel/data/TravelDatabase.kt@@ -1,12 +1,14 @@ package com.vayunmathur.travel.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Insert-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Insert+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.sqlite.SQLiteConnection+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseMigrations import kotlinx.coroutines.flow.Flow @@ -95,17 +97,17 @@ abstract class TravelDatabase : RoomDatabase() {      companion object : DatabaseMigrations {         override val migrations = listOf(-            object : androidx.room.migration.Migration(1, 2) {-                override fun migrate(db: androidx.sqlite.db.SupportSQLiteDatabase) {-                    db.execSQL("ALTER TABLE BookedTrip ADD COLUMN type TEXT NOT NULL DEFAULT 'flight'")-                    db.execSQL("ALTER TABLE BookedTrip ADD COLUMN awaitingPayment INTEGER NOT NULL DEFAULT 0")-                    db.execSQL("ALTER TABLE BookedTrip ADD COLUMN paymentRequiredBy TEXT NOT NULL DEFAULT ''")-                    db.execSQL("ALTER TABLE BookedTrip ADD COLUMN remoteSyncedAt INTEGER NOT NULL DEFAULT 0")+            object : androidx.room3.migration.Migration(1, 2) {+                override suspend fun migrate(connection: SQLiteConnection) {+                    connection.execSQL("ALTER TABLE BookedTrip ADD COLUMN type TEXT NOT NULL DEFAULT 'flight'")+                    connection.execSQL("ALTER TABLE BookedTrip ADD COLUMN awaitingPayment INTEGER NOT NULL DEFAULT 0")+                    connection.execSQL("ALTER TABLE BookedTrip ADD COLUMN paymentRequiredBy TEXT NOT NULL DEFAULT ''")+                    connection.execSQL("ALTER TABLE BookedTrip ADD COLUMN remoteSyncedAt INTEGER NOT NULL DEFAULT 0")                 }             },-            object : androidx.room.migration.Migration(2, 3) {-                override fun migrate(db: androidx.sqlite.db.SupportSQLiteDatabase) {-                    db.execSQL(+            object : androidx.room3.migration.Migration(2, 3) {+                override suspend fun migrate(connection: SQLiteConnection) {+                    connection.execSQL(                         "CREATE TABLE IF NOT EXISTS FrequentFlyer (" +                             "airlineIata TEXT NOT NULL PRIMARY KEY, " +                             "accountNumber TEXT NOT NULL, " +@@ -113,9 +115,9 @@ abstract class TravelDatabase : RoomDatabase() {                     )                 }             },-            object : androidx.room.migration.Migration(3, 4) {-                override fun migrate(db: androidx.sqlite.db.SupportSQLiteDatabase) {-                    db.execSQL(+            object : androidx.room3.migration.Migration(3, 4) {+                override suspend fun migrate(connection: SQLiteConnection) {+                    connection.execSQL(                         "CREATE TABLE IF NOT EXISTS Customer (" +                             "id TEXT NOT NULL PRIMARY KEY, " +                             "email TEXT NOT NULL, " +@@ -123,7 +125,7 @@ abstract class TravelDatabase : RoomDatabase() {                             "familyName TEXT NOT NULL, " +                             "phoneNumber TEXT NOT NULL DEFAULT '')"                     )-                    db.execSQL("ALTER TABLE BookedTrip ADD COLUMN customerId TEXT NOT NULL DEFAULT ''")+                    connection.execSQL("ALTER TABLE BookedTrip ADD COLUMN customerId TEXT NOT NULL DEFAULT ''")                 }             },         )
vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogDao.kt
diff --git a/vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogDao.kt b/vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogDao.ktindex 987a667458..5db9444281 100644--- a/vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogDao.kt+++ b/vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogDao.kt@@ -1,8 +1,8 @@ package com.vayunmathur.vpn.data -import androidx.room.Dao-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Query+import androidx.room3.Upsert import kotlinx.coroutines.flow.Flow  @Dao
vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogEntity.kt
diff --git a/vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogEntity.kt b/vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogEntity.ktindex 7bb29f7703..06f16c375d 100644--- a/vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogEntity.kt+++ b/vpn/src/main/java/com/vayunmathur/vpn/data/ConnectionLogEntity.kt@@ -1,8 +1,8 @@ package com.vayunmathur.vpn.data -import androidx.room.Entity-import androidx.room.Index-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.Index+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem  /**
vpn/src/main/java/com/vayunmathur/vpn/data/VpnDatabase.kt
diff --git a/vpn/src/main/java/com/vayunmathur/vpn/data/VpnDatabase.kt b/vpn/src/main/java/com/vayunmathur/vpn/data/VpnDatabase.ktindex 0e4f4e2b53..ac26e45ce8 100644--- a/vpn/src/main/java/com/vayunmathur/vpn/data/VpnDatabase.kt+++ b/vpn/src/main/java/com/vayunmathur/vpn/data/VpnDatabase.kt@@ -1,16 +1,17 @@ package com.vayunmathur.vpn.data  import android.content.Context-import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Upsert-import androidx.room.migration.Migration-import androidx.sqlite.db.SupportSQLiteDatabase+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.room3.migration.Migration+import androidx.sqlite.SQLiteConnection+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseItem import com.vayunmathur.library.util.DatabaseMigrations import kotlinx.coroutines.flow.Flow@@ -72,8 +73,8 @@ interface VpnConfigDao { }  val MIGRATION_1_2 = object : Migration(1, 2) {-    override fun migrate(db: SupportSQLiteDatabase) {-        db.execSQL("""+    override suspend fun migrate(connection: SQLiteConnection) {+        connection.execSQL("""             CREATE TABLE IF NOT EXISTS `ConnectionLogEntity` (                 `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,                 `timestampStart` INTEGER NOT NULL,@@ -92,10 +93,10 @@ val MIGRATION_1_2 = object : Migration(1, 2) {                 `requestCount` INTEGER NOT NULL             )         """.trimIndent())-        db.execSQL("CREATE INDEX IF NOT EXISTS `index_ConnectionLogEntity_packageName_domain_timestampLast_remoteIp_uid_protocol` ON `ConnectionLogEntity` (`packageName`, `domain`, `timestampLast`, `remoteIp`, `uid`, `protocol`)")-        db.execSQL("CREATE INDEX IF NOT EXISTS `index_ConnectionLogEntity_remoteIp_remotePort_protocol_uid` ON `ConnectionLogEntity` (`remoteIp`, `remotePort`, `protocol`, `uid`)")-        db.execSQL("CREATE INDEX IF NOT EXISTS `index_ConnectionLogEntity_domain` ON `ConnectionLogEntity` (`domain`)")-        db.execSQL("CREATE INDEX IF NOT EXISTS `index_ConnectionLogEntity_packageName` ON `ConnectionLogEntity` (`packageName`)")+        connection.execSQL("CREATE INDEX IF NOT EXISTS `index_ConnectionLogEntity_packageName_domain_timestampLast_remoteIp_uid_protocol` ON `ConnectionLogEntity` (`packageName`, `domain`, `timestampLast`, `remoteIp`, `uid`, `protocol`)")+        connection.execSQL("CREATE INDEX IF NOT EXISTS `index_ConnectionLogEntity_remoteIp_remotePort_protocol_uid` ON `ConnectionLogEntity` (`remoteIp`, `remotePort`, `protocol`, `uid`)")+        connection.execSQL("CREATE INDEX IF NOT EXISTS `index_ConnectionLogEntity_domain` ON `ConnectionLogEntity` (`domain`)")+        connection.execSQL("CREATE INDEX IF NOT EXISTS `index_ConnectionLogEntity_packageName` ON `ConnectionLogEntity` (`packageName`)")     } } 
weather/src/main/java/com/vayunmathur/weather/data/SavedLocation.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/data/SavedLocation.kt b/weather/src/main/java/com/vayunmathur/weather/data/SavedLocation.ktindex 9ae5f3baec..4c9fae0e98 100644--- a/weather/src/main/java/com/vayunmathur/weather/data/SavedLocation.kt+++ b/weather/src/main/java/com/vayunmathur/weather/data/SavedLocation.kt@@ -1,7 +1,7 @@ package com.vayunmathur.weather.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  /**  * A place the user has pinned in the weather app — either added by city
weather/src/main/java/com/vayunmathur/weather/data/WeatherCache.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/data/WeatherCache.kt b/weather/src/main/java/com/vayunmathur/weather/data/WeatherCache.ktindex 101f001680..496cac81cd 100644--- a/weather/src/main/java/com/vayunmathur/weather/data/WeatherCache.kt+++ b/weather/src/main/java/com/vayunmathur/weather/data/WeatherCache.kt@@ -1,6 +1,6 @@ package com.vayunmathur.weather.data -import androidx.room.Entity+import androidx.room3.Entity  /**  * Most-recent forecast + air-quality JSON for a (lat, lon) point. Lets the
weather/src/main/java/com/vayunmathur/weather/data/WeatherDao.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/data/WeatherDao.kt b/weather/src/main/java/com/vayunmathur/weather/data/WeatherDao.ktindex c76ae61360..f7b8cbee41 100644--- a/weather/src/main/java/com/vayunmathur/weather/data/WeatherDao.kt+++ b/weather/src/main/java/com/vayunmathur/weather/data/WeatherDao.kt@@ -1,11 +1,11 @@ package com.vayunmathur.weather.data -import androidx.room.Dao-import androidx.room.Delete-import androidx.room.Insert-import androidx.room.OnConflictStrategy-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Delete+import androidx.room3.Insert+import androidx.room3.OnConflictStrategy+import androidx.room3.Query+import androidx.room3.Upsert import kotlinx.coroutines.flow.Flow  @Dao@@ -40,7 +40,7 @@ interface WeatherDao {      * single transaction. Used by the location provider when it gets a fresh      * GPS fix.      */-    @androidx.room.Transaction+    @androidx.room3.Transaction     suspend fun replaceCurrentDeviceLocation(newRow: SavedLocation) {         getCurrentDeviceLocation()?.let { deleteLocation(it) }         insertLocation(newRow.copy(isCurrent = true))
weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.kt
diff --git a/weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.kt b/weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.ktindex 502f405599..3af8ac9a96 100644--- a/weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.kt+++ b/weather/src/main/java/com/vayunmathur/weather/data/WeatherDatabase.kt@@ -1,9 +1,10 @@ package com.vayunmathur.weather.data  import android.content.Context-import androidx.room.Database-import androidx.room.RoomDatabase-import androidx.room.migration.Migration+import androidx.room3.Database+import androidx.room3.RoomDatabase+import androidx.room3.migration.Migration+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseHelper import com.vayunmathur.library.util.DatabaseMigrations 
web/src/main/java/com/vayunmathur/web/data/Bookmark.kt
diff --git a/web/src/main/java/com/vayunmathur/web/data/Bookmark.kt b/web/src/main/java/com/vayunmathur/web/data/Bookmark.ktindex a27e0e5969..3b21936dcc 100644--- a/web/src/main/java/com/vayunmathur/web/data/Bookmark.kt+++ b/web/src/main/java/com/vayunmathur/web/data/Bookmark.kt@@ -1,7 +1,7 @@ package com.vayunmathur.web.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem  @Entity
web/src/main/java/com/vayunmathur/web/data/HistoryEntry.kt
diff --git a/web/src/main/java/com/vayunmathur/web/data/HistoryEntry.kt b/web/src/main/java/com/vayunmathur/web/data/HistoryEntry.ktindex 0187ff75ab..e4c9a5400d 100644--- a/web/src/main/java/com/vayunmathur/web/data/HistoryEntry.kt+++ b/web/src/main/java/com/vayunmathur/web/data/HistoryEntry.kt@@ -1,7 +1,7 @@ package com.vayunmathur.web.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem  @Entity
web/src/main/java/com/vayunmathur/web/data/InstalledSite.kt
diff --git a/web/src/main/java/com/vayunmathur/web/data/InstalledSite.kt b/web/src/main/java/com/vayunmathur/web/data/InstalledSite.ktindex f1051f6725..80bec00db8 100644--- a/web/src/main/java/com/vayunmathur/web/data/InstalledSite.kt+++ b/web/src/main/java/com/vayunmathur/web/data/InstalledSite.kt@@ -1,7 +1,7 @@ package com.vayunmathur.web.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey  /**  * Saved installed site / PWA backing for "Add to Home screen" pinned shortcuts.
web/src/main/java/com/vayunmathur/web/data/ShieldSetting.kt
diff --git a/web/src/main/java/com/vayunmathur/web/data/ShieldSetting.kt b/web/src/main/java/com/vayunmathur/web/data/ShieldSetting.ktindex 606944fb3e..c10925f2cb 100644--- a/web/src/main/java/com/vayunmathur/web/data/ShieldSetting.kt+++ b/web/src/main/java/com/vayunmathur/web/data/ShieldSetting.kt@@ -1,7 +1,7 @@ package com.vayunmathur.web.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.web.domain.ShieldLevel import com.vayunmathur.web.domain.ShieldsSettings 
web/src/main/java/com/vayunmathur/web/data/SitePermission.kt
diff --git a/web/src/main/java/com/vayunmathur/web/data/SitePermission.kt b/web/src/main/java/com/vayunmathur/web/data/SitePermission.ktindex 0a5e68ed06..ea9814b4ec 100644--- a/web/src/main/java/com/vayunmathur/web/data/SitePermission.kt+++ b/web/src/main/java/com/vayunmathur/web/data/SitePermission.kt@@ -1,7 +1,7 @@ package com.vayunmathur.web.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem  @Entity
web/src/main/java/com/vayunmathur/web/data/WebDatabase.kt
diff --git a/web/src/main/java/com/vayunmathur/web/data/WebDatabase.kt b/web/src/main/java/com/vayunmathur/web/data/WebDatabase.ktindex e954d34eaf..ad334f55d0 100644--- a/web/src/main/java/com/vayunmathur/web/data/WebDatabase.kt+++ b/web/src/main/java/com/vayunmathur/web/data/WebDatabase.kt@@ -1,13 +1,14 @@ package com.vayunmathur.web.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.Upsert-import androidx.room.migration.Migration-import androidx.sqlite.db.SupportSQLiteDatabase+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.room3.migration.Migration+import androidx.sqlite.SQLiteConnection+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DatabaseMigrations import kotlinx.coroutines.flow.Flow @@ -200,8 +201,8 @@ abstract class WebDatabase : RoomDatabase() { }  private val MIGRATION_1_2 = object : Migration(1, 2) {-    override fun migrate(db: SupportSQLiteDatabase) {-        db.execSQL(+    override suspend fun migrate(connection: SQLiteConnection) {+        connection.execSQL(             """CREATE TABLE IF NOT EXISTS `InstalledSite` (                 `id` TEXT NOT NULL,                 `url` TEXT NOT NULL,@@ -222,8 +223,8 @@ private val MIGRATION_1_2 = object : Migration(1, 2) { }  private val MIGRATION_2_3 = object : Migration(2, 3) {-    override fun migrate(db: SupportSQLiteDatabase) {-        db.execSQL(+    override suspend fun migrate(connection: SQLiteConnection) {+        connection.execSQL(             """CREATE TABLE IF NOT EXISTS `ShieldSetting` (                 `host` TEXT NOT NULL,                 `level` TEXT,
youpipe/src/main/java/com/vayunmathur/youpipe/data/CachedRelatedVideo.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/CachedRelatedVideo.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/CachedRelatedVideo.ktindex 8f79a3f43b..d312e7681c 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/CachedRelatedVideo.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/CachedRelatedVideo.kt@@ -1,11 +1,11 @@ package com.vayunmathur.youpipe.data -import androidx.room.Dao-import androidx.room.Embedded-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Embedded+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.Upsert import com.vayunmathur.youpipe.ui.VideoInfo import kotlinx.coroutines.flow.Flow import kotlin.time.Instant
youpipe/src/main/java/com/vayunmathur/youpipe/data/ChannelPreference.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/ChannelPreference.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/ChannelPreference.ktindex 53db86be51..507e5e80c9 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/ChannelPreference.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/ChannelPreference.kt@@ -1,10 +1,10 @@ package com.vayunmathur.youpipe.data -import androidx.room.Dao-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.Upsert import kotlinx.coroutines.flow.Flow  /**
youpipe/src/main/java/com/vayunmathur/youpipe/data/DownloadedVideo.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/DownloadedVideo.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/DownloadedVideo.ktindex 9d4eb904c8..1bd86f70f3 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/DownloadedVideo.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/DownloadedVideo.kt@@ -1,12 +1,12 @@ package com.vayunmathur.youpipe.data -import androidx.room.Dao-import androidx.room.Delete-import androidx.room.Embedded-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Delete+import androidx.room3.Embedded+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.Upsert import com.vayunmathur.library.util.DatabaseItem import com.vayunmathur.youpipe.ui.VideoInfo import kotlinx.coroutines.flow.Flow
youpipe/src/main/java/com/vayunmathur/youpipe/data/HistoryVideo.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/HistoryVideo.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/HistoryVideo.ktindex 4959636ecc..d122d2228a 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/HistoryVideo.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/HistoryVideo.kt@@ -1,8 +1,8 @@ package com.vayunmathur.youpipe.data -import androidx.room.Embedded-import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Embedded+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import com.vayunmathur.youpipe.ui.VideoInfo import kotlin.time.Clock
youpipe/src/main/java/com/vayunmathur/youpipe/data/KeywordPreference.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/KeywordPreference.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/KeywordPreference.ktindex d364418805..d81e031496 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/KeywordPreference.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/KeywordPreference.kt@@ -1,10 +1,10 @@ package com.vayunmathur.youpipe.data -import androidx.room.Dao-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.Upsert import kotlinx.coroutines.flow.Flow  /**
youpipe/src/main/java/com/vayunmathur/youpipe/data/Playlist.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/Playlist.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/Playlist.ktindex 880e439caf..aff258cf4b 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/Playlist.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/Playlist.kt@@ -1,14 +1,14 @@ package com.vayunmathur.youpipe.data -import androidx.room.ColumnInfo-import androidx.room.Dao-import androidx.room.Delete-import androidx.room.Embedded-import androidx.room.Entity-import androidx.room.ForeignKey-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.ColumnInfo+import androidx.room3.Dao+import androidx.room3.Delete+import androidx.room3.Embedded+import androidx.room3.Entity+import androidx.room3.ForeignKey+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.Upsert import com.vayunmathur.library.util.ReorderableDatabaseItem import com.vayunmathur.youpipe.ui.VideoInfo import kotlinx.coroutines.flow.Flow
youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationImpression.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationImpression.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationImpression.ktindex 5f5a93ecde..1dcb222cd6 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationImpression.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationImpression.kt@@ -1,9 +1,9 @@ package com.vayunmathur.youpipe.data -import androidx.room.Dao-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query+import androidx.room3.Dao+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query import kotlinx.coroutines.flow.Flow import kotlin.time.Instant 
youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationPreferences.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationPreferences.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationPreferences.ktindex a5d49cca68..a3d3250dfc 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationPreferences.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/RecommendationPreferences.kt@@ -1,10 +1,10 @@ package com.vayunmathur.youpipe.data -import androidx.room.Dao-import androidx.room.Entity-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.Upsert+import androidx.room3.Dao+import androidx.room3.Entity+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.Upsert import kotlinx.coroutines.flow.Flow  /**
youpipe/src/main/java/com/vayunmathur/youpipe/data/Subscription.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/Subscription.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/Subscription.ktindex e5d8ee01e9..7061c88078 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/Subscription.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/Subscription.kt@@ -1,7 +1,7 @@ package com.vayunmathur.youpipe.data -import androidx.room.Entity-import androidx.room.PrimaryKey+import androidx.room3.Entity+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable 
youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionCategory.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionCategory.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionCategory.ktindex daefa53ee3..b827ffdfdb 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionCategory.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionCategory.kt@@ -1,13 +1,13 @@ package com.vayunmathur.youpipe.data -import androidx.room.ColumnInfo-import androidx.room.Dao-import androidx.room.Entity-import androidx.room.ForeignKey-import androidx.room.PrimaryKey-import androidx.room.Query-import androidx.room.Transaction-import androidx.room.Upsert+import androidx.room3.ColumnInfo+import androidx.room3.Dao+import androidx.room3.Entity+import androidx.room3.ForeignKey+import androidx.room3.PrimaryKey+import androidx.room3.Query+import androidx.room3.Transaction+import androidx.room3.Upsert import com.vayunmathur.library.util.DatabaseItem import kotlinx.coroutines.flow.Flow import kotlinx.serialization.Serializable
youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionDatabase.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionDatabase.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionDatabase.ktindex 99ba1f1d56..814e6e1e78 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionDatabase.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionDatabase.kt@@ -1,13 +1,14 @@ package com.vayunmathur.youpipe.data -import androidx.room.Dao-import androidx.room.Database-import androidx.room.Delete-import androidx.room.Query-import androidx.room.RoomDatabase-import androidx.room.TypeConverters-import androidx.room.Upsert-import androidx.room.migration.Migration+import androidx.room3.ColumnTypeConverters+import androidx.room3.Dao+import androidx.room3.Database+import androidx.room3.Delete+import androidx.room3.Query+import androidx.room3.RoomDatabase+import androidx.room3.Upsert+import androidx.room3.migration.Migration+import androidx.sqlite.execSQL import com.vayunmathur.library.util.DefaultConverters import kotlinx.coroutines.flow.Flow @@ -201,7 +202,7 @@ interface SubscriptionVideoDao {     suspend fun upsertAll(values: List<SubscriptionVideo>) } -@TypeConverters(DefaultConverters::class)+@ColumnTypeConverters(DefaultConverters::class) @Database(entities = [Subscription::class, SubscriptionVideo::class, HistoryVideo::class, SubscriptionCategory::class, DownloadedVideo::class, CachedRelatedVideo::class, RecommendationImpression::class, RecommendationPreferences::class, ChannelPreference::class, KeywordPreference::class, Playlist::class, PlaylistItem::class], version = 7, exportSchema = false) abstract class SubscriptionDatabase : RoomDatabase() {     abstract fun subscriptionDao(): SubscriptionDao
youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionVideo.kt
diff --git a/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionVideo.kt b/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionVideo.ktindex 7d52a1bcde..250c3fca36 100644--- a/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionVideo.kt+++ b/youpipe/src/main/java/com/vayunmathur/youpipe/data/SubscriptionVideo.kt@@ -1,9 +1,9 @@ package com.vayunmathur.youpipe.data -import androidx.room.ColumnInfo-import androidx.room.Entity-import androidx.room.ForeignKey-import androidx.room.PrimaryKey+import androidx.room3.ColumnInfo+import androidx.room3.Entity+import androidx.room3.ForeignKey+import androidx.room3.PrimaryKey import com.vayunmathur.library.util.DatabaseItem import kotlinx.serialization.Serializable import kotlin.time.Instant