From 7325b31f319b76ba4308ee7b63b867b18787cc52 Mon Sep 17 00:00:00 2001 From: MehraB832 Date: Mon, 18 Mar 2024 21:56:18 +0330 Subject: [PATCH 1/9] Update libs --- gradle/libs.versions.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ab3d244d7..be18d599c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,13 +1,13 @@ [versions] #jetbrains -kotlin = "1.9.0" -kotlinxSerializationJson = "1.5.1" +kotlin = "1.9.23" +kotlinxSerializationJson = "1.6.3" #KSP ksp = "1.9.0-1.0.12" #AndroidX androidx-constraintlayout = "2.1.4" androidx-swiperefreshlayout = "1.1.0" -androidx-lifecycleprocess = "2.6.1" +androidx-lifecycleprocess = "2.7.0" #Eventbus eventbus = "3.3.1" #Room @@ -17,7 +17,7 @@ simple-commons = "b72ded2a75" android-smsmms = "c3e678befd" indicator-fast-scroll = "4524cd0b61" #Gradle -gradlePlugins-agp = "8.1.1" +gradlePlugins-agp = "8.1.4" #build app-build-compileSDKVersion = "34" app-build-targetSDK = "34" From 1a9114aa326dec86987ac2921297f50e90bf1c3e Mon Sep 17 00:00:00 2001 From: MehraB832 Date: Mon, 18 Mar 2024 21:58:39 +0330 Subject: [PATCH 2/9] add ndk version --- app/build.gradle.kts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e5040028c..27225f988 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,7 +21,10 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdk = project.libs.versions.app.build.compileSDKVersion.get().toInt() + + compileSdkVersion(project.libs.versions.app.build.compileSDKVersion.get().toInt()) + buildToolsVersion = "34.0.0" + ndkVersion = "25.1.8937393" defaultConfig { applicationId = libs.versions.app.version.appId.get() From 83de1be856d1e43da8fdf5bd228dc8c94be7f091 Mon Sep 17 00:00:00 2001 From: MehraB832 Date: Mon, 18 Mar 2024 21:58:58 +0330 Subject: [PATCH 3/9] update gradle version --- gradle.properties | 10 +++++++++- gradle/wrapper/gradle-wrapper.properties | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 95e3e292d..62a3cc2b2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,11 @@ android.enableJetifier=true android.useAndroidX=true -org.gradle.jvmargs=-Xmx8192m +android.nonTransitiveRClass=true +kotlin.code.style=official +kotlin.incremental=true +org.gradle.caching=true +org.gradle.configuration-cache=true +org.gradle.configureondemand=true +org.gradle.daemon=true +org.gradle.jvmargs=-Xmx1024M -Dkotlin.daemon.jvm.options\="-Xmx1024M" -XX\:+UseParallelGC -XX\:MaxMetaspaceSize\=512m -XX\:+HeapDumpOnOutOfMemoryError -Dfile.encoding\=UTF-8 +org.gradle.parallel=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 33bc5be64..53a764395 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Nov 03 16:00:32 CET 2020 +#Mon Mar 18 21:48:24 IRST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip From 817ffc8642992b2f1730470a277fd63bad3084ae Mon Sep 17 00:00:00 2001 From: MehraB832 Date: Mon, 18 Mar 2024 22:01:02 +0330 Subject: [PATCH 4/9] fix warnings --- app/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 27225f988..687ddb7ab 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -22,7 +22,7 @@ if (keystorePropertiesFile.exists()) { android { - compileSdkVersion(project.libs.versions.app.build.compileSDKVersion.get().toInt()) + compileSdk = project.libs.versions.app.build.compileSDKVersion.get().toInt() buildToolsVersion = "34.0.0" ndkVersion = "25.1.8937393" @@ -81,7 +81,7 @@ android { } compileOptions { - val currentJavaVersionFromLibs = JavaVersion.valueOf(libs.versions.app.build.javaVersion.get().toString()) + val currentJavaVersionFromLibs = JavaVersion.valueOf(libs.versions.app.build.javaVersion.get()) sourceCompatibility = currentJavaVersionFromLibs targetCompatibility = currentJavaVersionFromLibs } From 1abc22732add9b9d875ba7f089978974b5ea3dbb Mon Sep 17 00:00:00 2001 From: MehraB832 Date: Mon, 18 Mar 2024 22:04:05 +0330 Subject: [PATCH 5/9] fix warnings --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 46e23adfe..85e5be7be 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,6 +7,6 @@ plugins { tasks.register("clean") { delete { - rootProject.buildDir + rootProject.layout.buildDirectory } } From c3f8e02730c1845db28f2b294baf851c5849db66 Mon Sep 17 00:00:00 2001 From: MehraB832 Date: Mon, 18 Mar 2024 22:26:18 +0330 Subject: [PATCH 6/9] inline variable --- app/build.gradle.kts | 22 ++++++++++------------ gradle/libs.versions.toml | 10 ---------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 687ddb7ab..9daece3e6 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -22,16 +22,17 @@ if (keystorePropertiesFile.exists()) { android { - compileSdk = project.libs.versions.app.build.compileSDKVersion.get().toInt() + compileSdk = 34 buildToolsVersion = "34.0.0" ndkVersion = "25.1.8937393" + namespace = "com.simplemobiletools.smsmessenger" defaultConfig { - applicationId = libs.versions.app.version.appId.get() - minSdk = project.libs.versions.app.build.minimumSDK.get().toInt() - targetSdk = project.libs.versions.app.build.targetSDK.get().toInt() - versionName = project.libs.versions.app.version.versionName.get() - versionCode = project.libs.versions.app.version.versionCode.get().toInt() + applicationId = "com.simplemobiletools.smsmessenger" + minSdk = 23 + targetSdk = 34 + versionName = "5.19.4" + versionCode = 86 ksp { arg("room.schemaLocation", "$projectDir/schemas") } @@ -81,17 +82,14 @@ android { } compileOptions { - val currentJavaVersionFromLibs = JavaVersion.valueOf(libs.versions.app.build.javaVersion.get()) - sourceCompatibility = currentJavaVersionFromLibs - targetCompatibility = currentJavaVersionFromLibs + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } tasks.withType { - kotlinOptions.jvmTarget = project.libs.versions.app.build.kotlinJVMTarget.get() + kotlinOptions.jvmTarget = "1.8" } - namespace = libs.versions.app.version.appId.get() - lint { checkReleaseBuilds = false abortOnError = false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index be18d599c..bd1d25584 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,19 +18,9 @@ android-smsmms = "c3e678befd" indicator-fast-scroll = "4524cd0b61" #Gradle gradlePlugins-agp = "8.1.4" -#build -app-build-compileSDKVersion = "34" -app-build-targetSDK = "34" -app-build-minimumSDK = "23" -app-build-javaVersion = "VERSION_17" -app-build-kotlinJVMTarget = "17" #Helpers ez-vcard = "0.11.3" shortcut-badger = "1.1.22" -#versioning -app-version-appId = "com.simplemobiletools.smsmessenger" -app-version-versionCode = "85" -app-version-versionName = "5.19.3" [libraries] #AndroidX androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" } From 811d467fca7f52b6beba7a3ecb3ff584b494503a Mon Sep 17 00:00:00 2001 From: MehraB832 Date: Mon, 18 Mar 2024 22:44:14 +0330 Subject: [PATCH 7/9] add abiFilters --- app/build.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9daece3e6..02d575a65 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -57,9 +57,12 @@ android { buildTypes { debug { applicationIdSuffix = ".debug" + isMinifyEnabled = false + ndk.abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64") } release { isMinifyEnabled = true + ndk.abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64") proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" From 6a0d3951d1365ff2ed0d7f65e3147fb64f063cd5 Mon Sep 17 00:00:00 2001 From: MehraB832 Date: Mon, 18 Mar 2024 22:54:04 +0330 Subject: [PATCH 8/9] clean up --- .../simplemobiletools/smsmessenger/models/MessagesBackup.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MessagesBackup.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MessagesBackup.kt index a01137c9e..4f1f6db8a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MessagesBackup.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/models/MessagesBackup.kt @@ -7,14 +7,14 @@ import kotlinx.serialization.SerializationException import kotlinx.serialization.json.* @Serializable(with = BackupSerializer::class) -sealed class MessagesBackup() { +sealed class MessagesBackup { @SerialName("backupType") abstract val backupType: BackupType } object BackupSerializer : JsonContentPolymorphicSerializer(MessagesBackup::class) { - override fun selectDeserializer(element: JsonElement): DeserializationStrategy { + override fun selectDeserializer(element: JsonElement): DeserializationStrategy { return when (element.jsonObject["backupType"]?.jsonPrimitive?.content) { "sms" -> SmsBackup.serializer() "mms" -> MmsBackup.serializer() From 188fbfef003aa528fd4992689728d5e6495cc40f Mon Sep 17 00:00:00 2001 From: MehraB832 Date: Mon, 18 Mar 2024 23:16:18 +0330 Subject: [PATCH 9/9] fix errors, update ksp --- app/build.gradle.kts | 10 +++------- gradle/libs.versions.toml | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 02d575a65..0fb7afcc0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -80,17 +80,13 @@ android { register("prepaid") } - sourceSets { - getByName("main").java.srcDirs("src/main/kotlin") - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } tasks.withType { - kotlinOptions.jvmTarget = "1.8" + kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() } lint { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bd1d25584..e032cbdce 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ kotlin = "1.9.23" kotlinxSerializationJson = "1.6.3" #KSP -ksp = "1.9.0-1.0.12" +ksp = "1.9.23-1.0.19" #AndroidX androidx-constraintlayout = "2.1.4" androidx-swiperefreshlayout = "1.1.0"