diff --git a/build.gradle.kts b/build.gradle.kts index 37fd0cd..51a59fe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,10 +16,10 @@ description = "Library which helps to setup and prioritise parameterized tests" dependencies { - api("org.junit.jupiter:junit-jupiter-params:5.10.0") + api(libs.junit.jupiter.params) testImplementation(kotlin("test")) - testImplementation("ch.tutteli.atrium:atrium-fluent:1.0.0") + testImplementation(libs.atrium.fluent) } val generationFolder: ConfigurableFileCollection = project.files("src/main/generated/kotlin") diff --git a/gradle/build-logic/basics/build.gradle.kts b/gradle/build-logic/basics/build.gradle.kts index 3822a65..1e36b79 100644 --- a/gradle/build-logic/basics/build.gradle.kts +++ b/gradle/build-logic/basics/build.gradle.kts @@ -1,9 +1,10 @@ plugins { - id("build-logic.kotlin-dsl-gradle-plugin") + id("build-logic.kotlin-dsl-gradle-plugin") } dependencies { - api(projects.buildParameters) - api("com.github.vlsi.gradle-extensions:com.github.vlsi.gradle-extensions.gradle.plugin:1.90") - api("com.dorongold.plugins:task-tree:2.1.1") + api(projects.buildParameters) + api(buildLibs.vlsi.crlf) + api(buildLibs.vlsi.gradle) + api(buildLibs.taskTree) } diff --git a/gradle/build-logic/basics/src/main/kotlin/extensions.kt b/gradle/build-logic/basics/src/main/kotlin/extensions.kt index 2990a2c..d568941 100644 --- a/gradle/build-logic/basics/src/main/kotlin/extensions.kt +++ b/gradle/build-logic/basics/src/main/kotlin/extensions.kt @@ -1,10 +1,7 @@ import org.gradle.api.DomainObjectCollection -import org.gradle.api.Project import org.gradle.kotlin.dsl.withType -// TODO 1.2.0 move into own repo and fetch via gt -fun Project.prefixedProject(name: String): Project = project(":${rootProject.name}-$name") - +// TODO 0.5.0 move into own repo and fetch via gt // copied from com.github.vlsi.gradle.dsl.configureEach, using this instead so that we don't have to import inline fun DomainObjectCollection.configureEach(noinline configuration: S.() -> Unit) = withType().configureEach(configuration) diff --git a/gradle/build-logic/build-parameters/build.gradle.kts b/gradle/build-logic/build-parameters/build.gradle.kts index b5befe2..a41cdcb 100644 --- a/gradle/build-logic/build-parameters/build.gradle.kts +++ b/gradle/build-logic/build-parameters/build.gradle.kts @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion plugins { id("build-logic.kotlin-dsl-gradle-plugin") - id("org.gradlex.build-parameters") version "1.4.3" + alias(buildLibs.plugins.build.parameters) } buildParameters { diff --git a/gradle/build-logic/dev/build.gradle.kts b/gradle/build-logic/dev/build.gradle.kts index 9339548..d1d21b2 100644 --- a/gradle/build-logic/dev/build.gradle.kts +++ b/gradle/build-logic/dev/build.gradle.kts @@ -5,10 +5,8 @@ plugins { dependencies { api(projects.basics) - api("org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin:1.8.20") - api("org.jetbrains.dokka:dokka-base:1.8.20") - api("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10") - - api("ch.tutteli.gradle.plugins.junitjacoco:ch.tutteli.gradle.plugins.junitjacoco.gradle.plugin:5.0.0") - api("ch.tutteli.gradle.plugins.kotlin.module.info:ch.tutteli.gradle.plugins.kotlin.module.info.gradle.plugin:5.0.0") + api(buildLibs.kotlin) + api(buildLibs.bundles.dokka) + api(buildLibs.tutteli.junitjacoco) + api(buildLibs.tutteli.moduleinfo) } diff --git a/gradle/build-logic/dev/src/main/kotlin/build-logic.java.gradle.kts b/gradle/build-logic/dev/src/main/kotlin/build-logic.java.gradle.kts index 7c3a4ff..a20f007 100644 --- a/gradle/build-logic/dev/src/main/kotlin/build-logic.java.gradle.kts +++ b/gradle/build-logic/dev/src/main/kotlin/build-logic.java.gradle.kts @@ -3,12 +3,6 @@ plugins { id("build-logic.gradle-conventions") } -tasks.register("allDependencyInsight") { - group = HelpTasksPlugin.HELP_GROUP - description = - "Shows insights where the dependency is used. For instance: allDependencyInsight --configuration compile --dependency org.jsoup:jsoup" -} - java { toolchain { // reading JAVA_VERSION from env to enable jdk17 build in CI diff --git a/gradle/build-logic/publishing/build.gradle.kts b/gradle/build-logic/publishing/build.gradle.kts index ff0f9c4..d45da1e 100644 --- a/gradle/build-logic/publishing/build.gradle.kts +++ b/gradle/build-logic/publishing/build.gradle.kts @@ -6,9 +6,7 @@ dependencies { api(projects.basics) api(projects.dev) - api("org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin:1.8.20") - api("org.jetbrains.dokka:dokka-base:1.8.20") - - api("ch.tutteli.gradle.plugins.dokka:ch.tutteli.gradle.plugins.dokka.gradle.plugin:5.0.0") - api("ch.tutteli.gradle.plugins.publish:ch.tutteli.gradle.plugins.publish.gradle.plugin:5.0.0") + api(buildLibs.bundles.dokka) + api(buildLibs.tutteli.dokka) + api(buildLibs.tutteli.publish) } diff --git a/gradle/build-logic/publishing/src/main/kotlin/build-logic.published-kotlin-jvm.gradle.kts b/gradle/build-logic/publishing/src/main/kotlin/build-logic.published-kotlin-jvm.gradle.kts index 09918f1..4e5b4f0 100644 --- a/gradle/build-logic/publishing/src/main/kotlin/build-logic.published-kotlin-jvm.gradle.kts +++ b/gradle/build-logic/publishing/src/main/kotlin/build-logic.published-kotlin-jvm.gradle.kts @@ -11,7 +11,7 @@ tutteliPublish { resetLicenses("EUPL-1.2") addDeveloper { - id = "robstoll_tegonal" + id = "robstoll" name = "Robert Stoll" email = "robert.stoll@tegonal.com" url = "https://tutteli.ch" diff --git a/gradle/build-logic/settings.gradle.kts b/gradle/build-logic/settings.gradle.kts index 0aa8631..2e7a463 100644 --- a/gradle/build-logic/settings.gradle.kts +++ b/gradle/build-logic/settings.gradle.kts @@ -9,6 +9,16 @@ dependencyResolutionManagement { repositories { gradlePluginPortal() } + versionCatalogs { + create("libs") { + from(files("../libs.versions.toml")) + } + } + versionCatalogs { + create("buildLibs") { + from(files("../buildLibs.versions.toml")) + } + } } enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") diff --git a/gradle/buildLibs.versions.toml b/gradle/buildLibs.versions.toml new file mode 100644 index 0000000..0e5ad93 --- /dev/null +++ b/gradle/buildLibs.versions.toml @@ -0,0 +1,29 @@ +[versions] +dokka = "1.9.10" +jacocoTool = "0.8.9" +kotlin = "1.9.10" +task-tree = "2.1.1" +tutteli = "5.0.0" +vlsi = "1.90" + +[libraries] +dokka-plugin = { module = "org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin", version.ref = "dokka" } +dokka-base = { module = "org.jetbrains.dokka:dokka-base", version.ref = "dokka" } +kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +taskTree = { module = "com.dorongold.plugins:task-tree", version.ref = "task-tree" } + +tutteli-dokka = { module = "ch.tutteli.gradle.plugins.dokka:ch.tutteli.gradle.plugins.dokka.gradle.plugin", version.ref = "tutteli" } +tutteli-junitjacoco = { module = "ch.tutteli.gradle.plugins.junitjacoco:ch.tutteli.gradle.plugins.junitjacoco.gradle.plugin", version.ref = "tutteli" } +tutteli-moduleinfo = { module = "ch.tutteli.gradle.plugins.kotlin.module.info:ch.tutteli.gradle.plugins.kotlin.module.info.gradle.plugin", version.ref = "tutteli" } +tutteli-publish = { module = "ch.tutteli.gradle.plugins.publish:ch.tutteli.gradle.plugins.publish.gradle.plugin", version.ref = "tutteli" } +tutteli-spek = { module = "ch.tutteli.gradle.plugins.spek:ch.tutteli.gradle.plugins.spek.gradle.plugin", version.ref = "tutteli" } + +vlsi-crlf = { module = "com.github.vlsi.crlf:com.github.vlsi.crlf.gradle.plugin", version.ref = "vlsi" } +vlsi-gradle = { module = "com.github.vlsi.gradle-extensions:com.github.vlsi.gradle-extensions.gradle.plugin", version.ref = "vlsi" } + + +[bundles] +dokka = ["dokka-base", "dokka-plugin"] + +[plugins] +build-parameters = { id = "org.gradlex.build-parameters", version = "1.4.3" } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..dbc4cc2 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,8 @@ +[versions] +atrium = "1.1.0" +junitJupiter = "5.10.0" + +[libraries] +atrium-fluent = { module = "ch.tutteli.atrium:atrium-fluent", version.ref = "atrium" } +junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junitJupiter" } +junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junitJupiter" }