Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/documentation-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
## Avoid widows, runts, orphans, or rivers

Agents should **AVOID** text flow patters illustrated
on [this diagram](widow-runt-orphan-river.jpg).
on [this diagram](widow-runt-orphan.jpg).

[todo-comments]: https://github.com/SpineEventEngine/documentation/wiki/TODO-comments
8 changes: 6 additions & 2 deletions .agents/skills/writer/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
name: writer
description: Write, edit, and restructure user-facing and developer-facing documentation for the Spine `validation` repository. Use when asked to create/update docs such as `README.md`, `docs/**`, `CONTRIBUTING.md`, and other Markdown documentation; when drafting tutorials, guides, troubleshooting pages, or migration notes; and when improving inline API documentation (KDoc) and examples.
description: >
Write, edit, and restructure user-facing and developer-facing documentation.
Use when asked to create/update docs such as `README.md`, `docs/**`, and
other Markdown documentation;
when drafting tutorials, guides, troubleshooting pages, or migration notes; and
when improving inline API documentation (KDoc) and examples.
---

# Write documentation (repo-specific)
Expand All @@ -17,7 +22,6 @@ description: Write, edit, and restructure user-facing and developer-facing docum
- Place content in the most discoverable location:
- `README.md`: project entry point and “what is this?”.
- `docs/`: longer-form docs (follow existing conventions in that tree).
- `CONTRIBUTING.md`: contributor workflows.
- Source KDoc: API usage, examples, and semantics that belong with the code.

## Follow local documentation conventions
Expand Down
Binary file added .agents/widow-runt-orphan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ val kotlinEmbeddedVersion = "2.2.21"
* Always use the same version as the one specified in [io.spine.dependency.lib.Guava].
* Otherwise, when testing Gradle plugins, clashes may occur.
*/
val guavaVersion = "33.4.8-jre"
val guavaVersion = "33.5.0-jre"

/**
* The version of ErrorProne Gradle plugin.
Expand All @@ -103,7 +103,7 @@ val errorPronePluginVersion = "4.2.0"
* @see <a href="https://github.com/google/protobuf-gradle-plugin/releases">
* Protobuf Gradle Plugins Releases</a>
*/
val protobufPluginVersion = "0.9.5"
val protobufPluginVersion = "0.9.6"

/**
* The version of Dokka Gradle Plugins.
Expand Down
4 changes: 0 additions & 4 deletions buildSrc/src/main/kotlin/BuildSettings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,4 @@ object BuildSettings {
val javaVersionCompat = JavaVersion.toVersion(JVM_VERSION)
val jvmTarget = JvmTarget.JVM_17
const val REMOTE_DEBUG_PORT = 5566
/**
* Default timeout (in minutes) for long-running Gradle tasks in CI.
*/
const val TIMEOUT_MINUTES = 42L
}
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.lib
)
object Protobuf {
const val group = "com.google.protobuf"
const val version = "4.33.2"
const val version = "4.34.0"

/**
* The Java library with Protobuf data types.
Expand Down Expand Up @@ -64,7 +64,7 @@ object Protobuf {
*
* When changing the version, also change the version used in the `build.gradle.kts`.
*/
const val version = "0.9.5"
const val version = "0.9.6"
const val id = "com.google.protobuf"
const val lib = "$group:protobuf-gradle-plugin:$version"
}
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName", "unused")
object Base {
const val version = "2.0.0-SNAPSHOT.384"
const val versionForBuildScript = "2.0.0-SNAPSHOT.384"
const val version = "2.0.0-SNAPSHOT.385"
const val versionForBuildScript = "2.0.0-SNAPSHOT.385"
const val group = Spine.group
private const val prefix = "spine"
const val libModule = "$prefix-base"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object Change {
const val version = "2.0.0-SNAPSHOT.205"
const val version = "2.0.0-SNAPSHOT.206"
const val group = Spine.group
const val artifact = "spine-change"
const val lib = "$group:$artifact:$version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ object Compiler : Dependency() {
* The version of the Compiler dependencies.
*/
override val version: String
private const val fallbackVersion = "2.0.0-SNAPSHOT.039"
private const val fallbackVersion = "2.0.0-SNAPSHOT.040"

/**
* The distinct version of the Compiler used by other build tools.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ object CoreJvmCompiler {
/**
* The version used to in the build classpath.
*/
const val dogfoodingVersion = "2.0.0-SNAPSHOT.054"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.055"

/**
* The version to be used for integration tests.
*/
const val version = "2.0.0-SNAPSHOT.054"
const val version = "2.0.0-SNAPSHOT.055"

/**
* The ID of the Gradle plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object ModelCompiler {
const val version = "2.0.0-SNAPSHOT.133"
const val version = "2.0.0-SNAPSHOT.200"
const val group = Spine.toolsGroup
const val artifact = "spine-model-compiler"
const val lib = "$group:$artifact:$version"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object Time {
const val version = "2.0.0-SNAPSHOT.231"
const val version = "2.0.0-SNAPSHOT.232"
const val group = Spine.group
const val artifact = "spine-time"
const val lib = "$group:$artifact:$version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.373"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.373"
const val version = "2.0.0-SNAPSHOT.374"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.374"

const val lib = "$group:tool-base:$version"
const val classicCodegen = "$group:classic-codegen:$version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object Validation {
/**
* The version of the Validation library artifacts.
*/
const val version = "2.0.0-SNAPSHOT.400"
const val version = "2.0.0-SNAPSHOT.404"

/**
* The last version of Validation compatible with ProtoData.
Expand Down
12 changes: 4 additions & 8 deletions buildSrc/src/main/kotlin/io/spine/gradle/RunGradle.kt
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,13 @@ open class RunGradle : DefaultTask() {
return if (runsOnWindows) "gradlew.bat" else "gradlew"
}

private fun startProcess(command: List<String>, errorOut: File, debugOut: File): Process {
val workingDir = project.file(directory)
val builder = ProcessBuilder()
private fun startProcess(command: List<String>, errorOut: File, debugOut: File) =
ProcessBuilder()
.command(command)
.directory(workingDir)
.directory(project.file(directory))
.redirectError(errorOut)
.redirectOutput(debugOut)
System.err.println("[RunGradle] Running the command: '${command.joinToString(" ")}'." +
" Directory: '${workingDir.absolutePath}'.")
return builder.start()
}
.start()
}

private fun File.truncate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ package io.spine.gradle.kotlin

import org.gradle.jvm.toolchain.JavaLanguageVersion
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode

/**
* Sets [Java toolchain](https://kotlinlang.org/docs/gradle.html#gradle-java-toolchains-support)
Expand All @@ -53,10 +55,12 @@ fun KotlinJvmProjectExtension.applyJvmToolchain(version: String) =
*/
@Suppress("unused")
fun KotlinCommonCompilerOptions.setFreeCompilerArgs() {
if (this is KotlinJvmCompilerOptions) {
jvmDefault.set(JvmDefaultMode.NO_COMPATIBILITY)
}
freeCompilerArgs.addAll(
listOf(
"-Xskip-prerelease-check",
"-Xjvm-default=all",
"-Xinline-classes",
"-Xexpect-actual-classes",
"-Xcontext-parameters",
Expand Down
8 changes: 6 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +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\\.jetbrains.*")
includeGroupByRegex("org\\.jetbrains.*")
includeGroupByRegex("com\\.intellij.*")
}
}
Expand Down Expand Up @@ -129,6 +132,7 @@ fun RepositoryHandler.standardToSpineSdk() {
}

intellijReleases
jetBrainsCacheRedirector
intellijDependencies

maven {
Expand Down
21 changes: 11 additions & 10 deletions buildSrc/src/main/kotlin/io/spine/gradle/testing/Logging.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ package io.spine.gradle.testing

import org.gradle.api.tasks.testing.Test
import org.gradle.api.tasks.testing.TestDescriptor
import org.gradle.api.tasks.testing.TestListener
import org.gradle.api.tasks.testing.TestResult
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.kotlin.dsl.KotlinClosure2

/**
* Configures logging of this [Test] task.
Expand Down Expand Up @@ -70,19 +70,20 @@ fun Test.configureLogging() {
>> $skippedTestCount skipped
"""

afterSuite(

// `GroovyInteroperability` is employed as `afterSuite()` has no equivalent in Kotlin DSL.
// See issue: https://github.com/gradle/gradle/issues/5431

KotlinClosure2<TestDescriptor, TestResult, Unit>({ descriptor, result ->
val listener = object : TestListener {

override fun afterSuite(descriptor: TestDescriptor, result: TestResult) {
// If the descriptor has no parent, then it is the root test suite,
// i.e. it includes the info about all the run tests.

if (descriptor.parent == null) {
logger.lifecycle(result.summary())
}
})
)
}

override fun beforeSuite(suite: TestDescriptor?) = Unit
override fun beforeTest(testDescriptor: TestDescriptor?) = Unit
override fun afterTest(testDescriptor: TestDescriptor?, result: TestResult?) = Unit
}

addTestListener(listener)
}
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ fun Module.forceConfigurations() {
JUnit.bom,
Kotlin.bom,
Kotlin.Compiler.embeddable,
Kotlin.scriptRuntime,
Reflect.lib,
Base.annotations,
Base.lib,
Base.environment,
Protobuf.compiler,
Time.lib,
TestLib.lib,
Expand Down
Loading
Loading