diff --git a/app/build.gradle b/app/build.gradle index 7f9727a4..19659240 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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" diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsAddress.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsAddress.kt index 07148905..821047cc 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsAddress.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsAddress.kt @@ -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, diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsBackup.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsBackup.kt index e8957d93..c2c2c93c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsBackup.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsBackup.kt @@ -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?, diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsPart.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsPart.kt index ac5d53d1..8edde56e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsPart.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MmsPart.kt @@ -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?, diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/SmsBackup.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/SmsBackup.kt index a6daa883..41b128e1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/SmsBackup.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/SmsBackup.kt @@ -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,