Skip to content
Merged
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
  •  
  •  
  •  
1 change: 1 addition & 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 Down
35 changes: 22 additions & 13 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ 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")
id("com.google.firebase.firebase-perf")
id("com.bugsnag.android.gradle")
id("com.bugsnag.gradle")
}

apply(plugin = "com.google.gms.google-services")
Expand Down Expand Up @@ -38,6 +39,7 @@ val pagingVersion = rootProject.extra["pagingVersion"] as String
val coilVersion = rootProject.extra["coilVersion"] as String
val collectionVersion = rootProject.extra["collectionVersion"] as String
val roomVersion = rootProject.extra["roomVersion"] as String
val sqliteVersion = rootProject.extra["sqliteVersion"] as String
val navigationVersion = rootProject.extra["navigationVersion"] as String
val workManagerVersion = rootProject.extra["workManagerVersion"] as String
val constraintLayoutVersion = rootProject.extra["constraintLayoutVersion"] as String
Expand Down Expand Up @@ -199,7 +201,7 @@ android {
}
getByName("androidTest") {
java.directories.add(sharedTestDir)
assets.directories.add("$projectDir/schemas")
assets.directories.add("$projectDir/schemas/googlePlay")
}
}

Expand Down Expand Up @@ -323,13 +325,18 @@ android {
}
}

bugsnag {
uploadNdkMappings = false
androidComponents {
onVariants(selector().withBuildType("release")) { variant ->
val variantName = variant.name.replaceFirstChar { it.uppercaseChar() }
tasks.matching { it.name == "assemble$variantName" || it.name == "bundle$variantName" }.configureEach {
finalizedBy("bugsnagUpload${variantName}ProguardMapping", "bugsnagCreate${variantName}Build")
}
}
}

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 @@ -387,12 +394,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
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