Added serialization

This commit is contained in:
merkost 2023-07-18 12:38:31 +10:00
parent 56ce7c5aa4
commit 5363af1071
5 changed files with 16 additions and 4 deletions

View File

@ -1,7 +1,10 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlin_version"
}
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
@ -71,6 +74,7 @@ dependencies {
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3'
implementation 'androidx.lifecycle:lifecycle-process:2.5.1'
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1"
kapt "androidx.room:room-compiler:2.5.1"
implementation "androidx.room:room-runtime:2.5.1"

View File

@ -4,7 +4,9 @@ import android.content.ContentValues
import android.provider.Telephony
import androidx.core.content.contentValuesOf
import com.google.gson.annotations.SerializedName
import kotlinx.serialization.Serializable
@Serializable
data class MmsAddress(
@SerializedName("address")
val address: String,

View File

@ -4,7 +4,9 @@ import android.content.ContentValues
import android.provider.Telephony
import androidx.core.content.contentValuesOf
import com.google.gson.annotations.SerializedName
import kotlinx.serialization.Serializable
@Serializable
data class MmsBackup(
@SerializedName("creator")
val creator: String?,

View File

@ -4,7 +4,9 @@ import android.content.ContentValues
import android.provider.Telephony
import androidx.core.content.contentValuesOf
import com.google.gson.annotations.SerializedName
import kotlinx.serialization.Serializable
@Serializable
data class MmsPart(
@SerializedName("cd")
val contentDisposition: String?,

View File

@ -5,7 +5,9 @@ import android.content.ContentValues
import android.provider.Telephony
import androidx.core.content.contentValuesOf
import com.google.gson.annotations.SerializedName
import kotlinx.serialization.Serializable
@Serializable
data class SmsBackup(
@SerializedName("sub_id")
val subscriptionId: Long,