From 9aa1206d929637ef70c82ea18b8b411da0a526b9 Mon Sep 17 00:00:00 2001 From: alexander Date: Tue, 4 Jun 2024 09:05:36 +0200 Subject: [PATCH] :art: moved android sdk versioning to to version catalogue --- androidApp/build.gradle.kts | 8 ++++---- gradle.properties | 8 +------- gradle/libs.versions.toml | 7 +++++++ settings.gradle.kts | 2 -- shared/build.gradle.kts | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts index efa852da..f8bc6e20 100644 --- a/androidApp/build.gradle.kts +++ b/androidApp/build.gradle.kts @@ -16,17 +16,17 @@ kotlin { } android { - compileSdk = (findProperty("android.compileSdk") as String).toInt() + compileSdk = libs.versions.androidCompileSdk.get().toInt() namespace = "net.schacher.mcc" sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") defaultConfig { applicationId = "net.schacher.mcc" - minSdk = (findProperty("android.minSdk") as String).toInt() - targetSdk = (findProperty("android.targetSdk") as String).toInt() + minSdk = libs.versions.androidMinSdk.get().toInt() + targetSdk = libs.versions.androidTargetSdk.get().toInt() versionCode = 4 - versionName = "1.0.0-alpha" + versionName = "1.0.0-development" } buildTypes { diff --git a/gradle.properties b/gradle.properties index 0d6440e0..11e97df1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,14 +15,8 @@ org.jetbrains.compose.experimental.uikit.enabled=true #Android android.useAndroidX=true -android.targetSdk=34 -android.compileSdk=34 -android.minSdk=24 #Versions kotlin.version=1.9.22 agp.version=8.3.0 -compose.version=1.6.0 - -#SQLDelight -sqlDelightVersion=1.5.5 \ No newline at end of file +compose.version=1.6.0 \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d5f2f9d3..3fe06f89 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,4 +1,11 @@ [versions] +# @keep +androidCompileSdk = "34" +androidGradlePlugin = "8.2.2" +# @keep +androidMinSdk = "24" +# @keep +androidTargetSdk = "34" appcompat = "1.6.1" activity = "1.8.2" core-ktx = "1.12.0" diff --git a/settings.gradle.kts b/settings.gradle.kts index 670de12c..55880323 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -29,8 +29,6 @@ pluginManagement { } } - - plugins { id("org.gradle.toolchains.foojay-resolver-convention") version ("0.4.0") } diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index a6617d2d..09a89043 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -123,7 +123,7 @@ fun getLocalProperty(key: String, file: String = "local.properties"): Any { } android { - compileSdk = (findProperty("android.compileSdk") as String).toInt() + compileSdk = libs.versions.androidCompileSdk.get().toInt() namespace = "net.schacher.mcc" sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") @@ -131,7 +131,7 @@ android { sourceSets["main"].resources.srcDirs("src/commonMain/resources") defaultConfig { - minSdk = (findProperty("android.minSdk") as String).toInt() + minSdk = libs.versions.androidMinSdk.get().toInt() } compileOptions { sourceCompatibility = JavaVersion.VERSION_17