From c011485819f6ba1db4b0718cf57ab85aa770a298 Mon Sep 17 00:00:00 2001 From: Shinokuni Date: Sat, 6 Jul 2024 17:04:09 +0200 Subject: [PATCH] Migrate plugin definitions in version catalog --- app/build.gradle.kts | 2 +- build.gradle.kts | 15 ++++----------- gradle/libs.versions.toml | 12 ++++++++++++ settings.gradle | 2 -- settings.gradle.kts | 2 ++ 5 files changed, 19 insertions(+), 14 deletions(-) delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/app/build.gradle.kts b/app/build.gradle.kts index bfa0ad45..67e83106 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -36,7 +36,7 @@ android { } composeOptions { - kotlinCompilerExtensionVersion = "1.5.3" + kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() } lint { diff --git a/build.gradle.kts b/build.gradle.kts index f3728984..24eb3e1b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,22 +5,20 @@ import com.android.build.gradle.LibraryPlugin import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile buildscript { - val kotlin_version = "1.9.10" - repositories { google() mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:8.1.4") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") - classpath("org.jacoco:org.jacoco.core:0.8.7") + classpath(libs.android.agp) + classpath(libs.kotlin.kgp) + classpath(libs.jacoco) } } plugins { - id("com.google.devtools.ksp") version "1.9.10-1.0.13" apply false + alias(libs.plugins.ksp) apply false } allprojects { @@ -31,11 +29,6 @@ allprojects { mavenCentral() maven(url = "https://jitpack.io") } - /*afterEvaluate { - tasks.withType(JavaCompile.class) { - options.compilerArgs << "-Xmaxerrs" << "1000" - } - }*/ } subprojects { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a3a5c8e5..d7144053 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,10 @@ [versions] +kotlin = "1.9.10" +ksp = "1.9.10-1.0.13" +android_agp = "8.1.4" +compose_compiler = "1.5.3" compose_bom = "2024.02.02" + voyager = "1.0.0" lifecycle = "2.7.0" coil = "2.4.0" @@ -10,7 +15,14 @@ paging = "3.2.1" okhttp = "4.11.0" retrofit = "2.9.0" +[plugins] +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } + [libraries] +android-agp = { module = "com.android.tools.build:gradle", version.ref = "android_agp" } +kotlin-kgp = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +jacoco = "org.jacoco:org.jacoco.core:0.8.7" + compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "compose_bom" } compose-foundation = { module = "androidx.compose.foundation:foundation" } compose-runtime = { module = "androidx.compose.runtime:runtime" } diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index b10c566b..00000000 --- a/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -include ':api', ':db' -include ':app' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..0d5b2549 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,2 @@ +include(":api", ":db", ":app") +