From f34d46cc7bdfd5e090d7d133aa31e637c5dff469 Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Wed, 26 Mar 2025 22:02:41 +0530 Subject: [PATCH] Added target, compileSdkVersion versions since now there are sources available for SDK 36. --- app/build.gradle.kts | 6 ------ buildSrc/src/main/kotlin/Config.kt | 4 ++-- buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt | 7 +++++++ core/build.gradle.kts | 5 ----- custom/build.gradle.kts | 5 ----- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c2fe19f0a..d868903fd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -28,13 +28,7 @@ android { // This is now specified in the Gradle configuration instead of declaring // it directly in the AndroidManifest file. namespace = "org.kiwix.kiwixmobile" - compileSdkPreview = Config.compileSdk defaultConfig { - // TODO: We will move this from here to AllProjectConfigure once - // Android 16 stable release is available. - minSdk = Config.minSdk - base.archivesName.set(apkPrefix) - targetSdkPreview = Config.targetSdk resValue("string", "app_name", "Kiwix") resValue("string", "app_search_string", "Search Kiwix") versionCode = "".getVersionCode() diff --git a/buildSrc/src/main/kotlin/Config.kt b/buildSrc/src/main/kotlin/Config.kt index 0f7243050..b7bf08ad7 100644 --- a/buildSrc/src/main/kotlin/Config.kt +++ b/buildSrc/src/main/kotlin/Config.kt @@ -22,9 +22,9 @@ object Config { // Here is a list of all Android versions with their corresponding API // levels: https://apilevels.com/ - const val compileSdk = "Baklava" // SDK version used by Gradle to compile our app. + const val compileSdk = 36 // SDK version used by Gradle to compile our app. const val minSdk = 25 // Minimum SDK (Minimum Support Device) is 25 (Android 7.1 Nougat). - const val targetSdk = "Baklava" // Target SDK (Maximum Support Device) is Baklava (Android 16). + const val targetSdk = 36 // Target SDK (Maximum Support Device) is Baklava (Android 16). val javaVersion = JavaVersion.VERSION_17 diff --git a/buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt b/buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt index a3abb1f3b..5c9825084 100644 --- a/buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt +++ b/buildSrc/src/main/kotlin/plugin/AllProjectConfigurer.kt @@ -59,6 +59,13 @@ class AllProjectConfigurer { namespace = "org.kiwix.kiwixmobile.core" } + setCompileSdkVersion(Config.compileSdk) + defaultConfig { + minSdk = Config.minSdk + setTargetSdkVersion(Config.targetSdk) + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { getByName("debug") { isTestCoverageEnabled = true diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 8c765581c..b2b73d07a 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -18,12 +18,7 @@ plugins.apply(KiwixConfigurationPlugin::class) apply(plugin = "io.objectbox") android { - compileSdkPreview = Config.compileSdk defaultConfig { - // TODO: We will move this from here to AllProjectConfigure once - // Android 16 stable release is available. - minSdk = Config.minSdk - targetSdkPreview = Config.targetSdk buildConfigField("long", "VERSION_CODE", "".getVersionCode().toString()) testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/custom/build.gradle.kts b/custom/build.gradle.kts index e80661981..61ab62934 100644 --- a/custom/build.gradle.kts +++ b/custom/build.gradle.kts @@ -22,13 +22,8 @@ plugins { plugins.apply(KiwixConfigurationPlugin::class) android { - compileSdkPreview = Config.compileSdk defaultConfig { applicationId = "org.kiwix" - // TODO: We will move this from here to AllProjectConfigure once - // Android 16 stable release is available. - minSdk = Config.minSdk - targetSdkPreview = Config.targetSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" }