diff --git a/build.gradle.kts b/build.gradle.kts index 5acc69d..83d87fa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,14 +2,14 @@ import dev.kordex.gradle.plugins.docker.file.* import dev.kordex.gradle.plugins.kordex.DataCollection plugins { - kotlin("jvm") - kotlin("plugin.serialization") + alias(libs.plugins.kotlin.jvm) + alias(libs.plugins.kotlin.serialization) - id("com.github.johnrengelman.shadow") - id("io.gitlab.arturbosch.detekt") + alias(libs.plugins.shadow) + alias(libs.plugins.detekt) - id("dev.kordex.gradle.docker") - id("dev.kordex.gradle.kordex") + alias(libs.plugins.kordex.docker) + alias(libs.plugins.kordex.plugin) } group = "template" @@ -30,7 +30,8 @@ dependencies { } kordEx { - kordExVersion = "2.3.1-SNAPSHOT" + // https://github.com/gradle/gradle/issues/31383 + kordExVersion = libs.versions.kordex.asProvider() bot { // See https://docs.kordex.dev/data-collection.html diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 090ccfc..ee5701c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -detekt = "1.23.6" # Note: Plugin versions must be updated in the settings.gradle.kts too -kotlin = "2.0.20" # Note: Plugin versions must be updated in the settings.gradle.kts too +detekt = "1.23.6" +kotlin = "2.0.21" groovy = "3.0.22" jansi = "2.4.1" @@ -8,6 +8,11 @@ kx-ser = "1.7.2" logback = "1.5.7" logback-groovy = "1.14.5" logging = "7.0.0" +kordex-gradle = "1.5.8" +kordex = "2.3.1-SNAPSHOT" + +git-hooks = "0.0.2" +shadow = "8.1.1" [libraries] detekt = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" } @@ -18,3 +23,14 @@ kx-ser = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version. logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } logback-groovy = { module = "io.github.virtualdogbert:logback-groovy-config", version.ref = "logback-groovy" } logging = { module = "io.github.oshai:kotlin-logging", version.ref = "logging" } + +[plugins] +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } + +git-hooks = { id = "com.github.jakemarsden.git-hooks", version.ref = "git-hooks" } +shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" } + +kordex-docker = { id = "dev.kordex.gradle.docker", version.ref = "kordex-gradle" } +kordex-plugin = { id = "dev.kordex.gradle.kordex", version.ref = "kordex-gradle" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 87200d4..01a346d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,19 +1,4 @@ pluginManagement { - plugins { - // Update this in libs.version.toml when you change it here. - kotlin("jvm") version "2.0.21" - kotlin("plugin.serialization") version "2.0.21" - - // Update this in libs.version.toml when you change it here. - id("io.gitlab.arturbosch.detekt") version "1.23.6" - - id("com.github.jakemarsden.git-hooks") version "0.0.2" - id("com.github.johnrengelman.shadow") version "8.1.1" - - id("dev.kordex.gradle.docker") version "1.5.1" - id("dev.kordex.gradle.kordex") version "1.5.1" - } - repositories { gradlePluginPortal() mavenCentral()