From a26fd652d574741ffac43b1389c6515c4b9c143d Mon Sep 17 00:00:00 2001 From: vechro Date: Sat, 4 Mar 2023 12:07:53 +0200 Subject: [PATCH] Move to libs.version.toml for version management --- gradle/libs.versions.toml | 33 +++++++++++++++++++++++++ settings.gradle.kts | 51 --------------------------------------- 2 files changed, 33 insertions(+), 51 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..018bb02 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,33 @@ +[versions] +kotlin = "1.8.0" +openrndr = "0.4.2" +orx = "0.4.2" +orml = "0.4.1" + +slf4j = "2.0.6" +log4j = "2.19.0" +jackson = "2.14.1" + +[libraries] +kotlin-script-runtime = { group = "org.jetbrains.kotlin", name = "kotlin-script-runtime", version.ref = "kotlin" } + +slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" } +slf4j-nop = { group = "org.slf4j", name = "slf4j-nop", version.ref = "slf4j" } +slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version.ref = "slf4j" } +log4j-slf4j2 = { group = "org.apache.logging.log4j", name = "log4j-slf4j2-impl", version.ref = "log4j" } +log4j-core = { group = "org.apache.logging.log4j", name = "log4j-core", version.ref = "log4j" } +jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson" } +jackson-json = { group = "com.fasterxml.jackson.dataformat", name = "jackson-dataformat-yaml", version.ref = "jackson" } + +kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.6.4" } +kotlin-logging = { group = "io.github.microutils", name = "kotlin-logging", version = "3.0.4" } +junit = { group = "junit", name = "junit", version = "4.13.2" } +jsoup = { group = "org.jsoup", name = "jsoup", version = "1.15.3" } +gson = { group = "com.google.code.gson", name = "gson", version = "2.10.1" } +csv = { group = "com.github.doyaaaaaken", name = "kotlin-csv-jvm", version = "1.7.0" } + +[plugins] +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +shadow = { id = "com.github.johnrengelman.shadow", version = "7.1.2" } +runtime = { id = "org.beryx.runtime", version = "1.13.0" } +gitarchive-tomarkdown = { id = "org.openrndr.extra.gitarchiver.tomarkdown", version.ref = "orx" } diff --git a/settings.gradle.kts b/settings.gradle.kts index f2c9406..e9eb0a2 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,56 +1,5 @@ -enableFeaturePreview("VERSION_CATALOGS") rootProject.name = "openrndr-template" -val openrndrUseSnapshot = false -val orxUseSnapshot = false -val ormlUseSnapshot = true - -dependencyResolutionManagement { - versionCatalogs { - create("libs") { - version("kotlin", "1.8.0") - version("openrndr", if (openrndrUseSnapshot) "0.5.1-SNAPSHOT" else "0.4.2") - version("orx", if (orxUseSnapshot) "0.5.1-SNAPSHOT" else "0.4.2") - version("orml", if (ormlUseSnapshot) "0.5.1-SNAPSHOT" else "0.4.1") - - plugin("kotlin-jvm", "org.jetbrains.kotlin.jvm").versionRef("kotlin") - plugin("shadow", "com.github.johnrengelman.shadow").version("7.1.2") - plugin("runtime", "org.beryx.runtime").version("1.13.0") - - plugin("gitarchive-tomarkdown", "org.openrndr.extra.gitarchiver.tomarkdown").versionRef("orx") - - library("kotlin-script-runtime", "org.jetbrains.kotlin", "kotlin-script-runtime").versionRef("kotlin") - - version("slf4j", "2.0.6") - library("slf4j-api", "org.slf4j", "slf4j-api").versionRef("slf4j") - library("slf4j-nop", "org.slf4j", "slf4j-nop").versionRef("slf4j") - library("slf4j-simple", "org.slf4j", "slf4j-simple").versionRef("slf4j") - - version("jackson", "2.14.1") - library("jackson-databind", "com.fasterxml.jackson.core", "jackson-databind").versionRef("jackson") - library("jackson-json", "com.fasterxml.jackson.dataformat", "jackson-dataformat-yaml").versionRef("jackson") - - version("log4j", "2.19.0") - library("log4j-slf4j2", "org.apache.logging.log4j", "log4j-slf4j2-impl").versionRef("log4j") - library("log4j-core", "org.apache.logging.log4j", "log4j-core").versionRef("log4j") - - version("kotlinx-coroutines", "1.6.4") - library( - "kotlinx-coroutines-core", - "org.jetbrains.kotlinx", - "kotlinx-coroutines-core" - ).versionRef("kotlinx-coroutines") - - library("kotlin-logging", "io.github.microutils:kotlin-logging-jvm:3.0.4") - library("junit", "junit:junit:4.13.2") - - library("jsoup", "org.jsoup:jsoup:1.15.3") - library("gson", "com.google.code.gson:gson:2.10.1") - library("csv", "com.github.doyaaaaaken:kotlin-csv-jvm:1.7.0") - } - } -} - pluginManagement { repositories { mavenLocal()