From 4eb4ed600b15d5d8e068b761d943a1cda3754e2d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 00:39:29 +0000 Subject: [PATCH 1/4] Update plugin com.google.devtools.ksp to v2 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index d090403..d93ed38 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,7 +28,7 @@ plugins { id("com.android.application") version "8.4.1" apply false id("org.jetbrains.kotlin.android") version "1.9.24" apply false - id("com.google.devtools.ksp") version "1.9.24-1.0.20" apply false + id("com.google.devtools.ksp") version "2.0.0-1.0.22" apply false } repositories { google() From f8b4a1722932f28fd64ccabae730fc6b498bec17 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Jun 2024 22:13:46 +0000 Subject: [PATCH 2/4] Update plugin org.jetbrains.kotlin.android to v2 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4248ea7..d790eb8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,7 +27,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { id("com.android.application") version "8.5.0" apply false - id("org.jetbrains.kotlin.android") version "1.9.24" apply false + id("org.jetbrains.kotlin.android") version "2.0.0" apply false id("com.google.devtools.ksp") version "1.9.24-1.0.20" apply false } repositories { From bd237f16c35570c79bfdbe00780e71146652e220 Mon Sep 17 00:00:00 2001 From: Abrynos <6608231+Abrynos@users.noreply.github.com> Date: Sun, 7 Jul 2024 11:32:31 +0200 Subject: [PATCH 3/4] Update gradle scripts --- app/build.gradle.kts | 42 ++++++++++++++------------------------- build.gradle.kts | 7 ++++--- gradle/libs.versions.toml | 32 +++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 30 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a70b330..15b4895 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -25,9 +25,10 @@ */ plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") - id("com.google.devtools.ksp") + alias(libs.plugins.android.application) + alias(libs.plugins.jetbrains.kotlin.android) + alias(libs.plugins.ksp) + alias(libs.plugins.compose) } kotlin { @@ -45,8 +46,6 @@ android { versionCode = 17 versionName = "v1.15.0" - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - vectorDrawables { useSupportLibrary = true } @@ -74,15 +73,12 @@ android { } dataBinding.enable = true viewBinding.enable = true - composeOptions { - kotlinCompilerExtensionVersion = "1.5.14" - } lint { abortOnError = true warningsAsErrors = true checkAllWarnings = true showAll = true - // sometimes we use the same string for similuar but non-equal purposes + // sometimes we use the same string for similar but non-equal purposes disable.add("DuplicateStrings") // This is an open source project and we don't have a person of each language sitting around translating stuff for us disable.add("MissingTranslation") @@ -100,25 +96,17 @@ android { } dependencies { - implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.2") - - val androidxNavigationVersion = "2.7.7" - implementation("androidx.navigation:navigation-fragment-ktx:$androidxNavigationVersion") - implementation("androidx.navigation:navigation-ui-ktx:$androidxNavigationVersion") + implementation(libs.androidx.lifecycle.runtime) - val roomVersion = "2.6.1" - implementation("androidx.room:room-runtime:$roomVersion") - annotationProcessor("androidx.room:room-compiler:$roomVersion") - ksp("androidx.room:room-compiler:$roomVersion") + implementation(libs.androidx.navigation.fragment) + implementation(libs.androidx.navigation.ui) - implementation("androidx.core:core-ktx:1.13.1") - implementation("androidx.appcompat:appcompat:1.7.0") - implementation("androidx.compose.material3:material3:1.2.1") - implementation("androidx.constraintlayout:constraintlayout:2.1.4") + implementation(libs.room.runtime) + annotationProcessor(libs.room.compiler) + ksp(libs.room.compiler) - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") - androidTestImplementation(platform("androidx.compose:compose-bom:2024.06.00")) - androidTestImplementation("androidx.compose.ui:ui-test-junit4") + implementation(libs.androidx.core) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.material3) + implementation(libs.androidx.constraintlayout) } diff --git a/build.gradle.kts b/build.gradle.kts index 530eff1..48457b2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -26,9 +26,10 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id("com.android.application") version "8.5.0" apply false - id("org.jetbrains.kotlin.android") version "2.0.0" apply false - id("com.google.devtools.ksp") version "2.0.0-1.0.22" apply false + alias(libs.plugins.android.application) apply false + alias(libs.plugins.jetbrains.kotlin.android) apply false + alias(libs.plugins.ksp) apply false + alias(libs.plugins.compose) apply false } repositories { google() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..b0a923f --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,32 @@ +[versions] +android = "8.5.0" +devtools = "2.0.0-1.0.22" +kotlin = "2.0.0" + +lifecycleRuntime = "2.8.2" +androidxNavigation = "2.7.7" +roomVersion = "2.6.1" +appcompat = "1.7.0" +constraintlayout = "2.1.4" +androidxcore = "1.13.1" +material3 = "1.2.1" + +[plugins] +android-application = { id = "com.android.application", version.ref = "android" } +ksp = { id = "com.google.devtools.ksp", version.ref = "devtools" } +jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } +compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } + +[libraries] +androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntime" } + +androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "androidxNavigation" } +androidx-navigation-ui = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "androidxNavigation" } + +room-runtime = { module = "androidx.room:room-runtime", version.ref = "roomVersion" } +room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomVersion" } + +androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } +androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidxcore" } +androidx-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" } From 3c07f561a70d815619497dd7697978fdaab5fbea Mon Sep 17 00:00:00 2001 From: Abrynos <6608231+Abrynos@users.noreply.github.com> Date: Sun, 7 Jul 2024 11:43:43 +0200 Subject: [PATCH 4/4] Misc. --- app/build.gradle.kts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 15b4895..07bc2da 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,3 +1,5 @@ +import com.android.sdklib.AndroidVersion.VersionCodes + /* * _____ _ _ _ _ _ * / ___| | (_) | | (_) | | @@ -37,12 +39,12 @@ kotlin { android { namespace = "pl.edu.pjwstk.s999844.shoppinglist" - compileSdk = 34 + compileSdk = VersionCodes.UPSIDE_DOWN_CAKE defaultConfig { applicationId = "pl.edu.pjwstk.s999844.shoppinglist" - minSdk = 25 - targetSdk = 34 + minSdk = VersionCodes.N_MR1 + targetSdk = VersionCodes.UPSIDE_DOWN_CAKE versionCode = 17 versionName = "v1.15.0" @@ -92,6 +94,8 @@ android { disable.add("UnusedIds") // I'm not a french person so I have no idea what is correct here - let the translators take care of this disable.add("TypographyQuotes") + // SDK 35 is not stable yet - August 2024 + disable.add("OldTargetApi") } }