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
6 changes: 3 additions & 3 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 @@ -75,7 +75,7 @@ val grGitVersion = "4.1.1"
* This version may change from the [version of Kotlin][io.spine.dependency.lib.Kotlin.version]
* used by the project.
*/
val kotlinEmbeddedVersion = "2.2.20"
val kotlinEmbeddedVersion = "2.2.21"

/**
* The version of Guava used in `buildSrc`.
Expand Down Expand Up @@ -130,7 +130,7 @@ val kotestJvmPluginVersion = "0.4.10"
/**
* @see [io.spine.dependency.test.Kotest.MultiplatformGradlePlugin]
*/
val kotestMultiplatformPluginVersion = "5.9.1"
val kotestMultiplatformPluginVersion = "6.0.0.M4"

/**
* @see [io.spine.dependency.test.Kover]
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/BuildExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ 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
14 changes: 10 additions & 4 deletions buildSrc/src/main/kotlin/io/spine/dependency/Dependency.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,17 @@ abstract class Dependency {
}

/**
* 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"
}
}

/**
* Forces all artifacts of this dependency using the given resolution strategy.
Expand Down
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ import io.spine.dependency.Dependency
*/
@Suppress("unused")
object Ksp : Dependency() {
override val version = "2.2.20-2.0.4"
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
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/lib/Kotlin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object Kotlin : DependencyWithBom() {
* depend on Gradle and the version of embedded Kotlin.
*/
@Suppress("MemberVisibilityCanBePrivate") // used directly from the outside.
const val runtimeVersion = "2.2.20"
const val runtimeVersion = "2.2.21"

override val version = runtimeVersion
override val group = "org.jetbrains.kotlin"
Expand All @@ -49,7 +49,7 @@ object Kotlin : DependencyWithBom() {
* This is the version of
* [Kotlin embedded into Gradle](https://docs.gradle.org/current/userguide/compatibility.html#kotlin).
*/
const val embeddedVersion = "2.2.20"
const val embeddedVersion = "2.2.21"

/**
* The version of the JetBrains annotations library, which is a transitive
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@

package io.spine.dependency.local

import io.spine.dependency.local.CoreJvmCompiler.dogfoodingVersion
import io.spine.dependency.local.CoreJvmCompiler.version


/**
* Dependencies on the CoreJvm Compiler artifacts.
*
Expand All @@ -50,12 +46,12 @@ object CoreJvmCompiler {
/**
* The version used to in the build classpath.
*/
const val dogfoodingVersion = "2.0.0-SNAPSHOT.017"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.024"

/**
* The version to be used for integration tests.
*/
const val version = "2.0.0-SNAPSHOT.017"
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
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.366"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.361"
const val version = "2.0.0-SNAPSHOT.369"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.369"

const val lib = "$group:tool-base:$version"
const val classicCodegen = "$group:classic-codegen:$version"
Expand All @@ -54,7 +54,7 @@ object ToolBase {
const val gradlePluginApiTestFixtures = "$group:gradle-plugin-api-test-fixtures:$version"

const val jvmTools = "$group:jvm-tools:$version"
const val jvmToolPluginDogfooding = "$group:jvm-tool-all-plugins:$dogfoodingVersion"
const val jvmToolPluginDogfooding = "$group:jvm-tool-plugins-all:$dogfoodingVersion"
const val jvmToolPlugins = "$group:jvm-tool-plugins-all:$version"

const val protobufSetupPlugins = "$group:protobuf-setup-plugins:$version"
Expand Down
149 changes: 0 additions & 149 deletions buildSrc/src/main/kotlin/io/spine/gradle/VersionWriter.kt

This file was deleted.

31 changes: 31 additions & 0 deletions buildSrc/src/main/kotlin/module.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* 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.
*/

// This is a template file for an actual script which should be
// defined by a project to which `config` is applied.
//
// The reason for having this file is that it is referenced as
// a plugin in `uber-jar-module.gradle.kts`
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/uber-jar-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import io.spine.gradle.publish.spinePublishing
import io.spine.gradle.report.license.LicenseReporter

plugins {
`java-library`
id("module")
`maven-publish`
id("com.gradleup.shadow")
id("write-manifest")
Expand Down
21 changes: 21 additions & 0 deletions migrate
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ cp -a .github-workflows/. ../.github/workflows
cp -a .github/workflows/. ../.github/workflows
rm -f ../.github/workflows/detekt-code-analysis.yml # This one is `config`-only workflow.

# 2025-10-27 Remove `VersionWriter.kt` and `ProtoTaskExtensions.kt`
rm -f ../buildSrc/src/main/kotlin/io/spine/gradle/VersionWriter.kt
rm -f ../buildSrc/src/main/kotlin/io/spine/gradle/protobuf/ProtoTaskExtensions.kt

# 2025-10-01 Remove renamed `CoreJava.kt`
rm -f ../buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJava.kt

Expand Down Expand Up @@ -88,8 +92,25 @@ rm -f ../.lift.toml
rm -f ../license-report.md

echo "Updating Gradle \\\`buildSrc\\\`"

# Preserve an existing project's `module.gradle.kts` (do not overwrite it).
DEST_MODULE="../buildSrc/src/main/kotlin/module.gradle.kts"
PRESERVE_TMP=""
if [ -f "$DEST_MODULE" ]; then
echo "Preserving existing \\\`module.gradle.kts\\\`"
PRESERVE_TMP=$(mktemp)
cp -a "$DEST_MODULE" "$PRESERVE_TMP"
fi

cp -R buildSrc ..

# Restore preserved `module.gradle.kts`, if any.
if [ -n "$PRESERVE_TMP" ] && [ -f "$PRESERVE_TMP" ]; then
echo "Restoring existing \\\`module.gradle.kts\\\`"
cp -a "$PRESERVE_TMP" "$DEST_MODULE"
rm -f "$PRESERVE_TMP"
fi

echo "Updating Gradle Wrapper"
cp -R ./gradle ..
cp gradlew ..
Expand Down