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
14 changes: 1 addition & 13 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ plugins {
`kotlin-dsl`

// https://github.com/jk1/Gradle-License-Report/releases
id("com.github.jk1.dependency-license-report").version("2.7")
id("com.github.jk1.dependency-license-report").version("2.9")
}

repositories {
Expand Down Expand Up @@ -122,16 +122,6 @@ val dokkaVersion = "2.0.0"
*/
val detektVersion = "1.23.8"

/**
* @see [io.spine.dependency.test.Kotest]
*/
val kotestJvmPluginVersion = "0.4.10"

/**
* @see [io.spine.dependency.test.Kotest.MultiplatformGradlePlugin]
*/
val kotestMultiplatformPluginVersion = "5.9.1"

/**
* @see [io.spine.dependency.test.Kover]
*/
Expand Down Expand Up @@ -184,8 +174,6 @@ dependencies {
"com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion",
"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",
Expand Down
8 changes: 5 additions & 3 deletions buildSrc/src/main/kotlin/BuildExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ import io.spine.dependency.test.Kover
import io.spine.gradle.repo.standardToSpineSdk
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.file.DuplicatesStrategy
import org.gradle.api.tasks.JavaExec
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.ScriptHandlerScope
import org.gradle.plugin.use.PluginDependenciesSpec
import org.gradle.plugin.use.PluginDependencySpec
Expand Down Expand Up @@ -154,15 +156,15 @@ val PluginDependenciesSpec.`gradle-doctor`: PluginDependencySpec
get() = id(GradleDoctor.pluginId).version(GradleDoctor.version)

val PluginDependenciesSpec.kotest: PluginDependencySpec
get() = Kotest.MultiplatformGradlePlugin.let {
return id(it.id).version(it.version)
get() = Kotest.let {
return id(it.gradlePluginId).version(it.version)
}

val PluginDependenciesSpec.kover: PluginDependencySpec
get() = id(Kover.id).version(Kover.version)

val PluginDependenciesSpec.ksp: PluginDependencySpec
get() = id(Ksp.id).version(Ksp.version)
get() = id(Ksp.id).version(Ksp.dogfoodingVersion)

val PluginDependenciesSpec.`plugin-publish`: PluginDependencySpec
get() = id(PluginPublishPlugin.id).version(PluginPublishPlugin.version)
Expand Down
53 changes: 0 additions & 53 deletions buildSrc/src/main/kotlin/compile-protobuf.gradle.kts

This file was deleted.

16 changes: 11 additions & 5 deletions buildSrc/src/main/kotlin/io/spine/dependency/Dependency.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,22 @@ abstract class Dependency {
/**
* The [modules] given with the [version].
*/
final val artifacts: Map<String, String> by lazy {
val artifacts: Map<String, String> by lazy {
modules.associateWith { "$it:$version" }
}

/**
* Obtains full Maven coordinates for the requested [module].
* Obtains full Maven coordinates for the requested [module] and [version].
*/
fun artifact(module: String): String = artifacts[module] ?: error(
"The dependency `${this::class.simpleName}` does not declare a module `$module`."
)
fun artifact(module: String, version: String = ""): String {
return if (version.isEmpty()) {
artifacts[module] ?: error(
"The dependency `${this::class.simpleName}` does not declare a module `$module`."
)
} else {
"$module:$version"
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function now accepts an optional version parameter but doesn't validate the module parameter when a custom version is provided. When version is non-empty, it should still verify that the module is valid before constructing the artifact string. Consider: artifacts.containsKey(module) || error(...) before line 74.

Suggested change
"$module:$version"
if (!artifacts.containsKey(module)) {
error("The dependency `${this::class.simpleName}` does not declare a module `$module`.")
}
"$module:$version"

Copilot uses AI. Check for mistakes.
}
}

/**
* Forces all artifacts of this dependency using the given resolution strategy.
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import io.spine.dependency.Dependency
@Suppress("unused")
object Ksp : Dependency() {
override val version = "2.3.0"
val dogfoodingVersion = version
override val group = "com.google.devtools.ksp"

const val id = "com.google.devtools.ksp"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import io.spine.dependency.DependencyWithBom
@Suppress("unused")
object Grpc : DependencyWithBom() {

override val version = "1.72.0"
override val version = "1.76.0"
override val group = "io.grpc"
override val bom = "$group:grpc-bom:$version"

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/lib/Guava.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ package io.spine.dependency.lib
*/
@Suppress("unused", "ConstPropertyName")
object Guava {
private const val version = "33.4.8-jre"
private const val version = "33.5.0-jre"
const val group = "com.google.guava"
const val lib = "$group:guava:$version"
const val testLib = "$group:guava-testlib:$version"
Expand Down
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.31.1"
const val version = "4.33.0"

/**
* The Java library with Protobuf data types.
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.364"
const val versionForBuildScript = "2.0.0-SNAPSHOT.364"
const val version = "2.0.0-SNAPSHOT.366"
const val versionForBuildScript = "2.0.0-SNAPSHOT.366"
const val group = Spine.group
const val artifact = "spine-base"
const val lib = "$group:$artifact:$version"
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 BaseTypes {
const val version = "2.0.0-SNAPSHOT.210"
const val version = "2.0.0-SNAPSHOT.211"
const val group = Spine.group
const val artifact = "spine-base-types"
const val lib = "$group:$artifact:$version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ object Compiler {
* The version of ProtoData dependencies.
*/
val version: String
private const val fallbackVersion = "2.0.0-SNAPSHOT.025"
private const val fallbackVersion = "2.0.0-SNAPSHOT.029"

/**
* The distinct version of ProtoData used by other build tools.
Expand All @@ -79,7 +79,7 @@ object Compiler {
* transitional dependencies, this is the version used to build the project itself.
*/
val dogfoodingVersion: String
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.025"
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.029"

/**
* The artifact for the ProtoData Gradle plugin.
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ typealias CoreJava = CoreJvm
/**
* Dependencies on `core-java` modules.
*
* See [`SpineEventEngine/core-java`](https://github.com/SpineEventEngine/core-java/).
* See [`SpineEventEngine/core-java`](https://github.com/SpineEventEngine/core-jvm/).
*/
@Suppress("ConstPropertyName", "unused")
object CoreJvm {
const val group = Spine.group
const val version = "2.0.0-SNAPSHOT.332"
const val version = "2.0.0-SNAPSHOT.334"

const val coreArtifact = "spine-core"
const val clientArtifact = "spine-client"
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.021"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.024"

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

/**
* The ID of the Gradle plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ package io.spine.dependency.local
)
object ProtoTap {
const val group = "io.spine.tools"
const val version = "0.13.0"
const val version = "0.14.0"
const val gradlePluginId = "io.spine.prototap"
const val api = "$group:prototap-api:$version"
const val gradlePlugin = "$group:prototap-gradle-plugin:$version"
Expand Down
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object Time {
const val version = "2.0.0-SNAPSHOT.203"
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"
}
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.368"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.368"
const val version = "2.0.0-SNAPSHOT.370"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.370"

const val lib = "$group:tool-base:$version"
const val classicCodegen = "$group:classic-codegen:$version"
Expand All @@ -49,7 +49,7 @@ object ToolBase {
const val psiJavaArtifactName = "psi-java"
const val psiJava = "$group:$psiJavaArtifactName:$version"

const val gradleRootPlugin = "$group:gradle-root-plugin:$version"
const val rootGradlePlugins = "$group:root-gradle-plugins:$version"
const val gradlePluginApi = "$group:gradle-plugin-api:$version"
const val gradlePluginApiTestFixtures = "$group:gradle-plugin-api-test-fixtures:$version"

Expand Down
22 changes: 3 additions & 19 deletions buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ package io.spine.dependency.test
import io.spine.dependency.Dependency
import io.spine.dependency.DependencyWithBom

// https://junit.org/junit5/
// https://junit.org/
@Suppress("unused", "ConstPropertyName")
object JUnit : DependencyWithBom() {

override val version = "5.13.2"
override val version = "6.0.0"
override val group: String = "org.junit"

/**
Expand Down Expand Up @@ -63,19 +63,6 @@ object JUnit : DependencyWithBom() {

const val legacy = "junit:junit:$legacyVersion"

@Deprecated("Use JUnit.Jupiter.api instead", ReplaceWith("JUnit.Jupiter.api"))
val api = listOf(
"org.apiguardian:apiguardian-api:$apiGuardianVersion",
"org.junit.jupiter:junit-jupiter-api:$version",
"org.junit.jupiter:junit-jupiter-params:$version"
)

@Deprecated("Use JUnit.Jupiter.engine instead", ReplaceWith("JUnit.Jupiter.engine"))
val runner = "org.junit.jupiter:junit-jupiter-engine:$version"

@Deprecated("Use JUnit.Jupiter.params instead", ReplaceWith("JUnit.Jupiter.params"))
val params = "org.junit.jupiter:junit-jupiter-params:$version"

object Jupiter : Dependency() {
override val version = JUnit.version
override val group = "org.junit.jupiter"
Expand All @@ -86,9 +73,6 @@ object JUnit : DependencyWithBom() {
val params = "$group:$infix-params"
val engine = "$group:$infix-engine"

@Deprecated("Please use `[Jupiter.run { artifacts[api] }` instead.")
val apiArtifact = "$api:$version"

override val modules = listOf(api, params, engine)
}

Expand All @@ -105,7 +89,7 @@ object JUnit : DependencyWithBom() {
* So when we use JUnit as a platform, this property should be picked up
* for the dependencies automatically.
*/
override val version: String = "1.13.2"
override val version: String = "6.0.0"
override val group = "org.junit.platform"

private const val infix = "junit-platform"
Expand Down
4 changes: 3 additions & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ package io.spine.dependency.test
*/
@Suppress("unused", "ConstPropertyName")
object Kotest {
const val version = "6.0.3"
const val version = "6.0.4"
const val group = "io.kotest"
const val gradlePluginId = "io.kotest"
const val assertions = "$group:kotest-assertions-core:$version"
const val runnerJUnit5 = "$group:kotest-runner-junit5:$version"
const val runnerJUnit5Jvm = "$group:kotest-runner-junit5-jvm:$version"
Expand All @@ -45,6 +46,7 @@ object Kotest {
const val frameworkEngine = "$group:kotest-framework-engine:$version"

// https://plugins.gradle.org/plugin/io.kotest.multiplatform
@Deprecated("The plugin is deprecated. Use `io.kotest` plugin instead.")
object MultiplatformGradlePlugin {
const val version = "6.0.0.M4"
const val id = "io.kotest.multiplatform"
Expand Down
Loading
Loading