diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c9182a966..7de0c5101 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/buildSrc/src/main/kotlin/BuildExtensions.kt b/buildSrc/src/main/kotlin/BuildExtensions.kt index 4122975f6..f7a11e3e0 100644 --- a/buildSrc/src/main/kotlin/BuildExtensions.kt +++ b/buildSrc/src/main/kotlin/BuildExtensions.kt @@ -227,6 +227,8 @@ fun Project.configureTaskDependencies() { "compileTestFixturesKotlin".dependOn("kspTestFixturesKotlin") "javadocJar".dependOn(dokkaGeneratePublicationJavadoc) "htmlDocsJar".dependOn(dokkaGenerate) + + "kspTestKotlin".dependOn("launchTestSpineCompiler") } } 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 8328e403b..27147386e 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.222" + const val version = "2.0.0-SNAPSHOT.223" 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/Change.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Change.kt index dbde19350..7809c9cd6 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Change.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Change.kt @@ -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" 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 2b06d3799..febf8ae9b 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt @@ -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.036" + private const val fallbackVersion = "2.0.0-SNAPSHOT.037" /** * The distinct version of the Compiler used by other build tools. @@ -81,7 +81,7 @@ object Compiler : Dependency() { * transitive dependencies, this is the version used to build the project itself. */ val dogfoodingVersion: String - private const val fallbackDfVersion = "2.0.0-SNAPSHOT.036" + private const val fallbackDfVersion = "2.0.0-SNAPSHOT.037" /** * The artifact for the Compiler Gradle plugin. 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 a6a93f0ba..49df6fbe1 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt @@ -39,7 +39,7 @@ typealias CoreJava = CoreJvm @Suppress("ConstPropertyName", "unused") object CoreJvm { const val group = Spine.group - const val version = "2.0.0-SNAPSHOT.370" + const val version = "2.0.0-SNAPSHOT.371" 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 2e99c5f69..2737c39cf 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.042" + const val dogfoodingVersion = "2.0.0-SNAPSHOT.050" /** * The version to be used for integration tests. */ - const val version = "2.0.0-SNAPSHOT.042" + const val version = "2.0.0-SNAPSHOT.050" /** * The ID of the Gradle plugin. 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 899c48f84..3de642eb4 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt @@ -33,7 +33,7 @@ package io.spine.dependency.local */ @Suppress("ConstPropertyName") object Time { - const val version = "2.0.0-SNAPSHOT.230" + const val version = "2.0.0-SNAPSHOT.231" const val group = Spine.group const val artifact = "spine-time" const val lib = "$group:$artifact:$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 11e386bd6..7cf8dd686 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt @@ -36,7 +36,7 @@ object Validation { /** * The version of the Validation library artifacts. */ - const val version = "2.0.0-SNAPSHOT.383" + const val version = "2.0.0-SNAPSHOT.391" /** * The last version of Validation compatible with ProtoData. @@ -53,6 +53,9 @@ object Validation { 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 javaModule = "$group:$prefix-java" const val java = "$javaModule:$version" const val javaBundleModule = "$group:$prefix-java-bundle" diff --git a/config b/config index 9a4fbe2bc..dcd2cee3a 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 9a4fbe2bcae9a7b5f0d20159d41a8756d236e146 +Subproject commit dcd2cee3af82ce8e4de407801636637f7cdcef3c diff --git a/dependencies.md b/dependencies.md index 7bcbf4c9e..33b4d0c4c 100644 --- a/dependencies.md +++ b/dependencies.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine.tools:compiler-api:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-api:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -1131,14 +1131,14 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-api-tests:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-api-tests:2.0.0-SNAPSHOT.038` ## Runtime ## Compile, tests, and tooling @@ -1504,14 +1504,14 @@ This report was generated on **Tue Dec 23 18:46:21 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:20 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-backend:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-backend:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -2646,14 +2646,14 @@ This report was generated on **Tue Dec 23 18:46:20 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-cli:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-cli:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -3837,14 +3837,14 @@ This report was generated on **Tue Dec 23 18:46:21 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-gradle-api:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-gradle-api:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -4909,14 +4909,14 @@ This report was generated on **Tue Dec 23 18:46:21 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-gradle-plugin:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-gradle-plugin:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -6029,14 +6029,14 @@ This report was generated on **Tue Dec 23 18:46:21 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-jvm:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-jvm:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -7188,14 +7188,14 @@ This report was generated on **Tue Dec 23 18:46:21 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-params:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-params:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -8318,14 +8318,14 @@ This report was generated on **Tue Dec 23 18:46:21 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-protoc-plugin:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-protoc-plugin:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -9186,14 +9186,14 @@ This report was generated on **Tue Dec 23 18:46:21 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-test-env:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-test-env:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -10324,14 +10324,14 @@ This report was generated on **Tue Dec 23 18:46:21 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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). -# Dependencies of `io.spine.tools:compiler-testlib:2.0.0-SNAPSHOT.037` +# Dependencies of `io.spine.tools:compiler-testlib:2.0.0-SNAPSHOT.038` ## Runtime 1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0. @@ -11569,6 +11569,6 @@ This report was generated on **Tue Dec 23 18:46:21 WET 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Dec 23 18:46:21 WET 2025** using +This report was generated on **Fri Dec 26 19:14:08 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-plugin/src/main/kotlin/io/spine/tools/compiler/gradle/plugin/KspTaskName.kt b/gradle-plugin/src/main/kotlin/io/spine/tools/compiler/gradle/plugin/KspTaskName.kt new file mode 100644 index 000000000..9fbc70131 --- /dev/null +++ b/gradle-plugin/src/main/kotlin/io/spine/tools/compiler/gradle/plugin/KspTaskName.kt @@ -0,0 +1,46 @@ +/* + * 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.tools.compiler.gradle.plugin + +import io.spine.tools.code.SourceSetName +import io.spine.tools.gradle.task.TaskWithSourceSetName +import org.gradle.api.tasks.SourceSet + +/** + * The name of the Kotlin Symbol Processing task, such as `compileKotlin` or `compileTestKotlin`. + */ +internal class KspTaskName(ssn: SourceSetName) : + TaskWithSourceSetName("compile${ssn.toInfix()}Kotlin", ssn) { + + companion object { + + /** + * Obtains the task name for the given source set. + */ + fun of(ss: SourceSet) = KspTaskName(SourceSetName(ss.name)) + } +} diff --git a/gradle-plugin/src/main/kotlin/io/spine/tools/compiler/gradle/plugin/LaunchSpineCompiler.kt b/gradle-plugin/src/main/kotlin/io/spine/tools/compiler/gradle/plugin/LaunchSpineCompiler.kt index ee40bebea..4dcd126cb 100644 --- a/gradle-plugin/src/main/kotlin/io/spine/tools/compiler/gradle/plugin/LaunchSpineCompiler.kt +++ b/gradle-plugin/src/main/kotlin/io/spine/tools/compiler/gradle/plugin/LaunchSpineCompiler.kt @@ -212,6 +212,9 @@ private fun LaunchSpineCompiler.setDependencies(sourceSet: SourceSet) { val launchTask = this project.findJavaCompileFor(sourceSet)?.dependsOn(launchTask) project.findKotlinCompileFor(sourceSet)?.dependsOn(launchTask) + + val kspTask = KspTaskName.of(sourceSet) + project.tasks.findByName(kspTask.value())?.dependsOn(launchTask) } /** diff --git a/pom.xml b/pom.xml index 1cb10151e..d522f3185 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine.tools spine-compiler -2.0.0-SNAPSHOT.037 +2.0.0-SNAPSHOT.038 2015 @@ -134,13 +134,13 @@ all modules and does not describe the project structure per-subproject. io.spine spine-server - 2.0.0-SNAPSHOT.370 + 2.0.0-SNAPSHOT.371 compile io.spine spine-validation-jvm-runtime - 2.0.0-SNAPSHOT.383 + 2.0.0-SNAPSHOT.391 compile @@ -236,7 +236,7 @@ all modules and does not describe the project structure per-subproject. io.spine spine-time-java - 2.0.0-SNAPSHOT.230 + 2.0.0-SNAPSHOT.231 test @@ -254,7 +254,7 @@ all modules and does not describe the project structure per-subproject. io.spine.tools spine-server-testlib - 2.0.0-SNAPSHOT.370 + 2.0.0-SNAPSHOT.371 test @@ -266,7 +266,7 @@ all modules and does not describe the project structure per-subproject. io.spine.tools spine-time-testlib - 2.0.0-SNAPSHOT.230 + 2.0.0-SNAPSHOT.231 test @@ -350,22 +350,22 @@ all modules and does not describe the project structure per-subproject. io.spine.tools compiler-cli-all - 2.0.0-SNAPSHOT.036 + 2.0.0-SNAPSHOT.037 io.spine.tools compiler-protoc-plugin - 2.0.0-SNAPSHOT.036 + 2.0.0-SNAPSHOT.037 io.spine.tools core-jvm-gradle-plugins - 2.0.0-SNAPSHOT.042 + 2.0.0-SNAPSHOT.050 io.spine.tools core-jvm-routing - 2.0.0-SNAPSHOT.042 + 2.0.0-SNAPSHOT.050 io.spine.tools @@ -380,7 +380,7 @@ all modules and does not describe the project structure per-subproject. io.spine.tools validation-java-bundle - 2.0.0-SNAPSHOT.383 + 2.0.0-SNAPSHOT.391 org.jacoco diff --git a/version.gradle.kts b/version.gradle.kts index 0a71a4beb..533235a94 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -30,7 +30,7 @@ * This version is also used by integration test projects. * E.g. see `tests/consumer/build.gradle.kts`. */ -val compilerVersion: String by extra("2.0.0-SNAPSHOT.037") +val compilerVersion: String by extra("2.0.0-SNAPSHOT.038") /** * The version, same as [compilerVersion], which is used for publishing