diff --git a/app/build.gradle.kts b/app/build.gradle.kts index e5040028c..0fb7afcc0 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,14 +21,18 @@ 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") } @@ -53,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" @@ -73,22 +80,15 @@ android { register("prepaid") } - sourceSets { - getByName("main").java.srcDirs("src/main/kotlin") - } - compileOptions { - val currentJavaVersionFromLibs = JavaVersion.valueOf(libs.versions.app.build.javaVersion.get().toString()) - sourceCompatibility = currentJavaVersionFromLibs - targetCompatibility = currentJavaVersionFromLibs + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } tasks.withType { - kotlinOptions.jvmTarget = project.libs.versions.app.build.kotlinJVMTarget.get() + kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() } - namespace = libs.versions.app.version.appId.get() - lint { checkReleaseBuilds = false abortOnError = false 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() 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 } } 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/libs.versions.toml b/gradle/libs.versions.toml index ab3d244d7..e032cbdce 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" +ksp = "1.9.23-1.0.19" #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,20 +17,10 @@ simple-commons = "b72ded2a75" android-smsmms = "c3e678befd" indicator-fast-scroll = "4524cd0b61" #Gradle -gradlePlugins-agp = "8.1.1" -#build -app-build-compileSDKVersion = "34" -app-build-targetSDK = "34" -app-build-minimumSDK = "23" -app-build-javaVersion = "VERSION_17" -app-build-kotlinJVMTarget = "17" +gradlePlugins-agp = "8.1.4" #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" } 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