Skip to content

Commit

Permalink
Use gradle version catalogs for kordex and plugin versions (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi authored Nov 23, 2024
1 parent bf0d9a7 commit 1a91562
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
15 changes: 8 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
20 changes: 18 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
[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"
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" }
Expand All @@ -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" }
15 changes: 0 additions & 15 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down

0 comments on commit 1a91562

Please sign in to comment.