From 300ea79e14ac5a67c61219095b482043ee5855f7 Mon Sep 17 00:00:00 2001 From: pvannierop Date: Thu, 26 Sep 2024 10:09:14 +0200 Subject: [PATCH] Configure radar-commons-gradle to use the version catalog of the root project --- radar-commons-gradle/gradle.properties | 1 + .../gradle/libs.versions.toml | 56 ------------------- radar-commons-gradle/settings.gradle.kts | 8 +++ 3 files changed, 9 insertions(+), 56 deletions(-) delete mode 100644 radar-commons-gradle/gradle/libs.versions.toml create mode 100644 radar-commons-gradle/settings.gradle.kts diff --git a/radar-commons-gradle/gradle.properties b/radar-commons-gradle/gradle.properties index 09bc35d..b5b9dda 100644 --- a/radar-commons-gradle/gradle.properties +++ b/radar-commons-gradle/gradle.properties @@ -1 +1,2 @@ +# IMPORTANT!! Also set projectVersion in gradle.properties of the root project. projectVersion=1.1.3-SNAPSHOT diff --git a/radar-commons-gradle/gradle/libs.versions.toml b/radar-commons-gradle/gradle/libs.versions.toml deleted file mode 100644 index 8290d0c..0000000 --- a/radar-commons-gradle/gradle/libs.versions.toml +++ /dev/null @@ -1,56 +0,0 @@ -# Because this project is not part of the root project build (it is an 'includeBuild') it cannot make use of the versions -# management of the root project. As a result, it needs to define its own versions file. -# IMPORTANT!! The versions in the following files must be kept in sync: -# - gradle/libs.versions.toml -# - radar-commons-gradle/gradle/libs.versions.toml -# - radar-commons-gradle/src/main/kotlin/org/radarbase/gradle/plugin/Versions.kt -[versions] - -# platform -java = "17" -gradle = "8.7" -kotlin = "1.9.21" -ktlint = "0.50.0" - -# libraries -coroutines = "1.7.3" -ktor = "2.3.4" -slf4j = "2.0.16" -confluent = "7.6.0" -kafka = "7.6.0-ce" -avro = "1.11.3" -jackson = "2.15.3" -okhttp = "4.12.0" -junit = "5.10.0" -mockito = "5.5.0" -mockitoKotlin = "5.1.0" -hamcrest = "2.2" -radarSchemas = "0.8.8" -opencsv = "5.8" -commonsCompress = "1.26.0" -snappy = "1.1.10.5" -guava = "32.1.1-jre" - -# gradle plugins -gradleVersionsPlugin = "0.50.0" -ktlintPlugin = "12.0.3" -licenseReportPlugin = "2.5" -dokkaPlugin = "1.9.10" -avroPlugin = "1.8.0" -nexusPublishPlugin = "2.0.0-rc-1" -sentryPlugin = "4.10.0" - -[libraries] -# Note: some gradle plugins are passed as API dependencies, not as plugins. Hence the duplication. -gradle-kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } -gradle-dokka = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokkaPlugin" } -gradle-versions = { group = "com.github.ben-manes", name = "gradle-versions-plugin", version.ref = "gradleVersionsPlugin" } -gradle-nexus-publish = { group = "io.github.gradle-nexus", name = "publish-plugin", version.ref = "nexusPublishPlugin" } -gradle-ktlint = { group = "org.jlleitschuh.gradle", name = "ktlint-gradle", version.ref = "ktlintPlugin" } -gradle-license-report = { group = "com.github.jk1.dependency-license-report", name = "com.github.jk1.dependency-license-report.gradle.plugin", version.ref = "licenseReportPlugin" } -gradle-sentry = { group = "io.sentry.jvm.gradle", name = "io.sentry.jvm.gradle.gradle.plugin", version.ref = "sentryPlugin" } - -[plugins] -nexus-publish = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexusPublishPlugin"} -dokka = { id = "org.jetbrains.dokka", version.ref = "dokkaPlugin" } -kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } diff --git a/radar-commons-gradle/settings.gradle.kts b/radar-commons-gradle/settings.gradle.kts new file mode 100644 index 0000000..ccee71b --- /dev/null +++ b/radar-commons-gradle/settings.gradle.kts @@ -0,0 +1,8 @@ +// Allows to use the root project version catalog in the includeBuild module +dependencyResolutionManagement { + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +}