diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 8b5b4d55..7de0c510 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -58,6 +58,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FORMAL_GIT_HUB_PAGES_AUTHOR: developers@spine.io
# https://docs.github.com/en/actions/reference/environment-variables
- REPO_SLUG: $GITHUB_REPOSITORY # e.g. SpineEventEngine/core-java
+ REPO_SLUG: ${{ github.repository }} # e.g. SpineEventEngine/core-jvm
GOOGLE_APPLICATION_CREDENTIALS: ./maven-publisher.json
NPM_TOKEN: ${{ secrets.NPM_SECRET }}
diff --git a/build.gradle.kts b/build.gradle.kts
index cdc35f29..cd432e4e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -36,7 +36,7 @@ import io.spine.dependency.lib.KotlinPoet
import io.spine.dependency.lib.Protobuf
import io.spine.dependency.local.Base
import io.spine.dependency.local.Compiler
-import io.spine.dependency.local.CoreJava
+import io.spine.dependency.local.CoreJvm
import io.spine.dependency.local.Logging
import io.spine.dependency.local.ProtoData
import io.spine.dependency.local.ToolBase
@@ -58,6 +58,7 @@ buildscript {
dependencies {
// Put the plugin before in the classpath to avoid complaints about the version.
classpath(io.spine.dependency.build.Ksp.gradlePlugin)
+ classpath(io.spine.dependency.local.Compiler.pluginLib)
classpath(io.spine.dependency.local.CoreJvmCompiler.pluginLib)
}
@@ -108,10 +109,12 @@ configurations {
Jackson.forceArtifacts(project, this@all, this@resolutionStrategy)
Jackson.DataType.forceArtifacts(project, this@all, this@resolutionStrategy)
force(
+ Grpc.bom,
Base.annotations,
Base.lib,
+ Base.environment,
Compiler.api,
- CoreJava.server,
+ CoreJvm.server,
Dokka.BasePlugin.lib,
Jackson.annotations,
JSpecify.annotations,
@@ -127,6 +130,8 @@ configurations {
ToolBase.protobufSetupPlugins,
ToolBase.psiJava,
Validation.runtime,
+ Validation.javaBundle,
+ Validation.oldRuntime
)
}
}
@@ -142,11 +147,6 @@ spinePublishing {
gitHub("base-types"),
PublishingRepos.cloudArtifactRegistry
)
-
- dokkaJar {
- kotlin = true
- java = true
- }
}
project.configureTaskDependencies()
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index bec73725..9127fed1 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -113,7 +113,7 @@ val protobufPluginVersion = "0.9.5"
* @see
* Dokka Releases
*/
-val dokkaVersion = "2.0.0"
+val dokkaVersion = "2.1.0"
/**
* The version of Detekt Gradle Plugin.
@@ -127,11 +127,6 @@ val detektVersion = "1.23.8"
*/
val kotestJvmPluginVersion = "0.4.10"
-/**
- * @see [io.spine.dependency.test.Kotest.MultiplatformGradlePlugin]
- */
-val kotestMultiplatformPluginVersion = "6.0.0.M4"
-
/**
* @see [io.spine.dependency.test.Kover]
*/
@@ -185,7 +180,6 @@ dependencies {
"com.gradleup.shadow:shadow-gradle-plugin:$shadowVersion",
"io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion",
"io.kotest:kotest-gradle-plugin:$kotestJvmPluginVersion",
- "io.kotest:kotest-framework-multiplatform-plugin-gradle:$kotestMultiplatformPluginVersion",
// https://github.com/srikanth-lingala/zip4j
"net.lingala.zip4j:zip4j:2.10.0",
"net.ltgt.gradle:gradle-errorprone-plugin:$errorPronePluginVersion",
diff --git a/buildSrc/src/main/kotlin/BuildExtensions.kt b/buildSrc/src/main/kotlin/BuildExtensions.kt
index 83c9e636..4122975f 100644
--- a/buildSrc/src/main/kotlin/BuildExtensions.kt
+++ b/buildSrc/src/main/kotlin/BuildExtensions.kt
@@ -199,43 +199,34 @@ fun Project.configureTaskDependencies() {
}
afterEvaluate {
- val launchProtoData = "launchProtoData"
- val launchTestProtoData = "launchTestProtoData"
val generateProto = "generateProto"
val createVersionFile = "createVersionFile"
val compileKotlin = "compileKotlin"
compileKotlin.run {
dependOn(generateProto)
- dependOn(launchProtoData)
}
val compileTestKotlin = "compileTestKotlin"
- compileTestKotlin.dependOn(launchTestProtoData)
val sourcesJar = "sourcesJar"
val kspKotlin = "kspKotlin"
sourcesJar.run {
dependOn(generateProto)
- dependOn(launchProtoData)
dependOn(kspKotlin)
dependOn(createVersionFile)
dependOn("prepareProtocConfigVersions")
}
- val dokkaHtml = "dokkaHtml"
- dokkaHtml.run {
+ val dokkaGenerate = "dokkaGenerate"
+ dokkaGenerate.run {
dependOn(generateProto)
- dependOn(launchProtoData)
- dependOn(kspKotlin)
- }
- val dokkaJavadoc = "dokkaJavadoc"
- dokkaJavadoc.run {
- dependOn(launchProtoData)
dependOn(kspKotlin)
}
+ val dokkaGeneratePublicationJavadoc = "dokkaGeneratePublicationJavadoc"
+ dokkaGeneratePublicationJavadoc.dependOn(kspKotlin)
"publishPluginJar".dependOn(createVersionFile)
compileKotlin.dependOn(kspKotlin)
compileTestKotlin.dependOn("kspTestKotlin")
"compileTestFixturesKotlin".dependOn("kspTestFixturesKotlin")
- "javadocJar".dependOn(dokkaHtml)
- "dokkaKotlinJar".dependOn(dokkaJavadoc)
+ "javadocJar".dependOn(dokkaGeneratePublicationJavadoc)
+ "htmlDocsJar".dependOn(dokkaGenerate)
}
}
diff --git a/buildSrc/src/main/kotlin/DocumentationSettings.kt b/buildSrc/src/main/kotlin/DocumentationSettings.kt
index b538faed..49247e17 100644
--- a/buildSrc/src/main/kotlin/DocumentationSettings.kt
+++ b/buildSrc/src/main/kotlin/DocumentationSettings.kt
@@ -24,6 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.gradle.api.Project
+
/**
* The documentation settings specific to this project.
*
@@ -33,6 +35,36 @@
@Suppress("ConstPropertyName")
object DocumentationSettings {
+ /**
+ * The organization infix for the Spine SDK.
+ */
+ private const val orgPath = "github.com/SpineEventEngine"
+
+ /**
+ * The organization URL of the Spine SDK.
+ */
+ private const val orgUrl = "https://$orgPath"
+
+ /**
+ * Obtains the repository URL for the given project.
+ */
+ fun repoUrl(project: Project) = "https://${repoPath(project)}"
+
+ /**
+ * Obtains the repository path for the given project.
+ */
+ private fun repoPath(project: Project) = "$orgPath/${project.rootProject.name}"
+
+ /**
+ * Obtains the connection URL for the given project.
+ */
+ fun connectionUrl(project: Project) = "scm:git:git://${repoPath(project)}.git"
+
+ /**
+ * Obtains the developer connection URL for the given project.
+ */
+ fun developerConnectionUrl(project: Project) = "scm:git:ssh://${repoPath(project)}.git"
+
/**
* Settings passed to Dokka for
* [sourceLink][[org.jetbrains.dokka.gradle.engine.parameters.DokkaSourceLinkSpec]
@@ -43,12 +75,16 @@ object DocumentationSettings {
* The URL of the remote source code
* [location][org.jetbrains.dokka.gradle.engine.parameters.DokkaSourceLinkSpec.remoteUrl].
*/
- const val url: String = "https://github.com/SpineEventEngine/base/tree/master/src"
+ fun url(project: Project): String {
+ val root = project.rootProject.name
+ val module = project.name
+ return "$orgUrl/$root/tree/master/$module/src/main/kotlin"
+ }
/**
* The suffix used to append the source code line number to the URL.
*
- * The suffix depends on the online code repository.
+ * The value depends on the online code repository and is set for GitHub (`#L`).
*
* @see
* remoteLineSuffix
diff --git a/buildSrc/src/main/kotlin/DokkaExts.kt b/buildSrc/src/main/kotlin/DokkaExts.kt
index e505a6df..3c72e3bc 100644
--- a/buildSrc/src/main/kotlin/DokkaExts.kt
+++ b/buildSrc/src/main/kotlin/DokkaExts.kt
@@ -29,32 +29,18 @@ import io.spine.gradle.publish.getOrCreate
import java.io.File
import java.time.LocalDate
import org.gradle.api.Project
+import org.gradle.api.Task
import org.gradle.api.artifacts.Dependency
import org.gradle.api.artifacts.dsl.DependencyHandler
-import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
import org.gradle.api.tasks.bundling.Jar
import org.gradle.kotlin.dsl.DependencyHandlerScope
-import org.jetbrains.dokka.gradle.AbstractDokkaTask
import org.jetbrains.dokka.gradle.DokkaExtension
-import org.jetbrains.dokka.gradle.DokkaTask
-import org.jetbrains.dokka.gradle.GradleDokkaSourceSetBuilder
import org.jetbrains.dokka.gradle.engine.parameters.DokkaSourceSetSpec
import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier
import org.jetbrains.dokka.gradle.engine.plugins.DokkaHtmlPluginParameters
-/**
- * To generate the documentation as seen from Java perspective, the `kotlin-as-java`
- * plugin was added to the Dokka classpath.
- *
- * @see
- * Dokka output formats
- */
-fun DependencyHandlerScope.useDokkaForKotlinAsJava() {
- dokkaPlugin(Dokka.KotlinAsJavaPlugin.lib)
-}
-
/**
* To exclude pieces of code annotated with `@Internal` from the documentation
* a custom plugin is added to the Dokka classpath.
@@ -72,9 +58,8 @@ private fun DependencyHandler.dokkaPlugin(dependencyNotation: Any): Dependency?
/**
* Resolves the directory where Dokka outputs HTML documentation for the given language.
*/
-internal fun Project.dokkaOutput(language: String): File {
- val lng = language.titleCaseFirstChar()
- return layout.buildDirectory.dir("docs/dokka$lng").get().asFile
+internal fun Project.dokkaHtmlOutput(): File {
+ return layout.buildDirectory.dir("dokka/html").get().asFile
}
/**
@@ -187,14 +172,14 @@ private fun DokkaSourceSetSpec.configureSourceSet(config: SourceSetConfig) {
}
/**
- * Configures this [DokkaTask] to accept only Kotlin files.
+ * Configures this [DokkaExtension] to accept only Kotlin files.
*/
fun DokkaExtension.configureForKotlin(project: Project, sourceLinkRemoteUrl: String) {
configureFor(project, "kotlin", sourceLinkRemoteUrl)
}
/**
- * Configures this [DokkaTask] to accept only Java files.
+ * Configures this [DokkaExtension] to accept only Java files.
*/
@Suppress("unused")
fun DokkaExtension.configureForJava(project: Project, sourceLinkRemoteUrl: String) {
@@ -202,39 +187,27 @@ fun DokkaExtension.configureForJava(project: Project, sourceLinkRemoteUrl: Strin
}
/**
- * Finds the `dokkaHtml` Gradle task.
+ * Finds the `dokkaGenerateHtml` Gradle task.
*/
-fun TaskContainer.dokkaHtmlTask(): DokkaTask? = this.findByName("dokkaHtml") as DokkaTask?
+fun TaskContainer.dokkaHtmlTask(): Task? = this.findByName("dokkaGeneratePublicationHtml")
/**
- * Returns only Java source roots out of all present in the source set.
- *
- * It is a helper method for generating documentation by Dokka only for Java code.
- * It is helpful when both Java and Kotlin source files are present in a source set.
- * Dokka can properly generate documentation for either Kotlin or Java depending on
- * the configuration, but not both.
+ * Finds the `dokkaGeneratePublicationJavadoc` Gradle task.
*/
-@Suppress("unused")
-internal fun GradleDokkaSourceSetBuilder.onlyJavaSources(): FileCollection {
- return sourceRoots.filter(File::isJavaSourceDirectory)
-}
-
-private fun File.isJavaSourceDirectory(): Boolean {
- return isDirectory && name == "java"
-}
+fun TaskContainer.dokkaJavadocTask(): Task? = this.findByName("dokkaGeneratePublicationJavadoc")
/**
- * Locates or creates `dokkaKotlinJar` task in this [Project].
+ * Locates or creates `htmlDocsJar` task in this [Project].
*
* The output of this task is a `jar` archive. The archive contains the Dokka output, generated upon
* Kotlin sources from `main` source set. Requires Dokka to be configured in the target project by
- * applying `dokka-for-kotlin` plugin.
+ * applying `dokka-setup` plugin.
*/
-fun Project.dokkaKotlinJar(): TaskProvider = tasks.getOrCreate("dokkaKotlinJar") {
- archiveClassifier.set("dokka")
- from(files(dokkaOutput("kotlin")))
+fun Project.htmlDocsJar(): TaskProvider = tasks.getOrCreate("htmlDocsJar") {
+ archiveClassifier.set("html-docs")
+ from(files(dokkaHtmlOutput()))
- tasks.dokkaHtmlTask()?.let{ dokkaTask ->
+ tasks.dokkaHtmlTask()?.let { dokkaTask ->
this@getOrCreate.dependsOn(dokkaTask)
}
}
@@ -246,29 +219,13 @@ fun Project.dokkaKotlinJar(): TaskProvider = tasks.getOrCreate("dokkaKotlin
* This predicate could be useful for disabling publishing tasks
* when doing, e.g., `publishToMavenLocal` for the purpose of the
* integration tests that (of course) do not test the documentation
- * generation proces and its resuults.
+ * generation process and its results.
*/
-fun AbstractDokkaTask.isInPublishingGraph(): Boolean =
+fun Task.isInPublishingGraph(): Boolean =
project.gradle.taskGraph.allTasks.any {
it.name == "publish" || it.name.contains("dokkaGenerate")
}
-/**
- * Locates or creates `dokkaJavaJar` task in this [Project].
- *
- * The output of this task is a `jar` archive. The archive contains the Dokka output, generated upon
- * Kotlin sources from `main` source set. Requires Dokka to be configured in the target project by
- * applying `dokka-for-java` and/or `dokka-for-kotlin` script plugin.
- */
-fun Project.dokkaJavaJar(): TaskProvider = tasks.getOrCreate("dokkaJavaJar") {
- archiveClassifier.set("dokka-java")
- from(files(dokkaOutput("java")))
-
- tasks.dokkaHtmlTask()?.let{ dokkaTask ->
- this@getOrCreate.dependsOn(dokkaTask)
- }
-}
-
/**
* Disables Dokka and Javadoc tasks in this `Project`.
*
diff --git a/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts b/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts
deleted file mode 100644
index c24135e1..00000000
--- a/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts
+++ /dev/null
@@ -1,50 +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.
- */
-
-import org.jetbrains.dokka.gradle.DokkaTaskPartial
-
-plugins {
- id("org.jetbrains.dokka") // Cannot use `Dokka` dependency object here yet.
-}
-
-dependencies {
- useDokkaWithSpineExtensions()
-}
-
-afterEvaluate {
- dokka {
- configureForKotlin(
- project,
- DocumentationSettings.SourceLink.url
- )
- }
-}
-
-tasks.withType().configureEach {
- onlyIf {
- isInPublishingGraph()
- }
-}
diff --git a/buildSrc/src/main/kotlin/dokka-for-java.gradle.kts b/buildSrc/src/main/kotlin/dokka-setup.gradle.kts
similarity index 80%
rename from buildSrc/src/main/kotlin/dokka-for-java.gradle.kts
rename to buildSrc/src/main/kotlin/dokka-setup.gradle.kts
index 6bab0791..d34615c3 100644
--- a/buildSrc/src/main/kotlin/dokka-for-java.gradle.kts
+++ b/buildSrc/src/main/kotlin/dokka-setup.gradle.kts
@@ -24,28 +24,34 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.jetbrains.dokka.gradle.DokkaTaskPartial
+import org.jetbrains.dokka.gradle.tasks.DokkaBaseTask
plugins {
id("org.jetbrains.dokka") // Cannot use `Dokka` dependency object here yet.
+ id("org.jetbrains.dokka-javadoc")
}
dependencies {
- useDokkaForKotlinAsJava()
useDokkaWithSpineExtensions()
}
+tasks.withType().configureEach {
+ onlyIf {
+ isInPublishingGraph()
+ }
+}
+
afterEvaluate {
dokka {
configureForKotlin(
project,
- DocumentationSettings.SourceLink.url
+ DocumentationSettings.SourceLink.url(project)
)
}
-}
-
-tasks.withType().configureEach {
- onlyIf {
- isInPublishingGraph()
+ val kspKotlin = tasks.findByName("kspKotlin")
+ kspKotlin?.let {
+ tasks.withType().configureEach {
+ dependsOn(kspKotlin)
+ }
}
}
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 003bf587..ba0433aa 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt
@@ -35,7 +35,7 @@ object Dokka {
* When changing the version, also change the version used in the
* `buildSrc/build.gradle.kts`.
*/
- const val version = "2.0.0"
+ const val version = "2.1.0"
object GradlePlugin {
const val id = "org.jetbrains.dokka"
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt
index a4eb7548..826f8685 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt
@@ -29,7 +29,7 @@ package io.spine.dependency.build
// https://github.com/jk1/Gradle-License-Report
@Suppress("unused")
object LicenseReport {
- private const val version = "1.16"
+ private const val version = "3.0.1"
const val lib = "com.github.jk1:gradle-license-report:$version"
object GradlePlugin {
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt
index cb0de333..4889ea12 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt
@@ -33,7 +33,7 @@ package io.spine.dependency.lib
)
object Protobuf {
const val group = "com.google.protobuf"
- const val version = "4.33.0"
+ const val version = "4.33.2"
/**
* The Java library with Protobuf data types.
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt
index 94dec0b3..38346ab0 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt
@@ -29,16 +29,18 @@ package io.spine.dependency.local
/**
* Spine Base module.
*
- * @see spine-base
+ * @see spine-base-libraries
*/
@Suppress("ConstPropertyName", "unused")
object Base {
- const val version = "2.0.0-SNAPSHOT.365"
- const val versionForBuildScript = "2.0.0-SNAPSHOT.365"
+ const val version = "2.0.0-SNAPSHOT.384"
+ const val versionForBuildScript = "2.0.0-SNAPSHOT.384"
const val group = Spine.group
- const val artifact = "spine-base"
- const val lib = "$group:$artifact:$version"
- const val format = "$group:spine-format:$version"
- const val libForBuildScript = "$group:$artifact:$versionForBuildScript"
- const val annotations = "$group:spine-annotations:$version"
+ private const val prefix = "spine"
+ const val libModule = "$prefix-base"
+ const val lib = "$group:$libModule:$version"
+ const val libForBuildScript = "$group:$libModule:$versionForBuildScript"
+ const val annotations = "$group:$prefix-annotations:$version"
+ const val environment = "$group:$prefix-environment:$version"
+ const val format = "$group:$prefix-format:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt
index b0ddc995..23c7da75 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt
@@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object BaseTypes {
- const val version = "2.0.0-SNAPSHOT.211"
+ const val version = "2.0.0-SNAPSHOT.212"
const val group = Spine.group
const val artifact = "spine-base-types"
const val lib = "$group:$artifact:$version"
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 78143399..2b06d379 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt
@@ -26,10 +26,12 @@
package io.spine.dependency.local
+import io.spine.dependency.Dependency
+
/**
* Dependencies on the Spine Compiler modules.
*
- * To use a locally published ProtoData version instead of the version from a public plugin
+ * To use a locally published Compiler version instead of the version from a public plugin
* registry, set the `COMPILER_VERSION` and/or the `COMPILER_DF_VERSION` environment variables
* and stop the Gradle daemons so that Gradle observes the env change:
* ```
@@ -56,9 +58,9 @@ package io.spine.dependency.local
"ConstPropertyName" /* We use custom convention for artifact properties. */,
"MemberVisibilityCanBePrivate" /* The properties are used directly by other subprojects. */,
)
-object Compiler {
+object Compiler : Dependency() {
const val pluginGroup = Spine.group
- const val group = "io.spine.tools"
+ override val group = "io.spine.tools"
const val pluginId = "io.spine.compiler"
/**
@@ -67,22 +69,22 @@ object Compiler {
const val module = "io.spine.tools:compiler"
/**
- * The version of ProtoData dependencies.
+ * The version of the Compiler dependencies.
*/
- val version: String
- private const val fallbackVersion = "2.0.0-SNAPSHOT.029"
+ override val version: String
+ private const val fallbackVersion = "2.0.0-SNAPSHOT.036"
/**
- * The distinct version of ProtoData used by other build tools.
+ * The distinct version of the Compiler used by other build tools.
*
- * When ProtoData is used both for building the project and as a part of the Project's
- * transitional dependencies, this is the version used to build the project itself.
+ * When the Compiler is used both for building the project and as a part of the Project's
+ * transitive dependencies, this is the version used to build the project itself.
*/
val dogfoodingVersion: String
- private const val fallbackDfVersion = "2.0.0-SNAPSHOT.029"
+ private const val fallbackDfVersion = "2.0.0-SNAPSHOT.036"
/**
- * The artifact for the ProtoData Gradle plugin.
+ * The artifact for the Compiler Gradle plugin.
*/
val pluginLib: String
@@ -129,6 +131,21 @@ object Compiler {
val testlib
get() = "$group:compiler-testlib:$version"
+ override val modules: List
+ get() = listOf(
+ api,
+ backend,
+ params,
+ protocPlugin,
+ gradleApi,
+ cliApi,
+ jvm,
+ fatCli,
+ testlib
+ ).map {
+ it.split(":").let { (group, artifact) -> "$group:$artifact" }
+ }
+
/**
* An env variable storing a custom [version].
*/
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt
index 6a49b1b4..8441bfc1 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt
@@ -27,17 +27,19 @@
package io.spine.dependency.local
// For backward compatibility.
+@Suppress("unused")
+@Deprecated("Use `CoreJvm` instead.", ReplaceWith("CoreJvm"))
typealias CoreJava = CoreJvm
/**
- * Dependencies on `core-java` modules.
+ * Dependencies on `core-jvm` modules.
*
- * See [`SpineEventEngine/core-java`](https://github.com/SpineEventEngine/core-java/).
+ * See [`SpineEventEngine/core-jvm`](https://github.com/SpineEventEngine/core-jvm/).
*/
@Suppress("ConstPropertyName", "unused")
object CoreJvm {
const val group = Spine.group
- const val version = "2.0.0-SNAPSHOT.333"
+ const val version = "2.0.0-SNAPSHOT.365"
const val coreArtifact = "spine-core"
const val clientArtifact = "spine-client"
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt
index 48686cf7..d49dce0c 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvmCompiler.kt
@@ -46,12 +46,12 @@ object CoreJvmCompiler {
/**
* The version used to in the build classpath.
*/
- const val dogfoodingVersion = "2.0.0-SNAPSHOT.024"
+ const val dogfoodingVersion = "2.0.0-SNAPSHOT.042"
/**
* The version to be used for integration tests.
*/
- const val version = "2.0.0-SNAPSHOT.024"
+ const val version = "2.0.0-SNAPSHOT.042"
/**
* The ID of the Gradle plugin.
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Spine.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Spine.kt
index a5cce498..51cdee70 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Spine.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Spine.kt
@@ -27,7 +27,7 @@
package io.spine.dependency.local
/**
- * Dependencies on smaller Spine modules.
+ * Defines Maven groups for the Spine SDK artifacts.
*/
@Suppress("unused", "ConstPropertyName")
object Spine {
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt
index 6db5024b..4bfe22cd 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt
@@ -33,10 +33,11 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object Time {
- const val version = "2.0.0-SNAPSHOT.204"
+ const val version = "2.0.0-SNAPSHOT.220"
const val group = Spine.group
const val artifact = "spine-time"
const val lib = "$group:$artifact:$version"
-
+ const val javaExtensions = "$group:$artifact-java:$version"
+ const val kotlinExtensions = "$group:$artifact-kotlin:$version"
const val testLib = "${Spine.toolsGroup}:spine-time-testlib:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt
index 0de77f84..1df8dd1f 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt
@@ -34,8 +34,8 @@ package io.spine.dependency.local
@Suppress("ConstPropertyName", "unused")
object ToolBase {
const val group = Spine.toolsGroup
- const val version = "2.0.0-SNAPSHOT.369"
- const val dogfoodingVersion = "2.0.0-SNAPSHOT.369"
+ const val version = "2.0.0-SNAPSHOT.371"
+ const val dogfoodingVersion = "2.0.0-SNAPSHOT.371"
const val lib = "$group:tool-base:$version"
const val classicCodegen = "$group:classic-codegen:$version"
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt
index cf601a64..890eddd3 100644
--- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt
@@ -36,21 +36,28 @@ object Validation {
/**
* The version of the Validation library artifacts.
*/
- const val version = "2.0.0-SNAPSHOT.352"
+ const val version = "2.0.0-SNAPSHOT.383"
/**
* The last version of Validation compatible with ProtoData.
*/
const val pdCompatibleVersion = "2.0.0-SNAPSHOT.342"
- const val group = "io.spine.validation"
- private const val prefix = "spine-validation"
+ const val group = Spine.toolsGroup
+ private const val prefix = "validation"
+
+ const val gradlePluginLib = "$group:$prefix-gradle-plugin:$version"
+
+ const val runtimeModule = "${Spine.group}:spine-$prefix-jvm-runtime"
+
+ fun runtime(version: String) = "$runtimeModule:$version"
+ val runtime = runtime(version)
+
+ @Deprecated("Use `runtime` instead.", ReplaceWith("runtime"))
+ const val oldRuntime = "io.spine.validation:spine-validation-java-runtime:2.0.0-SNAPSHOT.354"
- const val runtimeModule = "$group:$prefix-java-runtime"
- const val runtime = "$runtimeModule:$version"
const val javaModule = "$group:$prefix-java"
const val java = "$javaModule:$version"
-
const val javaBundleModule = "$group:$prefix-java-bundle"
/** Obtains the artifact for the `java-bundle` artifact of the given version. */
@@ -61,5 +68,5 @@ object Validation {
const val model = "$group:$prefix-model:$version"
const val configModule = "$group:$prefix-configuration"
- const val configuration = "$configModule:$version"
+ const val context = "$group:$prefix-context:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt b/buildSrc/src/main/kotlin/io/spine/gradle/Cli.kt
similarity index 94%
rename from buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/Cli.kt
index 0a32c33f..7e0c2274 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/Cli.kt
@@ -35,13 +35,7 @@ import java.lang.ProcessBuilder.Redirect.PIPE
import java.util.*
/**
- * Utilities for working with processes from Gradle code.
- */
-@Suppress("unused")
-private const val ABOUT = ""
-
-/**
- * Executor of CLI commands.
+ * Executes a process from Gradle code.
*
* Uses the passed [workingFolder] as the directory in which the commands are executed.
*/
@@ -92,7 +86,7 @@ class Cli(private val workingFolder: File) {
* Asynchronously reads all lines from this [InputStream] and appends them
* to the passed [StringWriter].
*/
-fun InputStream.pourTo(dest: StringWriter) {
+private fun InputStream.pourTo(dest: StringWriter) {
Thread {
val sc = Scanner(this)
while (sc.hasNextLine()) {
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/dokka/DokkaExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dokka/DokkaExtensions.kt
deleted file mode 100644
index 727a0793..00000000
--- a/buildSrc/src/main/kotlin/io/spine/gradle/dokka/DokkaExtensions.kt
+++ /dev/null
@@ -1,48 +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.gradle.dokka
-
-import java.io.File
-import org.gradle.api.file.FileCollection
-import org.jetbrains.dokka.gradle.GradleDokkaSourceSetBuilder
-
-/**
- * Returns only Java source roots out of all present in the source set.
- *
- * It is a helper method for generating documentation by Dokka only for Java code.
- * It is helpful when both Java and Kotlin source files are present in a source set.
- * Dokka can properly generate documentation for either Kotlin or Java depending on
- * the configuration, but not both.
- */
-@Suppress("unused")
-internal fun GradleDokkaSourceSetBuilder.onlyJavaSources(): FileCollection {
- return sourceRoots.filter(File::isJavaSourceDirectory)
-}
-
-private fun File.isJavaSourceDirectory(): Boolean {
- return isDirectory && name == "java"
-}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/dokka/TaskContainerExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dokka/TaskContainerExtensions.kt
deleted file mode 100644
index 02deead5..00000000
--- a/buildSrc/src/main/kotlin/io/spine/gradle/dokka/TaskContainerExtensions.kt
+++ /dev/null
@@ -1,36 +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.gradle.dokka
-
-import org.gradle.api.tasks.TaskContainer
-import org.jetbrains.dokka.gradle.DokkaTask
-
-/**
- * Finds the `dokkaHtml` Gradle task.
- */
-@Suppress("unused")
-fun TaskContainer.dokkaHtmlTask() = this.getByName("dokkaHtml") as DokkaTask
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/fs/LazyTempPath.kt b/buildSrc/src/main/kotlin/io/spine/gradle/fs/LazyTempPath.kt
index f6e17771..0344819f 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/fs/LazyTempPath.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/fs/LazyTempPath.kt
@@ -57,7 +57,7 @@ class LazyTempPath(private val prefix: String) : Path {
vararg modifiers: WatchEvent.Modifier?
): WatchKey = delegate.register(watcher, events, *modifiers)
- override fun register(watcher: WatchService, vararg events: WatchEvent.Kind<*>?): WatchKey =
+ override fun register(watcher: WatchService, vararg events: WatchEvent.Kind<*>): WatchKey =
delegate.register(watcher, *events)
override fun getFileSystem(): FileSystem = delegate.fileSystem
@@ -101,7 +101,7 @@ class LazyTempPath(private val prefix: String) : Path {
override fun toAbsolutePath(): Path = delegate.toAbsolutePath()
- override fun toRealPath(vararg options: LinkOption?): Path = delegate.toRealPath(*options)
+ override fun toRealPath(vararg options: LinkOption): Path = delegate.toRealPath(*options)
override fun toFile(): File = delegate.toFile()
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/git/Repository.kt b/buildSrc/src/main/kotlin/io/spine/gradle/git/Repository.kt
index 55ce67f0..e0ce8275 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/git/Repository.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/git/Repository.kt
@@ -26,8 +26,11 @@
package io.spine.gradle.git
+import com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly
import io.spine.gradle.Cli
import io.spine.gradle.fs.LazyTempPath
+import java.util.concurrent.TimeUnit.MILLISECONDS
+import org.gradle.api.Project
/**
* Interacts with a real Git repository.
@@ -43,26 +46,18 @@ import io.spine.gradle.fs.LazyTempPath
* NOTE: This class creates a temporal folder, so it holds resources. For the proper
* release of resources please use the provided functionality inside a `use` block or
* call the `close` method manually.
+ *
+ * @property project The Gradle project in which context the repo operations are held.
+ * @property sshUrl The GitHub SSH URL to the underlying repository.
+ * @property user Current user configuration.
+ * This configuration determines what ends up in the `author` and `committer` fields of a commit.
+ * @property currentBranch The currently checked-out branch.
*/
class Repository private constructor(
-
- /**
- * The GitHub SSH URL to the underlying repository.
- */
+ private val project: Project,
private val sshUrl: String,
-
- /**
- * Current user configuration.
- *
- * This configuration determines what ends up in author and committer fields of a commit.
- */
private var user: UserInfo,
-
- /**
- * Currently checked out branch.
- */
- private var currentBranch: String
-
+ private var currentBranch: String,
) : AutoCloseable {
/**
@@ -80,14 +75,21 @@ class Repository private constructor(
/**
* Executes a command in the [location].
*/
- private fun repoExecute(vararg command: String): String =
- Cli(location.toFile()).execute(*command)
+ private fun repoExecute(vararg command: String): String {
+ val cmd = command.toList().joinToString(" ")
+ val msg = "[Repo (${project.path})] Executing command: `$cmd`."
+ System.err.println(msg)
+ return Cli(location.toFile()).execute(*command)
+ }
/**
* Checks out the branch by its name.
+ *
+ * IMPORTANT. The branch must exist in the upstream repository.
*/
fun checkout(branch: String) {
repoExecute("git", "checkout", branch)
+ repoExecute("git", "pull")
currentBranch = branch
}
@@ -128,10 +130,15 @@ class Repository private constructor(
}
/**
- * Pushes local repository to the remote.
+ * Pushes the current branch of the repository to the remote.
+ *
+ * Performs a pull with rebase before pushing to ensure the local branch is up-to-date.
*/
fun push() {
- repoExecute("git", "push")
+ withRetries(description = "Pushing to $sshUrl, branch = '$currentBranch'") {
+ repoExecute("git", "pull", "--rebase")
+ repoExecute("git", "push")
+ }
}
override fun close() {
@@ -139,18 +146,27 @@ class Repository private constructor(
}
companion object Factory {
+
/**
* Clones the repository with the provided SSH URL in a temporal folder.
- * Configures the username and the email of the Git user. See [configureUser]
- * documentation for more information. Performs checkout of the branch in
- * case it was passed. By default, [master][Branch.master] is checked out.
+ *
+ * Configures the username and the email of the Git user.
+ * See [configureUser] documentation for more information.
+ *
+ * Performs checkout of the branch in case it was passed.
+ * By default, [master][Branch.master] is checked out.
*
* @throws IllegalArgumentException if SSH URL is an empty string.
*/
- fun of(sshUrl: String, user: UserInfo, branch: String = Branch.master): Repository {
+ fun clone(
+ project: Project,
+ sshUrl: String,
+ user: UserInfo,
+ branch: String = Branch.master,
+ ): Repository {
require(sshUrl.isNotBlank()) { "SSH URL cannot be an empty string." }
- val repo = Repository(sshUrl, user, branch)
+ val repo = Repository(project, sshUrl, user, branch)
repo.clone()
repo.configureUser(user)
@@ -162,3 +178,44 @@ class Repository private constructor(
}
}
}
+
+/**
+ * Executes a given operation with retries using exponential backoff strategy.
+ *
+ * If the operation fails, it will be retried up to the specified number of times
+ * with increasing delays between attempts.
+ * The delay increases exponentially but is capped at the specified maximum value.
+ *
+ * If all retries fail, the exception from the final attempt will be thrown to the caller.
+ *
+ * @param T the type of value returned by the operation
+ * @param times the maximum number of attempts to execute the operation (default: 3)
+ * @param initialDelay the delay before the first retry in milliseconds (default: 100ms)
+ * @param maxDelay the maximum delay between retries in milliseconds (default: 2000ms)
+ * @param factor the multiplier used to increase delay after each failure (default: 2.0)
+ * @param description a description of the operation for error reporting (default: empty string)
+ * @param block the operation to execute
+ * @return the result of the successful operation execution
+ */
+@Suppress("TooGenericExceptionCaught", "LongParameterList")
+private fun withRetries(
+ times: Int = 5,
+ initialDelay: Long = 2000, // ms
+ maxDelay: Long = 20000, // ms
+ factor: Double = 2.0,
+ description: String = "",
+ block: () -> T
+): T {
+ var currentDelay = initialDelay
+ repeat(times - 1) {
+ try {
+ return block()
+ } catch (e: Exception) {
+ System.err.println("'$description' failed. " +
+ "Message: '${e.message}'. Retrying in $currentDelay ms.")
+ }
+ sleepUninterruptibly(currentDelay, MILLISECONDS)
+ currentDelay = (currentDelay * factor).toLong().coerceAtMost(maxDelay)
+ }
+ return block()
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/RepositoryExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/RepositoryExtensions.kt
index ef67c71f..de752954 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/RepositoryExtensions.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/RepositoryExtensions.kt
@@ -30,6 +30,7 @@ import io.spine.gradle.git.Branch
import io.spine.gradle.git.Repository
import io.spine.gradle.git.UserInfo
import io.spine.gradle.repo.RepoSlug
+import org.gradle.api.Project
/**
* Clones the current project repository with the branch dedicated to publishing
@@ -38,14 +39,15 @@ import io.spine.gradle.repo.RepoSlug
* The repository's GitHub SSH URL is derived from the `REPO_SLUG` environment
* variable. The [branch][Branch.documentation] dedicated to publishing documentation
* is automatically checked out in this repository. Also, the username and the email
- * of the git user are automatically configured. The username is set
- * to "UpdateGitHubPages Plugin", and the email is derived from
+ * of the git user are automatically configured.
+ *
+ * The username is set to `"UpdateGitHubPages Plugin"`, and the email is derived from
* the `FORMAL_GIT_HUB_PAGES_AUTHOR` environment variable.
*
* @throws org.gradle.api.GradleException if any of the environment variables described above
* is not set.
*/
-internal fun Repository.Factory.forPublishingDocumentation(): Repository {
+internal fun Repository.Factory.forPublishingDocumentation(project: Project): Repository {
val host = RepoSlug.fromVar().gitHost()
val username = "UpdateGitHubPages Plugin"
@@ -54,5 +56,5 @@ internal fun Repository.Factory.forPublishingDocumentation(): Repository {
val branch = Branch.documentation
- return of(host, user, branch)
+ return clone(project, host, user, branch)
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/SshKey.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/SshKey.kt
index 186c4746..68be42a0 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/SshKey.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/SshKey.kt
@@ -29,24 +29,43 @@ package io.spine.gradle.github.pages
import io.spine.gradle.Cli
import java.io.File
import org.gradle.api.GradleException
+import org.gradle.api.logging.Logger
/**
- * Registers SSH key for further operations with GitHub Pages.
+ * Registers the SSH key for further operations with GitHub Pages.
+ *
+ * @property rootProjectFolder The folder of the project for which we build the documentation.
+ * @property logger The logger for placing diagnostic messages of this class.
*/
-internal class SshKey(private val rootProjectFolder: File) {
+internal class SshKey(
+ private val rootProjectFolder: File,
+ private val logger: Logger
+) {
+
+ private fun log(message: () -> String) {
+ if (logger.isInfoEnabled) {
+ logger.info("[SshKey] " + message())
+ }
+ }
+
/**
* Creates an SSH key with the credentials and registers it by invoking the
* `register-ssh-key.sh` script.
*/
fun register() {
+ log { "Registering using ${rootProjectFolder.absolutePath}." }
val gitHubAccessKey = gitHubKey()
+ log { "Obtained the key file at ${gitHubAccessKey.absolutePath}." }
val sshConfigFile = sshConfigFile()
+ log { "Located the SSH key file at ${sshConfigFile.absolutePath}." }
sshConfigFile.appendPublisher(gitHubAccessKey)
+ log { "SSH config file appended." }
execute(
"${rootProjectFolder.absolutePath}/config/scripts/register-ssh-key.sh",
gitHubAccessKey.absolutePath
)
+ log { "The SSH key registered." }
}
/**
@@ -59,7 +78,7 @@ internal class SshKey(private val rootProjectFolder: File) {
* publishing.
*
* Thus, we configure the SSH agent to use the `deploy_rsa_key` only for specific
- * references, namely in `github.com-publish`.
+ * references, namely in `github-publish`.
*
* @throws GradleException if `deploy_key_rsa` is not found.
*/
@@ -91,9 +110,10 @@ internal class SshKey(private val rootProjectFolder: File) {
val nl = System.lineSeparator()
this.appendText(
nl +
- "Host github.com-publish" + nl +
- "User git" + nl +
- "IdentityFile ${privateKey.absolutePath}" + nl
+ "Host github-publish" + nl +
+ " HostName github.com" + nl +
+ " User git" + nl +
+ " IdentityFile ${privateKey.absolutePath}" + nl
)
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/TaskName.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/TaskName.kt
index f5e3bfc8..72b8fd37 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/TaskName.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/TaskName.kt
@@ -34,14 +34,14 @@ object TaskName {
const val updateGitHubPages = "updateGitHubPages"
/**
- * The name of the helper task to gather the generated Javadoc before updating
- * GitHub Pages.
+ * The name of the helper task to gather the generated Javadoc format
+ * documentation generated by Dokka before updating GitHub Pages.
*/
- const val copyJavadoc = "copyJavadoc"
+ const val copyJavadocDocs = "copyJavadocDocs"
/**
- * The name of the helper task to gather Dokka-generated documentation before
- * updating GitHub Pages.
+ * The name of the helper task to gather HTML documentation
+ * generated by Dokka before updating GitHub Pages.
*/
- const val copyDokka = "copyDokka"
+ const val copyHtmlDocs = "copyHtmlDocs"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/Update.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/Update.kt
index 0f9a0f5c..785162e8 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/Update.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/Update.kt
@@ -41,23 +41,19 @@ import org.gradle.api.logging.Logger
fun Task.updateGhPages(project: Project) {
val plugin = project.plugins.getPlugin(UpdateGitHubPages::class.java)
- with(plugin) {
- SshKey(rootFolder).register()
- }
+ SshKey(plugin.rootFolder, logger).register()
- val repository = Repository.forPublishingDocumentation()
+ val repository = Repository.forPublishingDocumentation(project)
- val updateJavadoc = with(plugin) {
- UpdateJavadoc(project, javadocOutputFolder, repository, logger)
- }
+ val updateJavadocFormat =
+ UpdateJavadocFormat(project, plugin.javadocOutputFolder, repository, logger)
- val updateDokka = with(plugin) {
- UpdateDokka(project, dokkaOutputFolder, repository, logger)
- }
+ val updateHtmlFormat =
+ UpdateHtmlFormat(project, plugin.htmlOutputFolder, repository, logger)
repository.use {
- updateJavadoc.run()
- updateDokka.run()
+ updateJavadocFormat.run()
+ updateHtmlFormat.run()
repository.push()
}
}
@@ -80,17 +76,17 @@ private abstract class UpdateDocumentation(
protected abstract val docsDestinationFolder: String
/**
- * The name of the tool used to generate the documentation to update.
+ * The name of the format of the documentation to update.
*
* This name will appear in logs as part of a message.
*/
- protected abstract val toolName: String
+ protected abstract val formatName: String
private val mostRecentFolder by lazy {
File("${repository.location}/${docsDestinationFolder}/${project.name}")
}
- private fun logDebug(message: () -> String) {
+ private fun log(message: () -> String) {
if (logger.isDebugEnabled) {
logger.debug(message())
}
@@ -98,25 +94,24 @@ private abstract class UpdateDocumentation(
fun run() {
val module = project.name
- logDebug {"Update of the $toolName documentation for module `$module` started." }
+ log { "Update of the `$formatName` documentation for the module `$module` started." }
val documentation = replaceMostRecentDocs()
copyIntoVersionDir(documentation)
val version = project.version
val updateMessage =
- "Update `$toolName` documentation for module `$module` as for version $version"
+ "Update `$formatName` documentation for the module" +
+ " `$module` with the version `$version`."
repository.commitAllChanges(updateMessage)
- logDebug { "Update of the `$toolName` documentation for `$module` successfully finished." }
+ log { "Update of the `$formatName` documentation for `$module` successfully finished." }
}
private fun replaceMostRecentDocs(): ConfigurableFileCollection {
val generatedDocs = project.files(docsSourceFolder)
- logDebug {
- "Replacing the most recent `$toolName` documentation in `${mostRecentFolder}`."
- }
+ log { "Replacing the most recent `$formatName` documentation in `$mostRecentFolder`." }
copyDocs(generatedDocs, mostRecentFolder)
return generatedDocs
@@ -133,14 +128,12 @@ private abstract class UpdateDocumentation(
private fun copyIntoVersionDir(generatedDocs: ConfigurableFileCollection) {
val versionedDocDir = File("$mostRecentFolder/v/${project.version}")
- logDebug {
- "Storing the new version of `$toolName` documentation in `${versionedDocDir}`."
- }
+ log { "Storing the new version of `$formatName` documentation in `${versionedDocDir}`." }
copyDocs(generatedDocs, versionedDocDir)
}
}
-private class UpdateJavadoc(
+private class UpdateJavadocFormat(
project: Project,
docsSourceFolder: Path,
repository: Repository,
@@ -148,12 +141,12 @@ private class UpdateJavadoc(
) : UpdateDocumentation(project, docsSourceFolder, repository, logger) {
override val docsDestinationFolder: String
- get() = "reference"
- override val toolName: String
- get() = "Javadoc"
+ get() = "javadoc"
+ override val formatName: String
+ get() = "javadoc"
}
-private class UpdateDokka(
+private class UpdateHtmlFormat(
project: Project,
docsSourceFolder: Path,
repository: Repository,
@@ -161,7 +154,7 @@ private class UpdateDokka(
) : UpdateDocumentation(project, docsSourceFolder, repository, logger) {
override val docsDestinationFolder: String
- get() = "dokka-reference"
- override val toolName: String
- get() = "Dokka"
+ get() = "reference"
+ override val formatName: String
+ get() = "html"
}
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 e339dd46..cdfd2c46 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
@@ -27,13 +27,11 @@
package io.spine.gradle.github.pages
import dokkaHtmlTask
+import dokkaJavadocTask
import io.spine.gradle.fs.LazyTempPath
-import io.spine.gradle.github.pages.TaskName.copyDokka
-import io.spine.gradle.github.pages.TaskName.copyJavadoc
+import io.spine.gradle.github.pages.TaskName.copyHtmlDocs
+import io.spine.gradle.github.pages.TaskName.copyJavadocDocs
import io.spine.gradle.github.pages.TaskName.updateGitHubPages
-import io.spine.gradle.isSnapshot
-import io.spine.gradle.javadoc.ExcludeInternalDoclet
-import io.spine.gradle.javadoc.javadocTask
import java.io.File
import org.gradle.api.Plugin
import org.gradle.api.Project
@@ -43,30 +41,12 @@ import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
/**
- * Registers the `updateGitHubPages` task which performs the update of the GitHub
- * Pages with the documentation generated by Javadoc and Dokka for a particular
- * Gradle project. The generated documentation is appended to the `spine.io` site
- * via GitHub pages by pushing commits to the `gh-pages` branch.
- *
- * Please note that the update is only performed for the projects which are
- * NOT snapshots.
+ * Registers the `updateGitHubPages` task which performs the update of
+ * the GitHub Pages with the documentation generated in Javadoc and HTML format
+ * for a particular Gradle project.
*
- * Users may supply [allowInternalJavadoc][UpdateGitHubPagesExtension.allowInternalJavadoc]
- * to configure documentation generated by Javadoc. The documentation for the code
- * marked `@Internal` is included when the option is set to `true`. By default, this
- * option is `false`.
- *
- * Usage:
- * ```
- * updateGitHubPages {
- *
- * // Include `@Internal`-annotated code.
- * allowInternalJavadoc.set(true)
- *
- * // Propagate the full path to the local folder of the repository root.
- * rootFolder.set(rootDir.absolutePath)
- * }
- * ```
+ * The generated documentation is appended to the `spine.io` site
+ * via GitHub pages by pushing commits to the `gh-pages` branch.
*
* In order to work, the script needs a `deploy_key_rsa` private RSA key file in the
* repository root. It is recommended to encrypt it in the repository and then decrypt
@@ -104,16 +84,16 @@ class UpdateGitHubPages : Plugin {
private lateinit var includedInputs: Set
/**
- * Path to the temp folder used to gather the Javadoc output before submitting it
- * to the GitHub Pages update.
+ * Path to the temp folder used to gather the Javadoc format output (generated by Dokka)
+ * before submitting it to the GitHub Pages update.
*/
internal val javadocOutputFolder = LazyTempPath("javadoc")
/**
- * Path to the temp folder used to gather the documentation generated by Dokka
- * before submitting it to the GitHub Pages update.
+ * Path to the temp folder used to gather the HTML documentation
+ * generated by Dokka before submitting it to the GitHub Pages update.
*/
- internal val dokkaOutputFolder = LazyTempPath("dokka")
+ internal val htmlOutputFolder = LazyTempPath("html")
/**
* Applies the plugin to the specified [project].
@@ -127,12 +107,15 @@ class UpdateGitHubPages : Plugin {
override fun apply(project: Project) {
val extension = UpdateGitHubPagesExtension.createIn(project)
project.afterEvaluate {
- val projectVersion = project.version.toString()
- if (projectVersion.isSnapshot()) {
- registerNoOpTask()
- } else {
- registerTasks(extension)
- }
+ //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)
+// }
}
}
@@ -141,6 +124,7 @@ class UpdateGitHubPages : Plugin {
* the message telling the update is skipped, since the project is in
* its `SNAPSHOT` version.
*/
+ @Suppress("unused")
private fun Project.registerNoOpTask() {
tasks.register(updateGitHubPages) {
doLast {
@@ -154,41 +138,31 @@ class UpdateGitHubPages : Plugin {
}
private fun Project.registerTasks(extension: UpdateGitHubPagesExtension) {
- val allowInternalJavadoc = extension.allowInternalJavadoc()
rootFolder = extension.rootFolder()
includedInputs = extension.includedInputs()
- if (!allowInternalJavadoc) {
- val doclet = ExcludeInternalDoclet()
- doclet.registerTaskIn(this)
- }
-
- tasks.registerCopyJavadoc(allowInternalJavadoc)
+ tasks.registerCopyJavadoc()
tasks.registerCopyDokka()
val updatePagesTask = tasks.registerUpdateTask()
updatePagesTask.configure {
- dependsOn(copyJavadoc)
- dependsOn(copyDokka)
+ dependsOn(copyJavadocDocs)
+ dependsOn(copyHtmlDocs)
}
}
- private fun TaskContainer.registerCopyJavadoc(allowInternalJavadoc: Boolean) {
- val inputs = composeJavadocInputs(allowInternalJavadoc)
+ private fun TaskContainer.registerCopyJavadoc() {
+ val inputs = composeJavadocInputs()
- register(copyJavadoc, Copy::class.java) {
+ register(copyJavadocDocs, Copy::class.java) {
inputs.forEach { from(it) }
into(javadocOutputFolder)
}
}
- private fun TaskContainer.composeJavadocInputs(allowInternalJavadoc: Boolean): List {
+ private fun TaskContainer.composeJavadocInputs(): List {
val inputs = mutableListOf()
- if (allowInternalJavadoc) {
- inputs.add(javadocTask())
- } else {
- inputs.add(javadocTask(ExcludeInternalDoclet.taskName))
- }
+ inputs.add(dokkaJavadocTask()!!)
inputs.addAll(includedInputs)
return inputs
}
@@ -196,9 +170,9 @@ class UpdateGitHubPages : Plugin {
private fun TaskContainer.registerCopyDokka() {
val inputs = composeDokkaInputs()
- register(copyDokka, Copy::class.java) {
+ register(copyHtmlDocs, Copy::class.java) {
inputs.forEach { from(it) }
- into(dokkaOutputFolder)
+ into(htmlOutputFolder)
}
}
@@ -226,7 +200,7 @@ class UpdateGitHubPages : Plugin {
}
private fun cleanup() {
- val folders = listOf(dokkaOutputFolder, javadocOutputFolder)
+ val folders = listOf(htmlOutputFolder, javadocOutputFolder)
folders.forEach {
it.toFile().deleteRecursively()
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPagesExtension.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPagesExtension.kt
index 90eebc2f..a849a836 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPagesExtension.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPagesExtension.kt
@@ -38,65 +38,41 @@ import org.gradle.kotlin.dsl.property
* Configures the `updateGitHubPages` extension.
*/
@Suppress("unused")
-fun Project.updateGitHubPages(excludeInternalDocletVersion: String,
- action: UpdateGitHubPagesExtension.() -> Unit) {
+fun Project.updateGitHubPages(
+ action: UpdateGitHubPagesExtension.() -> Unit
+) {
apply()
val extension = extensions.getByType(UpdateGitHubPagesExtension::class)
- extension.excludeInternalDocletVersion = excludeInternalDocletVersion
extension.action()
}
/**
* The extension for configuring the [UpdateGitHubPages] plugin.
+ *
+ * @property rootFolder The root folder of the repository to which the updated `Project` belongs.
+ * @property includeInputs The external inputs, which output should be included
+ * into the GitHub Pages update. The values are interpreted according to
+ * [Copy.from][org.gradle.api.tasks.Copy.from] specification.
+ * This property is optional.
*/
-class UpdateGitHubPagesExtension
-private constructor(
-
- /**
- * Tells whether the types marked `@Internal` should be included into
- * the doc generation.
- */
- val allowInternalJavadoc: Property,
-
- /**
- * The root folder of the repository to which the updated `Project` belongs.
- */
+class UpdateGitHubPagesExtension private constructor(
var rootFolder: Property,
-
- /**
- * The external inputs, which output should be included into
- * the GitHub Pages update.
- *
- * The values are interpreted according to
- * [org.gradle.api.tasks.Copy.from] specification.
- *
- * This property is optional.
- */
var includeInputs: SetProperty
) {
-
- /**
- * The version of the
- * [ExcludeInternalDoclet][io.spine.gradle.javadoc.ExcludeInternalDoclet]
- * used when updating documentation at GitHub Pages.
- *
- * This value is used when adding dependency on the doclet when the plugin tasks
- * are registered. Since the doclet dependency is required, its value passed as
- * a parameter for the extension, rather than a property.
- */
- internal lateinit var excludeInternalDocletVersion: String
-
internal companion object {
- /** The name of the extension. */
+ /**
+ * The name of the extension.
+ */
const val name = "updateGitHubPages"
- /** Creates a new extension and adds it to the passed project. */
+ /**
+ * Creates a new extension and adds it to the passed project.
+ */
fun createIn(project: Project): UpdateGitHubPagesExtension {
val factory = project.objects
val result = UpdateGitHubPagesExtension(
- allowInternalJavadoc = factory.property(Boolean::class),
rootFolder = factory.property(File::class),
includeInputs = factory.setProperty(Any::class.java)
)
@@ -105,27 +81,15 @@ private constructor(
}
}
- /**
- * Returns `true` if the `@Internal`-annotated code should be included into the
- * generated documentation, `false` otherwise.
- */
- fun allowInternalJavadoc(): Boolean {
- return allowInternalJavadoc.get()
- }
-
/**
* Returns the local root folder of the repository, to which the handled Gradle
* Project belongs.
*/
- fun rootFolder(): File {
- return rootFolder.get()
- }
+ fun rootFolder(): File = rootFolder.get()
/**
* Returns the external inputs, which results should be included into the
* GitHub Pages update.
*/
- fun includedInputs(): Set {
- return includeInputs.get()
- }
+ fun includedInputs(): Set = includeInputs.get()
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt
index 13711843..1bf0c0bf 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt
@@ -26,37 +26,6 @@
package io.spine.gradle.publish
-/**
- * A DSL element of [SpinePublishing] extension which configures publishing of
- * [dokkaKotlinJar] artifact.
- *
- * This artifact contains Dokka-generated documentation. By default, it is not published.
- *
- * Take a look at the [SpinePublishing.dokkaJar] for a usage example.
- *
- * @see [artifacts]
- */
-class DokkaJar {
- /**
- * Enables publishing `JAR`s with Dokka-generated documentation for all published modules.
- */
- @Suppress("unused")
- @Deprecated("Please use `kotlin` and `java` flags instead.")
- var enabled = false
-
- /**
- * Controls whether [dokkaKotlinJar] artifact should be published.
- * The default value is `true`.
- */
- var kotlin = true
-
- /**
- * Controls whether [dokkaJavaJar] artifact should be published.
- * The default value is `false`.
- */
- var java = false
-}
-
/**
* A DSL element of [SpinePublishing] extension which allows enabling publishing
* of [testJar] artifact.
@@ -80,88 +49,25 @@ class TestJar {
var enabled = false
}
-/**
- * A DSL element of [SpinePublishing] extension which allows disabling publishing
- * of [protoJar] artifact.
- *
- * This artifact contains all the `.proto` definitions from `sourceSets.main.proto`. By default,
- * it is published.
- *
- * Take a look on [SpinePublishing.protoJar] for a usage example.
- *
- * @see [artifacts]
- */
-class ProtoJar {
-
- /**
- * Set of modules, for which a proto JAR will not be published.
- */
- var exclusions: Set = emptySet()
-
- /**
- * Disables proto JAR publishing for all published modules.
- */
- var disabled = false
-}
-
/**
* Flags for turning optional JAR artifacts in a project.
+ *
+ * @property sourcesJar Tells whether [sourcesJar] artifact should be published.
+ * Default value is `true`.
+ * @property publishTestJar Tells whether [testJar] artifact should be published.
*/
internal data class JarFlags(
-
- /**
- * Tells whether [sourcesJar] artifact should be published.
- *
- * Default value is `true`.
- */
val sourcesJar: Boolean = true,
-
- /**
- * Tells whether [javadocJar] artifact should be published.
- *
- * Default value is `true`.
- */
- val javadocJar: Boolean = true,
-
- /**
- * Tells whether [protoJar] artifact should be published.
- */
- val publishProtoJar: Boolean,
-
- /**
- * Tells whether [testJar] artifact should be published.
- */
val publishTestJar: Boolean,
-
- /**
- * Tells whether [dokkaKotlinJar] artifact should be published.
- */
- val publishDokkaKotlinJar: Boolean,
-
- /**
- * Tells whether [dokkaJavaJar] artifact should be published.
- */
- val publishDokkaJavaJar: Boolean
) {
internal companion object {
/**
* Creates an instance of [JarFlags] for the project with the given name,
* taking the setup parameters from JAR DSL elements.
*/
- fun create(
- projectName: String,
- protoJar: ProtoJar,
- testJar: TestJar,
- dokkaJar: DokkaJar
- ): JarFlags {
- val addProtoJar = (protoJar.exclusions.contains(projectName) || protoJar.disabled).not()
+ fun create(projectName: String, testJar: TestJar): JarFlags {
val addTestJar = testJar.inclusions.contains(projectName) || testJar.enabled
- return JarFlags(
- sourcesJar = true,
- javadocJar = true,
- addProtoJar, addTestJar,
- dokkaJar.kotlin, dokkaJar.java
- )
+ return JarFlags(sourcesJar = true, addTestJar)
}
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt
index 874b7f99..a32e9698 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt
@@ -35,11 +35,15 @@ import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.tasks.bundling.Jar
/**
- * Tells whether there are any Proto sources in "main" source set.
+ * Tells whether there are any Proto sources in the "main" source set.
*/
-internal fun Project.hasProto(): Boolean {
+fun Project.hasProto(): Boolean {
val protoSources = protoSources()
- val result = protoSources.any { it.exists() }
+ val result = protoSources.any {
+ it.exists()
+ && it.isDirectory
+ && it.listFiles()?.isNotEmpty() ?: false
+ }
return result
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublicationHandler.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublicationHandler.kt
index 75c5413a..5b3bbe12 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublicationHandler.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublicationHandler.kt
@@ -29,6 +29,7 @@ package io.spine.gradle.publish
import LicenseSettings
import io.spine.gradle.isSnapshot
import io.spine.gradle.repo.Repository
+import io.spine.gradle.report.pom.InceptionYear
import org.gradle.api.Project
import org.gradle.api.artifacts.dsl.RepositoryHandler
import org.gradle.api.invocation.BuildInvocationDetails
@@ -52,7 +53,7 @@ private const val MAVEN_PUBLISH = "maven-publish"
* the [`spinePublishing`][io.spine.gradle.publish.SpinePublishing.destinations]
* extension applied to the subproject.
*/
-internal sealed class PublicationHandler(
+sealed class PublicationHandler(
protected val project: Project,
protected var destinations: Set
) {
@@ -146,11 +147,19 @@ internal sealed class PublicationHandler(
}
version = project.version.toString()
pom.description.set(project.description)
-
+ pom.inceptionYear.set(InceptionYear.value)
pom.licenses {
license {
name.set(LicenseSettings.name)
url.set(LicenseSettings.url)
+ distribution.set(LicenseSettings.url)
+ }
+ }
+ pom.scm {
+ DocumentationSettings.run {
+ url.set(repoUrl(project))
+ connection.set(connectionUrl(project))
+ developerConnection.set(developerConnectionUrl(project))
}
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingExts.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingExts.kt
index 0a24b56b..efe51d60 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingExts.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingExts.kt
@@ -26,7 +26,7 @@
package io.spine.gradle.publish
-import dokkaKotlinJar
+import htmlDocsJar
import io.spine.gradle.isSnapshot
import io.spine.gradle.repo.Repository
import io.spine.gradle.sourceSets
@@ -36,6 +36,7 @@ import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.publish.PublicationContainer
import org.gradle.api.publish.PublishingExtension
+import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
import org.gradle.api.tasks.bundling.Jar
@@ -231,7 +232,7 @@ fun TaskContainer.excludeGoogleProtoFromArtifacts() {
* Java and Kotlin sources are default to `main` source set since it is created by `java` plugin.
* For Proto sources to be included – [special treatment][protoSources] is needed.
*/
-internal fun Project.sourcesJar(): TaskProvider = tasks.getOrCreate("sourcesJar") {
+fun Project.sourcesJar(): TaskProvider = tasks.getOrCreate("sourcesJar") {
dependOnGenerateProto()
archiveClassifier.set("sources")
from(sourceSets["main"].allSource) // Puts Java and Kotlin sources.
@@ -245,7 +246,7 @@ internal fun Project.sourcesJar(): TaskProvider = tasks.getOrCreate("source
* The output of this task is a `jar` archive. The archive contains only
* [Proto sources][protoSources] from `main` source set.
*/
-internal fun Project.protoJar(): TaskProvider = tasks.getOrCreate("protoJar") {
+fun Project.protoJar(): TaskProvider = tasks.getOrCreate("protoJar") {
dependOnGenerateProto()
archiveClassifier.set("proto")
from(protoSources())
@@ -271,9 +272,9 @@ internal fun Project.testJar(): TaskProvider = tasks.getOrCreate("testJar")
*/
fun Project.javadocJar(): TaskProvider = tasks.getOrCreate("javadocJar") {
archiveClassifier.set("javadoc")
- val javadocFiles = layout.buildDirectory.files("/docs/javadoc")
+ val javadocFiles = layout.buildDirectory.dir("dokka/javadoc")
from(javadocFiles)
- dependsOn("javadoc")
+ dependsOn("dokkaGeneratePublicationJavadoc")
}
internal fun TaskContainer.getOrCreate(name: String, init: Jar.() -> Unit): TaskProvider =
@@ -300,12 +301,12 @@ internal fun Project.artifacts(jarFlags: JarFlags): Set> {
tasks.add(sourcesJar())
}
- if (jarFlags.javadocJar) {
- tasks.add(javadocJar())
- }
+ tasks.add(javadocJar())
+ tasks.add(htmlDocsJar())
+
// We don't want to have an empty "proto.jar" when a project doesn't have any Proto files.
- if (hasProto() && jarFlags.publishProtoJar) {
+ if (hasProto()) {
tasks.add(protoJar())
}
@@ -315,9 +316,22 @@ internal fun Project.artifacts(jarFlags: JarFlags): Set> {
tasks.add(testJar())
}
- if (jarFlags.publishDokkaKotlinJar) {
- tasks.add(dokkaKotlinJar())
- }
-
return tasks
}
+
+/**
+ * Adds the source code and documentation JARs to the publication.
+ */
+@Suppress("unused")
+fun MavenPublication.addSourceAndDocJars(project: Project) {
+ val tasks = mutableSetOf>()
+ tasks.add(project.sourcesJar())
+ tasks.add(project.javadocJar())
+ tasks.add(project.htmlDocsJar())
+ if (project.hasProto()) {
+ tasks.add(project.protoJar())
+ }
+ tasks.forEach {
+ artifact(it)
+ }
+}
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 9dc7d7c9..480175fe 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt
@@ -129,20 +129,16 @@ import org.gradle.kotlin.dsl.findByType
* 1. [sourcesJar] — sources from the `main` source set. Includes handcrafted and generated
* code in Java, Kotlin, and `.proto` files.
*
- * 2. [protoJar] – only `.proto` sources from the `main` source set. It's published only if
- * Proto files are actually present in the source set. Publication of this artifact is optional
- * and can be disabled via [SpinePublishing.protoJar].
+ * 2. [protoJar] – only `.proto` sources from the `main` source set. It is published only if
+ * Proto files are actually present in the source set.
*
* 3. [javadocJar] — Javadoc, generated upon Java sources from the `main` source set.
* If Javadoc for Kotlin is also needed, apply the Dokka plugin.
* It tunes the `javadoc` task to generate docs upon Kotlin sources as well.
*
- * 4. [dokkaKotlinJar] — documentation generated by Dokka for Kotlin and Java sources
+ * 4. [htmlDocsJar] — documentation generated by Dokka for Kotlin and Java sources
* using the Kotlin API mode.
*
- * 5. [dokkaJavaJar] — documentation generated by Dokka for Kotlin and Java sources
- * using the Java API mode.
- *
* Additionally, [testJar] artifact can be published. This artifact contains compilation output
* of the `test` source set. Use [SpinePublishing.testJar] to enable its publishing.
*
@@ -188,9 +184,7 @@ open class SpinePublishing(private val project: Project) {
const val DEFAULT_PREFIX = "spine-"
}
- private val protoJar = ProtoJar()
private val testJar = TestJar()
- private val dokkaJar = DokkaJar()
/**
* Set of modules to be published.
@@ -260,45 +254,6 @@ open class SpinePublishing(private val project: Project) {
*/
var artifactPrefix: String = DEFAULT_PREFIX
- /**
- * Allows disabling publishing of [protoJar] artifact, containing all Proto sources
- * from `sourceSets.main.proto`.
- *
- * Here's an example of how to disable it for some of the published modules:
- *
- * ```kotlin
- * spinePublishing {
- * modules = setOf(
- * "subprojectA",
- * "subprojectB",
- * )
- * protoJar {
- * exclusions = setOf(
- * "subprojectB",
- * )
- * }
- * }
- * ```
- *
- * For all modules, or when the extension is configured within a published module itself:
- *
- * ```
- * spinePublishing {
- * protoJar {
- * disabled = true
- * }
- * }
- * ```
- *
- * The resulting artifact is available under the "proto" classifier.
- * For example, in Gradle 7+, one could depend on it like this:
- *
- * ```
- * implementation("io.spine:spine-client:$version@proto")
- * ```
- */
- fun protoJar(block: ProtoJar.() -> Unit) = protoJar.run(block)
-
/**
* Allows enabling publishing of [testJar] artifact, containing compilation output
* of "test" source set.
@@ -338,34 +293,6 @@ open class SpinePublishing(private val project: Project) {
*/
fun testJar(block: TestJar.() -> Unit) = testJar.run(block)
- /**
- * Configures publishing of [dokkaKotlinJar] and [dokkaJavaJar] artifacts,
- * containing Dokka-generated documentation.
- *
- * By default, publishing of the [dokkaKotlinJar] artifact is enabled, and [dokkaJavaJar]
- * is disabled.
- *
- * Remember that the Dokka Gradle plugin should be applied to publish this artifact as it is
- * produced by the `dokkaHtml` task. It can be done by using the
- * [io.spine.dependency.build.Dokka] dependency object or by applying the
- * `buildSrc/src/main/kotlin/dokka-for-kotlin` or
- * `buildSrc/src/main/kotlin/dokka-for-java` script plugins.
- *
- * Here's an example of how to use this option:
- *
- * ```
- * spinePublishing {
- * dokkaJar {
- * kotlin = false
- * java = true
- * }
- * }
- * ```
- *
- * The resulting artifact is available under the "dokka" classifier.
- */
- fun dokkaJar(block: DokkaJar.() -> Unit) = dokkaJar.run(block)
-
/**
* Called to notify the extension that its configuration is completed.
*
@@ -373,14 +300,13 @@ open class SpinePublishing(private val project: Project) {
* `maven-publish` plugin for each published module.
*/
internal fun configured() {
- ensureProtoJarExclusionsArePublished()
ensureTestJarInclusionsArePublished()
ensureModulesNotDuplicated()
ensureCustomPublishingNotMisused()
val projectsToPublish = projectsToPublish()
projectsToPublish.forEach { project ->
- val jarFlags = JarFlags.create(project.name, protoJar, testJar, dokkaJar)
+ val jarFlags = JarFlags.create(project.name, testJar)
project.setUpPublishing(jarFlags)
}
}
@@ -468,24 +394,6 @@ open class SpinePublishing(private val project: Project) {
*/
fun artifactId(project: Project): String = "$artifactPrefix${project.name}"
- /**
- * Ensures that all modules, marked as excluded from [protoJar] publishing,
- * are actually published.
- *
- * It makes no sense to tell a module don't publish [protoJar] artifact, if the module is not
- * published at all.
- */
- private fun ensureProtoJarExclusionsArePublished() {
- val nonPublishedExclusions = protoJar.exclusions.minus(modules)
- if (nonPublishedExclusions.isNotEmpty()) {
- error(
- "One or more modules are marked as" +
- " `excluded from proto JAR publication`," +
- " but they are not even published: $nonPublishedExclusions."
- )
- }
- }
-
/**
* Ensures that all modules, marked as included into [testJar] publishing,
* are actually published.
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/StandardJavaPublicationHandler.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/StandardJavaPublicationHandler.kt
index 06d78c10..17648f80 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/StandardJavaPublicationHandler.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/StandardJavaPublicationHandler.kt
@@ -57,7 +57,7 @@ import org.gradle.kotlin.dsl.create
* The Maven Publish Plugin | Publications
* @see CustomPublicationHandler
*/
-internal class StandardJavaPublicationHandler private constructor(
+class StandardJavaPublicationHandler private constructor(
project: Project,
private val jarFlags: JarFlags,
destinations: Set,
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/repo/RepoSlug.kt b/buildSrc/src/main/kotlin/io/spine/gradle/repo/RepoSlug.kt
index 461c690e..d4a6bfd2 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/repo/RepoSlug.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/repo/RepoSlug.kt
@@ -50,7 +50,7 @@ class RepoSlug(val value: String) {
fun fromVar(): RepoSlug {
val envValue = System.getenv(environmentVariable)
if (envValue.isNullOrEmpty()) {
- throw GradleException("`REPO_SLUG` environment variable is not set.")
+ throw GradleException("`$environmentVariable` environment variable is not set.")
}
return RepoSlug(envValue)
}
@@ -62,6 +62,6 @@ class RepoSlug(val value: String) {
* Returns the GitHub URL to the project repository.
*/
fun gitHost(): String {
- return "git@github.com-publish:${value}.git"
+ return "git@github-publish:${value}.git"
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt b/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt
index 43abe47c..de91e33f 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt
@@ -96,8 +96,14 @@ fun RepositoryHandler.spineArtifacts(): MavenArtifactRepository = maven {
val RepositoryHandler.intellijReleases: MavenArtifactRepository
get() = maven("https://www.jetbrains.com/intellij-repository/releases")
-val RepositoryHandler.jetBrainsCacheRedirector: MavenArtifactRepository
- get() = maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
+val RepositoryHandler.intellijDependencies: MavenArtifactRepository
+ get() = maven("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") {
+ content {
+ includeGroupByRegex("com\\.jetbrains\\.intellij.*")
+ includeGroupByRegex("org\\.jetbrains\\.intellij.*")
+ includeGroupByRegex("com\\.intellij.*")
+ }
+ }
/**
* Applies repositories commonly used by Spine Event Engine projects.
@@ -123,7 +129,7 @@ fun RepositoryHandler.standardToSpineSdk() {
}
intellijReleases
- jetBrainsCacheRedirector
+ intellijDependencies
maven {
url = URI(Repos.sonatypeSnapshots)
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 ec86eb58..5f18b957 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
@@ -151,11 +151,18 @@ object LicenseReporter {
sourceProjects: Iterable,
rootProject: Project
) {
- val paths = sourceProjects.map {
- val buildDir = it.layout.buildDirectory.asFile.get()
- "$buildDir/${Paths.relativePath}/${Paths.outputFilename}"
- }
- println("Merging the license reports from the all projects.")
+ val paths = sourceProjects
+ .map {
+ val buildDir = it.layout.buildDirectory.asFile.get()
+ "$buildDir/${Paths.relativePath}/${Paths.outputFilename}"
+ }.filter {
+ val exists = File(it).exists()
+ if (!exists) {
+ rootProject.logger.debug("License report file not found: $it")
+ }
+ exists
+ }
+ println("Merging the license reports from all projects.")
val mergedContent = paths.joinToString("\n\n\n") { (File(it)).readText() }
val output = File("${rootProject.rootDir}/${Paths.outputFilename}")
output.writeText(mergedContent)
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/InceptionYear.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/InceptionYear.kt
index cb25b3d6..ed94b29e 100644
--- a/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/InceptionYear.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/InceptionYear.kt
@@ -35,7 +35,10 @@ import org.gradle.kotlin.dsl.withGroovyBuilder
*/
internal object InceptionYear {
- private const val SPINE_INCEPTION_YEAR = "2015"
+ /**
+ * The year of the inception of Spine.
+ */
+ const val value = "2015"
/**
* Returns a string containing the inception year of Spine in a `pom.xml` format.
@@ -44,7 +47,7 @@ internal object InceptionYear {
val writer = StringWriter()
val xml = MarkupBuilder(writer)
xml.withGroovyBuilder {
- "inceptionYear" { xml.text(SPINE_INCEPTION_YEAR) }
+ "inceptionYear" { xml.text(value) }
}
return writer.toString()
}
diff --git a/buildSrc/src/main/kotlin/jvm-module.gradle.kts b/buildSrc/src/main/kotlin/jvm-module.gradle.kts
index 7bc595c8..11696c1a 100644
--- a/buildSrc/src/main/kotlin/jvm-module.gradle.kts
+++ b/buildSrc/src/main/kotlin/jvm-module.gradle.kts
@@ -46,10 +46,9 @@ plugins {
id("net.ltgt.errorprone")
id("pmd-settings")
id("project-report")
- id("dokka-for-java")
kotlin("jvm")
id("detekt-code-analysis")
- id("dokka-for-kotlin")
+ id("dokka-setup")
id("org.jetbrains.kotlinx.kover")
id("module-testing")
}
@@ -160,9 +159,7 @@ fun Module.setTaskDependencies(generatedDir: String) {
}
fun Module.configureGitHubPages() {
- val docletVersion = project.version.toString()
- updateGitHubPages(docletVersion) {
- allowInternalJavadoc.set(true)
+ updateGitHubPages {
rootFolder.set(rootDir)
}
}
diff --git a/buildSrc/src/main/kotlin/kmp-publish.gradle.kts b/buildSrc/src/main/kotlin/kmp-publish.gradle.kts
index 53b0a219..e4c3aa1b 100644
--- a/buildSrc/src/main/kotlin/kmp-publish.gradle.kts
+++ b/buildSrc/src/main/kotlin/kmp-publish.gradle.kts
@@ -59,17 +59,17 @@ val about = ""
plugins {
`maven-publish`
- id("dokka-for-kotlin")
+ id("dokka-setup")
}
publishing.publications {
named("kotlinMultiplatform") {
// Although, the "common artifact" can't be used independently
// of target artifacts, it is published with documentation.
- artifact(project.dokkaKotlinJar())
+ artifact(project.htmlDocsJar())
}
named("jvm") {
// Includes Kotlin (JVM + common) and Java documentation.
- artifact(project.dokkaKotlinJar())
+ artifact(project.htmlDocsJar())
}
}
diff --git a/buildSrc/src/main/kotlin/test-module.gradle.kts b/buildSrc/src/main/kotlin/test-module.gradle.kts
index 23aa4a25..d64de094 100644
--- a/buildSrc/src/main/kotlin/test-module.gradle.kts
+++ b/buildSrc/src/main/kotlin/test-module.gradle.kts
@@ -26,11 +26,14 @@
import io.spine.dependency.local.Base
import io.spine.dependency.local.Validation
+import io.spine.gradle.report.license.LicenseReporter
plugins {
java
`java-test-fixtures`
+ id("module-testing")
}
+LicenseReporter.generateReportIn(project)
dependencies {
arrayOf(
diff --git a/config b/config
index 08ecf3e3..9a4fbe2b 160000
--- a/config
+++ b/config
@@ -1 +1 @@
-Subproject commit 08ecf3e347cc85663f2ab89bd7958aae73d7b944
+Subproject commit 9a4fbe2bcae9a7b5f0d20159d41a8756d236e146
diff --git a/dependencies.md b/dependencies.md
index d94c8c8d..44fc2409 100644
--- a/dependencies.md
+++ b/dependencies.md
@@ -1,6 +1,6 @@
-# Dependencies of `io.spine:spine-base-types:2.0.0-SNAPSHOT.212`
+# Dependencies of `io.spine:spine-base-types:2.0.0-SNAPSHOT.220`
## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
@@ -30,15 +30,15 @@
* **Project URL:** [https://github.com/google/j2objc/](https://github.com/google/j2objc/)
* **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
-1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 4.33.0.
+1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 4.33.2.
* **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/)
* **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)
-1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 4.33.0.
+1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 4.33.2.
* **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/)
* **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)
-1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 4.33.0.
+1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 4.33.2.
* **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/)
* **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)
@@ -271,19 +271,19 @@
* **Project URL:** [https://github.com/google/protobuf-gradle-plugin](https://github.com/google/protobuf-gradle-plugin)
* **License:** [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause)
-1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 4.33.0.
+1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 4.33.2.
* **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/)
* **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)
-1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 4.33.0.
+1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 4.33.2.
* **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/)
* **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)
-1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 4.33.0.
+1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 4.33.2.
* **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/)
* **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)
-1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 4.33.0.
+1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 4.33.2.
* **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/)
* **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause)
* **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
@@ -316,6 +316,10 @@
* **Project URL:** [http://www.github.com/sksamuel/aedile](http://www.github.com/sksamuel/aedile)
* **License:** [The Apache 2.0 License](https://opensource.org/licenses/Apache-2.0)
+1. **Group** : com.soywiz.korlibs.korte. **Name** : korte-jvm. **Version** : 4.0.10.
+ * **Project URL:** [https://github.com/korlibs/korge-next](https://github.com/korlibs/korge-next)
+ * **License:** [MIT](https://raw.githubusercontent.com/korlibs/korge-next/master/korge/LICENSE.txt)
+
1. **Group** : com.squareup. **Name** : javapoet. **Version** : 1.13.0.
* **Project URL:** [http://github.com/square/javapoet/](http://github.com/square/javapoet/)
* **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
@@ -475,7 +479,7 @@
* **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java)
* **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0)
-1. **Group** : io.grpc. **Name** : grpc-bom. **Version** : 1.72.0.
+1. **Group** : io.grpc. **Name** : grpc-bom. **Version** : 1.76.0.
* **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java)
* **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0)
@@ -691,27 +695,31 @@
* **Project URL:** [https://github.com/JetBrains/markdown](https://github.com/JetBrains/markdown)
* **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
-1. **Group** : org.jetbrains.dokka. **Name** : analysis-kotlin-descriptors. **Version** : 2.0.0.
+1. **Group** : org.jetbrains.dokka. **Name** : analysis-kotlin-symbols. **Version** : 2.1.0.
* **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka)
* **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
-1. **Group** : org.jetbrains.dokka. **Name** : analysis-markdown. **Version** : 2.0.0.
+1. **Group** : org.jetbrains.dokka. **Name** : analysis-markdown. **Version** : 2.1.0.
* **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka)
* **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
-1. **Group** : org.jetbrains.dokka. **Name** : dokka-base. **Version** : 2.0.0.
+1. **Group** : org.jetbrains.dokka. **Name** : dokka-base. **Version** : 2.1.0.
* **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka)
* **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
-1. **Group** : org.jetbrains.dokka. **Name** : dokka-core. **Version** : 2.0.0.
+1. **Group** : org.jetbrains.dokka. **Name** : dokka-core. **Version** : 2.1.0.
* **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka)
* **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
-1. **Group** : org.jetbrains.dokka. **Name** : kotlin-as-java-plugin. **Version** : 2.0.0.
+1. **Group** : org.jetbrains.dokka. **Name** : javadoc-plugin. **Version** : 2.1.0.
* **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka)
* **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
-1. **Group** : org.jetbrains.dokka. **Name** : templating-plugin. **Version** : 2.0.0.
+1. **Group** : org.jetbrains.dokka. **Name** : kotlin-as-java-plugin. **Version** : 2.1.0.
+ * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka)
+ * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
+
+1. **Group** : org.jetbrains.dokka. **Name** : templating-plugin. **Version** : 2.1.0.
* **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka)
* **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)
@@ -823,10 +831,18 @@
* **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/)
* **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
+1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 2.2.21.
+ * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/)
+ * **License:** [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.0.21.
* **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/)
* **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
+1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.2.21.
+ * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/)
+ * **License:** [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
+
1. **Group** : org.jetbrains.kotlin. **Name** : swift-export-embeddable. **Version** : 2.2.21.
* **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/)
* **License:** [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
@@ -1010,6 +1026,6 @@
The dependencies distributed under several licenses, are used according their commercial-use-friendly license.
-This report was generated on **Tue Oct 28 18:30:48 WET 2025** using
+This report was generated on **Mon Dec 22 17:45:04 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 8bdaf60c..f8e1ee31 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 2e111328..23449a2b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
index 23d15a93..adff685a 100755
--- a/gradlew
+++ b/gradlew
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright © 2015-2021 the original authors.
+# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
-CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
- -classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
diff --git a/gradlew.bat b/gradlew.bat
index db3a6ac2..c4bdd3ab 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -70,11 +70,10 @@ goto fail
:execute
@rem Setup the command line
-set CLASSPATH=
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
diff --git a/pom.xml b/pom.xml
index 6f405159..a7e0c47f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject.
-->
io.spine
base-types
-2.0.0-SNAPSHOT.212
+2.0.0-SNAPSHOT.220
2015
@@ -32,31 +32,31 @@ all modules and does not describe the project structure per-subproject.
com.google.protobuf
protobuf-java
- 4.33.0
+ 4.33.2
compile
com.google.protobuf
protobuf-java-util
- 4.33.0
+ 4.33.2
compile
com.google.protobuf
protobuf-kotlin
- 4.33.0
+ 4.33.2
compile
io.spine
spine-base
- 2.0.0-SNAPSHOT.365
+ 2.0.0-SNAPSHOT.384
compile
- io.spine.validation
- spine-validation-java-runtime
- 2.0.0-SNAPSHOT.352
+ io.spine
+ spine-validation-jvm-runtime
+ 2.0.0-SNAPSHOT.383
compile
@@ -172,7 +172,7 @@ all modules and does not describe the project structure per-subproject.
com.google.protobuf
protoc
- 4.33.0
+ 4.33.2
com.puppycrawl.tools
@@ -192,22 +192,22 @@ all modules and does not describe the project structure per-subproject.
io.spine.tools
compiler-cli-all
- 2.0.0-SNAPSHOT.028
+ 2.0.0-SNAPSHOT.036
io.spine.tools
compiler-protoc-plugin
- 2.0.0-SNAPSHOT.028
+ 2.0.0-SNAPSHOT.036
io.spine.tools
core-jvm-gradle-plugins
- 2.0.0-SNAPSHOT.024
+ 2.0.0-SNAPSHOT.042
io.spine.tools
core-jvm-routing
- 2.0.0-SNAPSHOT.024
+ 2.0.0-SNAPSHOT.042
io.spine.tools
@@ -215,9 +215,9 @@ all modules and does not describe the project structure per-subproject.
2.0.0-SNAPSHOT.7
- io.spine.validation
- spine-validation-java-bundle
- 2.0.0-SNAPSHOT.352
+ io.spine.tools
+ validation-java-bundle
+ 2.0.0-SNAPSHOT.383
net.sourceforge.pmd
@@ -258,32 +258,32 @@ all modules and does not describe the project structure per-subproject.
org.jetbrains.dokka
all-modules-page-plugin
- 2.0.0
+ 2.1.0
org.jetbrains.dokka
- analysis-kotlin-descriptors
- 2.0.0
+ analysis-kotlin-symbols
+ 2.1.0
org.jetbrains.dokka
dokka-base
- 2.0.0
+ 2.1.0
org.jetbrains.dokka
dokka-core
- 2.0.0
+ 2.1.0
org.jetbrains.dokka
- kotlin-as-java-plugin
- 2.0.0
+ javadoc-plugin
+ 2.1.0
org.jetbrains.dokka
templating-plugin
- 2.0.0
+ 2.1.0
org.jetbrains.kotlin
diff --git a/version.gradle.kts b/version.gradle.kts
index d4c91d71..6c865f12 100644
--- a/version.gradle.kts
+++ b/version.gradle.kts
@@ -29,4 +29,4 @@
*
* For dependencies on Spine modules please see [io.spine.dependency.local.Spine].
*/
-val versionToPublish by extra("2.0.0-SNAPSHOT.212")
+val versionToPublish by extra("2.0.0-SNAPSHOT.220")