Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/local.properties
/.idea
/build
build/
/captures
google-services.json
.DS_Store
Expand All @@ -17,5 +18,6 @@ CLAUDE.md
agent.md
.claude/
.codex/
.codegraph/
.github/copilot-instructions.md
.vscode/
24 changes: 14 additions & 10 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id("org.jetbrains.kotlin.plugin.parcelize")
id("de.undercouch.download")
id("com.google.devtools.ksp")
id("androidx.room3")
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
id("org.jetbrains.kotlin.plugin.serialization")
id("org.jetbrains.kotlin.plugin.compose") version "2.4.0"
Expand All @@ -29,6 +30,7 @@ val pagingVersion: String by rootProject.extra
val coilVersion: String by rootProject.extra
val collectionx: String by rootProject.extra
val roomVersion: String by rootProject.extra
val sqliteVersion: String by rootProject.extra
val navigationVersion: String by rootProject.extra
val workManagerVersion: String by rootProject.extra
val constraintLayoutVersion: String by rootProject.extra
Expand Down Expand Up @@ -192,7 +194,7 @@ android {
}
getByName("androidTest") {
java.directories.add(sharedTestDir)
assets.directories.add("$projectDir/schemas")
assets.directories.add("$projectDir/schemas/googlePlay")
}
}

Expand Down Expand Up @@ -320,9 +322,9 @@ bugsnag {
uploadNdkMappings = false
}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
arg("room.incremental", "true")
room3 {
schemaDirectory("googlePlay", "$projectDir/schemas/googlePlay")
schemaDirectory("otherChannel", "$projectDir/schemas/otherChannel")
}

dependencies {
Expand Down Expand Up @@ -380,12 +382,14 @@ dependencies {
implementation("androidx.lifecycle:lifecycle-service:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion")
implementation("androidx.lifecycle:lifecycle-process:$lifecycleVersion")
implementation("androidx.room:room-runtime:$roomVersion")
implementation("androidx.room:room-paging:$roomVersion")
ksp("androidx.room:room-compiler:$roomVersion")
implementation("androidx.room:room-rxjava2:$roomVersion")
implementation("androidx.room:room-ktx:$roomVersion")
androidTestImplementation("androidx.room:room-testing:$roomVersion")
implementation("androidx.room3:room3-runtime:$roomVersion")
implementation("androidx.room3:room3-paging:$roomVersion")
implementation("androidx.room3:room3-livedata:$roomVersion")
implementation("androidx.sqlite:sqlite-framework:$sqliteVersion")
compileOnly(project(":query-codegen"))
ksp(project(":query-codegen"))
ksp("androidx.room3:room3-compiler:$roomVersion")
androidTestImplementation("androidx.room3:room3-testing:$roomVersion")

// media3
implementation("androidx.media3:media3-exoplayer:$media3Version")
Expand Down
2 changes: 0 additions & 2 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
-dontwarn org.jni_zero.**

# androidx paging
-keep class androidx.paging.PagedListAdapter.** { *; }
-keep class androidx.paging.AsyncPagedListDiffer.** { *; }

# ServiceLoader support
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "5d2c36d918e9fb304b0b87bc89ab8ba5",
"entities": [
{
"tableName": "sender_keys",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`group_id` TEXT NOT NULL, `sender_id` TEXT NOT NULL, `record` BLOB NOT NULL, PRIMARY KEY(`group_id`, `sender_id`))",
"fields": [
{
"fieldPath": "groupId",
"columnName": "group_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "senderId",
"columnName": "sender_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "record",
"columnName": "record",
"affinity": "BLOB",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"group_id",
"sender_id"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "identities",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `address` TEXT NOT NULL, `registration_id` INTEGER, `public_key` BLOB NOT NULL, `private_key` BLOB, `next_prekey_id` INTEGER, `timestamp` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "_id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "registrationId",
"columnName": "registration_id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "publicKey",
"columnName": "public_key",
"affinity": "BLOB",
"notNull": true
},
{
"fieldPath": "privateKey",
"columnName": "private_key",
"affinity": "BLOB",
"notNull": false
},
{
"fieldPath": "nextPreKeyId",
"columnName": "next_prekey_id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"_id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_identities_address",
"unique": true,
"columnNames": [
"address"
],
"createSql": "CREATE UNIQUE INDEX `index_identities_address` ON `${TABLE_NAME}` (`address`)"
}
],
"foreignKeys": []
},
{
"tableName": "prekeys",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `prekey_id` INTEGER NOT NULL, `record` BLOB NOT NULL)",
"fields": [
{
"fieldPath": "_id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "preKeyId",
"columnName": "prekey_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "record",
"columnName": "record",
"affinity": "BLOB",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"_id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_prekeys_prekey_id",
"unique": true,
"columnNames": [
"prekey_id"
],
"createSql": "CREATE UNIQUE INDEX `index_prekeys_prekey_id` ON `${TABLE_NAME}` (`prekey_id`)"
}
],
"foreignKeys": []
},
{
"tableName": "signed_prekeys",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `prekey_id` INTEGER NOT NULL, `record` BLOB NOT NULL, `timestamp` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "_id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "preKeyId",
"columnName": "prekey_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "record",
"columnName": "record",
"affinity": "BLOB",
"notNull": true
},
{
"fieldPath": "timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"_id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_signed_prekeys_prekey_id",
"unique": true,
"columnNames": [
"prekey_id"
],
"createSql": "CREATE UNIQUE INDEX `index_signed_prekeys_prekey_id` ON `${TABLE_NAME}` (`prekey_id`)"
}
],
"foreignKeys": []
},
{
"tableName": "sessions",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `address` TEXT NOT NULL, `record` BLOB NOT NULL, `timestamp` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "_id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "address",
"columnName": "address",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "record",
"columnName": "record",
"affinity": "BLOB",
"notNull": true
},
{
"fieldPath": "timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"_id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_sessions_address",
"unique": true,
"columnNames": [
"address"
],
"createSql": "CREATE UNIQUE INDEX `index_sessions_address` ON `${TABLE_NAME}` (`address`)"
}
],
"foreignKeys": []
},
{
"tableName": "ratchet_sender_keys",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`group_id` TEXT NOT NULL, `sender_id` TEXT NOT NULL, `status` TEXT NOT NULL, PRIMARY KEY(`group_id`, `sender_id`))",
"fields": [
{
"fieldPath": "groupId",
"columnName": "group_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "senderId",
"columnName": "sender_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "status",
"columnName": "status",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"group_id",
"sender_id"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
}
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"5d2c36d918e9fb304b0b87bc89ab8ba5\")"
]
}
}
Loading