diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 1a3fc8a6..21274077 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -65,7 +65,12 @@ val jacksonVersion = "2.18.3" */ val googleAuthToolVersion = "2.1.5" -val licenseReportVersion = "2.7" +/** + * Generates reports about the licenses of the dependencies for a Gradle project. + * + * https://github.com/jk1/Gradle-License-Report + */ +val licenseReportVersion = "3.1.2" val grGitVersion = "4.1.1" diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt index ba0433aa..b9d6db66 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt @@ -26,6 +26,8 @@ package io.spine.dependency.build +import io.spine.dependency.local.Spine + // https://github.com/Kotlin/dokka @Suppress("unused", "ConstPropertyName") object Dokka { @@ -76,7 +78,7 @@ object Dokka { * Custom Dokka Plugins */ object SpineExtensions { - private const val group = "io.spine.tools" + private const val group = Spine.toolsGroup const val version = "2.0.0-SNAPSHOT.7" const val lib = "$group:spine-dokka-extensions:$version" diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt deleted file mode 100644 index 826f8685..00000000 --- a/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.spine.dependency.build - -// https://github.com/jk1/Gradle-License-Report -@Suppress("unused") -object LicenseReport { - private const val version = "3.0.1" - const val lib = "com.github.jk1:gradle-license-report:$version" - - object GradlePlugin { - const val version = LicenseReport.version - const val id = "com.github.jk1.dependency-license-report" - const val lib = LicenseReport.lib - } -} diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt index 31cbfb3f..abb8cbac 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt @@ -27,6 +27,11 @@ package io.spine.dependency.local import io.spine.dependency.Dependency +import io.spine.dependency.local.Compiler.DF_VERSION_ENV +import io.spine.dependency.local.Compiler.VERSION_ENV +import io.spine.dependency.local.Compiler.dogfoodingVersion +import io.spine.dependency.local.Compiler.pluginLib +import io.spine.dependency.local.Compiler.version /** * Dependencies on the Spine Compiler modules. @@ -60,7 +65,7 @@ import io.spine.dependency.Dependency ) object Compiler : Dependency() { const val pluginGroup = Spine.group - override val group = "io.spine.tools" + override val group = Spine.toolsGroup const val pluginId = "io.spine.compiler" /** @@ -72,7 +77,7 @@ object Compiler : Dependency() { * The version of the Compiler dependencies. */ override val version: String - private const val fallbackVersion = "2.0.0-SNAPSHOT.041" + private const val fallbackVersion = "2.0.0-SNAPSHOT.042" /** * The distinct version of the Compiler used by other build tools. @@ -81,7 +86,7 @@ object Compiler : Dependency() { * transitive dependencies, this is the version used to build the project itself. */ val dogfoodingVersion: String - private const val fallbackDfVersion = "2.0.0-SNAPSHOT.041" + private const val fallbackDfVersion = "2.0.0-SNAPSHOT.042" /** * The artifact for the Compiler Gradle plugin. diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt index 3b4df100..8ead9878 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt @@ -37,7 +37,7 @@ package io.spine.dependency.local "MemberVisibilityCanBePrivate" /* The properties are used directly by other subprojects. */, ) object ProtoTap { - const val group = "io.spine.tools" + const val group = Spine.toolsGroup const val version = "0.14.0" const val gradlePluginId = "io.spine.prototap" const val api = "$group:prototap-api:$version" diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/TestLib.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/TestLib.kt index d3fe7c69..b0cc1e88 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/TestLib.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/TestLib.kt @@ -33,8 +33,8 @@ package io.spine.dependency.local */ @Suppress("ConstPropertyName") object TestLib { - const val version = "2.0.0-SNAPSHOT.211" + const val version = "2.0.0-SNAPSHOT.212" const val group = Spine.toolsGroup - const val artifact = "spine-testlib" + const val artifact = "base-testlib" const val lib = "$group:$artifact:$version" } diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt index 58fb5287..1c551900 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt @@ -35,7 +35,7 @@ package io.spine.dependency.test */ @Suppress("unused", "ConstPropertyName") object Kotest { - const val version = "6.1.10" + const val version = "6.1.11" const val group = "io.kotest" const val gradlePluginId = "io.kotest" const val assertions = "$group:kotest-assertions-core:$version" diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPages.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPages.kt index cdfd2c46..860dfbed 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPages.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPages.kt @@ -107,15 +107,7 @@ class UpdateGitHubPages : Plugin { override fun apply(project: Project) { val extension = UpdateGitHubPagesExtension.createIn(project) project.afterEvaluate { - //TODO:2025-11-20:alexander.yevsyukov: Remove this line and uncomment the below block - // when new publishing procedure is finalized. registerTasks(extension) -// val projectVersion = project.version.toString() -// if (projectVersion.isSnapshot()) { -// registerNoOpTask() -// } else { -// registerTasks(extension) -// } } } diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt index c065198e..fdc81cf9 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt @@ -28,6 +28,7 @@ package io.spine.gradle.publish +import io.spine.dependency.local.Spine import io.spine.gradle.repo.Repository import java.util.Locale import org.gradle.api.Project @@ -435,7 +436,7 @@ open class SpinePublishing(private val project: Project) { } private val Project.isTool: Boolean - get() = group == "io.spine.tools" + get() = group == Spine.toolsGroup /** * Ensures that all modules, marked as included into [testJar] publishing, diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/report/license/LicenseReporter.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/LicenseReporter.kt index 5f18b957..8ede9919 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/report/license/LicenseReporter.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/LicenseReporter.kt @@ -29,6 +29,7 @@ package io.spine.gradle.report.license import com.github.jk1.license.LicenseReportExtension import com.github.jk1.license.LicenseReportExtension.ALL import com.github.jk1.license.LicenseReportPlugin +import io.spine.dependency.local.Spine import io.spine.gradle.applyPlugin import io.spine.gradle.getTask import java.io.File @@ -85,10 +86,10 @@ object LicenseReporter { with(project.the()) { outputDir = reportOutputDir.absolutePath excludeGroups = arrayOf( - "io.spine", + Spine.group, "io.spine.gcloud", "io.spine.protodata", - "io.spine.tools", + Spine.toolsGroup, "io.spine.validation" ) configurations = ALL diff --git a/migrate b/migrate index 8b3ae3bd..0f914775 100755 --- a/migrate +++ b/migrate @@ -49,6 +49,10 @@ cp -a .github-workflows/. ../.github/workflows cp -a .github/workflows/. ../.github/workflows rm -f ../.github/workflows/detekt-code-analysis.yml # This one is `config`-only workflow. +# 2026-04-06 Remove `LicenseReport.kt` as the dependency object is not used. +# We use the `LicenseReportPlugin` class via the dependency in `buildSrc/build.gradle.kts`. +rm -f ../buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt + # 2025-11-20 Remove renamed `Runtime.kt` file. rm -f ../buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt