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
4 changes: 2 additions & 2 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import io.spine.dependency.lib.Aedile
import io.spine.dependency.lib.Jackson
import io.spine.dependency.local.Base
import io.spine.dependency.local.CoreJava
import io.spine.dependency.local.CoreJvm
import io.spine.dependency.local.Logging
import io.spine.dependency.local.Reflect
import io.spine.dependency.local.ToolBase
Expand All @@ -43,7 +43,7 @@ dependencies {
listOf(
Base.lib,
Base.format,
CoreJava.server,
CoreJvm.server,
ToolBase.lib,
ToolBase.psiJava
).forEach {
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/kotlin/io/spine/tools/compiler/plugin/View.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import io.spine.server.projection.ProjectionRepository
import io.spine.server.projection.model.ProjectionClass
import io.spine.server.route.EventRoute
import io.spine.server.route.EventRouting
import io.spine.validate.ValidatingBuilder
import io.spine.validation.ValidatingBuilder
import kotlin.reflect.KClass

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import io.spine.tools.compiler.ast.FilePatternFactory.infix
import io.spine.tools.compiler.ast.FilePatternFactory.prefix
import io.spine.tools.compiler.ast.FilePatternFactory.regex
import io.spine.tools.compiler.ast.FilePatternFactory.suffix
import io.spine.validate.ValidationError
import io.spine.validation.ValidationError
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Nested
import org.junit.jupiter.api.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

package io.spine.tools.compiler.ast

import io.spine.validate.ValidationException
import io.spine.validation.ValidationException
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertDoesNotThrow
Expand Down
4 changes: 2 additions & 2 deletions backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import io.spine.dependency.lib.AutoService
import io.spine.dependency.lib.Jackson
import io.spine.dependency.lib.Jackson.DataFormat
import io.spine.dependency.local.Base
import io.spine.dependency.local.CoreJava
import io.spine.dependency.local.CoreJvm
import io.spine.dependency.local.ToolBase
import io.spine.dependency.test.JUnit
import io.spine.gradle.publish.CheckVersionIncrement
Expand All @@ -44,7 +44,7 @@ plugins {

dependencies {
api(AutoService.annotations)
api(CoreJava.server)
api(CoreJvm.server)
api(ToolBase.lib)
api(project(":api"))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import io.spine.tools.compiler.render.SourceFileSet
import io.spine.tools.compiler.settings.SettingsDirectory
import io.spine.tools.compiler.type.TypeSystem
import io.spine.type.parse
import io.spine.validate.NonValidated
import io.spine.validation.NonValidated
import kotlin.io.path.Path
import kotlin.io.path.exists
import kotlin.io.path.inputStream
Expand Down Expand Up @@ -84,7 +84,7 @@ import kotlin.io.path.inputStream
* the `PipelineParameters` message type. This is to allow tests to pass only some of
* the parameters if plugins under the test do not need them all.
* The production mode of the execution requires a `@Validated` instance of `PipelineParameters`.
* @param plugins The code generation plugins to be applied to the pipeline in addition to
* @param additionalPlugins The code generation plugins to be applied to the pipeline in addition to
* those specified via [params][PipelineParameters.getPluginClassNameList].
* @property descriptorFilter The predicate to accept descriptors during parsing of the [request].
* The default value accepts all the descriptors.
Expand All @@ -95,7 +95,7 @@ import kotlin.io.path.inputStream
public class Pipeline(
public val id: String = generateId(),
public val params: @NonValidated PipelineParameters,
@VisibleForTesting plugins: List<Plugin> = emptyList(),
@VisibleForTesting additionalPlugins: List<Plugin> = emptyList(),
private val descriptorFilter: DescriptorFilter = { true }
) : WithLogging {

Expand Down Expand Up @@ -126,7 +126,7 @@ public class Pipeline(
}

/**
* The directory to which setting files for the [plugins] should be stored.
* The directory to which setting files for the [additionalPlugins] should be stored.
*/
public val settings: SettingsDirectory by lazy {
val dir = params.settings.toPath()
Expand All @@ -141,7 +141,7 @@ public class Pipeline(
* the constructor parameter.
*/
public val plugins: List<Plugin> by lazy {
val combined = loadPlugins(params.pluginClassNameList) + plugins
val combined = loadPlugins(params.pluginClassNameList) + additionalPlugins
combined
}

Expand Down Expand Up @@ -279,7 +279,7 @@ public class Pipeline(
}

/**
* Assembles the `Code Generation` context by applying given [plugins].
* Assembles the `Code Generation` context by applying given [additionalPlugins].
*/
private fun assembleCodegenContext(): CodegenContext =
CodeGenerationContext(id, typeSystem) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ internal class PipelineSpec {
fun `render enhanced code`() {
Pipeline(
params = params,
plugins = listOf(TestPlugin(), RenderingTestbed(renderer)),
additionalPlugins = listOf(TestPlugin(), RenderingTestbed(renderer)),
)()
assertTextIn(targetFile).isEqualTo("_Journey worth taking")
}
Expand All @@ -163,7 +163,7 @@ internal class PipelineSpec {
fun `generate new files`() {
Pipeline(
params = params,
plugins = listOf(TestPlugin(), RenderingTestbed(InternalAccessRenderer())),
additionalPlugins = listOf(TestPlugin(), RenderingTestbed(InternalAccessRenderer())),
)()
val newClass = targetRoot.resolve("$SRC_DIR_NO_IO/JourneyInternal.java")
assertExists(newClass)
Expand All @@ -176,7 +176,7 @@ internal class PipelineSpec {
write(path, "foo bar")
Pipeline(
params = params,
plugins = listOf(TestPlugin(), RenderingTestbed(DeletingRenderer()))
additionalPlugins = listOf(TestPlugin(), RenderingTestbed(DeletingRenderer()))
)()
assertDoesNotExist(targetRoot / path)
}
Expand Down Expand Up @@ -229,7 +229,7 @@ internal class PipelineSpec {
""".trimIndent())
Pipeline(
params = params,
plugins = listOf(RenderingTestbed(
additionalPlugins = listOf(RenderingTestbed(
renderers = listOf(
AnnotationInsertionPointPrinter(),
NullableAnnotationRenderer()
Expand Down Expand Up @@ -318,7 +318,7 @@ internal class PipelineSpec {
}
Pipeline(
params = local,
plugins = listOf(TestPlugin(), RenderingTestbed(InternalAccessRenderer())),
additionalPlugins = listOf(TestPlugin(), RenderingTestbed(InternalAccessRenderer())),
)()

val path = "$SRC_DIR_NO_IO/JourneyInternal.java"
Expand All @@ -335,7 +335,7 @@ internal class PipelineSpec {
fun `copy all sources into the new destination`() {
Pipeline(
params = params,
plugins = listOf(TestPlugin(), RenderingTestbed(NoOpRenderer())),
additionalPlugins = listOf(TestPlugin(), RenderingTestbed(NoOpRenderer())),
)()
assertExists(targetFile)
}
Expand Down Expand Up @@ -363,7 +363,7 @@ internal class PipelineSpec {

Pipeline(
params = local,
plugins = listOf(
additionalPlugins = listOf(
TestPlugin(),
RenderingTestbed(NoOpRenderer())
)
Expand Down Expand Up @@ -403,7 +403,7 @@ internal class PipelineSpec {

Pipeline(
params = params,
plugins = listOf(
additionalPlugins = listOf(
TestPlugin(),
RenderingTestbed(PlainStringRenderer())
),
Expand Down Expand Up @@ -436,7 +436,7 @@ internal class PipelineSpec {
}
Pipeline(
params = local,
plugins = listOf(
additionalPlugins = listOf(
TestPlugin(),
RenderingTestbed(listOf(
JavaGenericInsertionPointPrinter(),
Expand All @@ -461,7 +461,7 @@ internal class PipelineSpec {
val viewClass = DeletedTypeView::class.java
val pipeline = Pipeline(
params = params,
plugins = listOf(
additionalPlugins = listOf(
DocilePlugin(
views = setOf(viewClass),
viewRepositories = setOf(DeletedTypeRepository())
Expand All @@ -478,7 +478,7 @@ internal class PipelineSpec {
fun `expose 'codegenContext' property for testing purposes`() {
val pipeline = Pipeline(
params = params,
plugins = listOf(TestPlugin(), RenderingTestbed(renderer)),
additionalPlugins = listOf(TestPlugin(), RenderingTestbed(renderer)),
)
var codegenContext: CodegenContext? = null
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class InsertionPointsSpec {
params = pipelineParams {
withRoots(input, output)
},
plugins = listOf(RenderingTestbed(
additionalPlugins = listOf(RenderingTestbed(
renderers = listOf(
VariousKtInsertionPointsPrinter(),
CatOutOfTheBoxEmancipator(),
Expand Down
7 changes: 5 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@

import io.spine.dependency.lib.Grpc
import io.spine.dependency.local.Base
import io.spine.dependency.local.CoreJava
import io.spine.dependency.local.CoreJvm
import io.spine.dependency.local.Reflect
import io.spine.dependency.local.TestLib
import io.spine.dependency.local.Validation
import io.spine.gradle.RunBuild
import io.spine.gradle.publish.PublishingRepos
import io.spine.gradle.publish.SpinePublishing
Expand Down Expand Up @@ -108,7 +109,9 @@ allprojects {
Reflect.lib,
Base.lib,
TestLib.lib,
CoreJava.server
CoreJvm.server,
Validation.runtime,
Validation.javaBundle
)
}
}
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.33.1"
const val version = "4.33.2"

/**
* 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.383"
const val versionForBuildScript = "2.0.0-SNAPSHOT.383"
const val version = "2.0.0-SNAPSHOT.384"
const val versionForBuildScript = "2.0.0-SNAPSHOT.384"
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 BaseTypes {
const val version = "2.0.0-SNAPSHOT.212"
const val version = "2.0.0-SNAPSHOT.222"
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 @@ -33,7 +33,7 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object Change {
const val version = "2.0.0-SNAPSHOT.200"
const val version = "2.0.0-SNAPSHOT.205"
const val group = Spine.group
const val artifact = "spine-change"
const val lib = "$group:$artifact:$version"
Expand Down
27 changes: 22 additions & 5 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

package io.spine.dependency.local

import io.spine.dependency.Dependency

/**
* Dependencies on the Spine Compiler modules.
*
Expand Down Expand Up @@ -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"

/**
Expand All @@ -69,8 +71,8 @@ object Compiler {
/**
* The version of the Compiler dependencies.
*/
val version: String
private const val fallbackVersion = "2.0.0-SNAPSHOT.035"
override val version: String
private const val fallbackVersion = "2.0.0-SNAPSHOT.036"

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

/**
* The artifact for the Compiler Gradle plugin.
Expand Down Expand Up @@ -129,6 +131,21 @@ object Compiler {
val testlib
get() = "$group:compiler-testlib:$version"

override val modules: List<String>
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].
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ package io.spine.dependency.local

// For backward compatibility.
@Suppress("unused")
@Deprecated("Use `CoreJvm` instead.", ReplaceWith("CoreJvm"))
typealias CoreJava = CoreJvm

/**
Expand All @@ -38,7 +39,7 @@ typealias CoreJava = CoreJvm
@Suppress("ConstPropertyName", "unused")
object CoreJvm {
const val group = Spine.group
const val version = "2.0.0-SNAPSHOT.358"
const val version = "2.0.0-SNAPSHOT.370"

const val coreArtifact = "spine-core"
const val clientArtifact = "spine-client"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ package io.spine.dependency.local
/**
* Dependencies on the CoreJvm Compiler artifacts.
*
* See [mc-java](https://github.com/SpineEventEngine/core-jvm-compiler).
* See [CoreJvm Compiler](https://github.com/SpineEventEngine/core-jvm-compiler).
*/
@Suppress(
"MemberVisibilityCanBePrivate" /* `pluginLib()` is used by subprojects. */,
Expand All @@ -46,12 +46,12 @@ object CoreJvmCompiler {
/**
* The version used to in the build classpath.
*/
const val dogfoodingVersion = "2.0.0-SNAPSHOT.040"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.042"

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

/**
* The ID of the Gradle plugin.
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.220"
const val version = "2.0.0-SNAPSHOT.230"
const val group = Spine.group
const val artifact = "spine-time"
const val lib = "$group:$artifact:$version"
Expand Down
Loading
Loading