Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 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
Original file line number Diff line number Diff line change
Expand Up @@ -98,22 +98,11 @@ public class CoreJvmCompilerSettings @Internal public constructor(private val pr
*/
public val comparables: ComparableSettings = ComparableSettings(project)

/**
* Settings for the generated validation code.
*/
public val validation: ValidationSettings = ValidationSettings(project)

/**
* Settings for the generated code of grouped messages.
*/
public val messageGroups: MutableSet<MessageGroup> = mutableSetOf()

/**
* Obtains the configuration settings for the generated validation code.
*/
@Deprecated("Please use property syntax instead.", ReplaceWith("validation"))
public fun validation(): ValidationSettings = validation

/**
* Obtains an instance of [FilePatternFactory] which creates file patterns.
*
Expand Down Expand Up @@ -170,7 +159,7 @@ public class CoreJvmCompilerSettings @Internal public constructor(private val pr
}

/**
* Configures code generation for particular message.
* Configures code generation for a particular message.
*/
public fun forMessage(protoTypeName: String, action: Action<MessageGroupSettings>) {
val pattern = pattern {
Expand Down Expand Up @@ -199,13 +188,6 @@ public class CoreJvmCompilerSettings @Internal public constructor(private val pr
action.execute(comparables)
}

/**
* Configures code generation for validation messages.
*/
public fun validation(action: Action<ValidationSettings>) {
action.execute(validation)
}

override fun toProto(): Combined {
val self = this@CoreJvmCompilerSettings
val ss = signalSettings {
Expand All @@ -222,7 +204,6 @@ public class CoreJvmCompilerSettings @Internal public constructor(private val pr
signalSettings = ss
groupSettings = gs
entities = self.entities.toProto()
validation = self.validation.toProto()
uuids = self.uuids.toProto()
comparables = self.comparables.toProto()
classpath = cp
Expand Down

This file was deleted.

20 changes: 2 additions & 18 deletions base/src/main/proto/spine/tools/core/jvm/settings.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ import "spine/compiler/render_actions.proto";
//
message Combined {

// The configuration related to validation code.
Validation validation = 1;
reserved 1;
reserved "validation";

// The configuration related to entity states.
Entities entities = 2;
Expand All @@ -75,22 +75,6 @@ message Combined {
Comparables comparables = 11;
}

// Configuration related to validation code.
message Validation {

// Validating builders are always generated. This property is deprecated and ignored.
bool skip_builders = 1 [deprecated = true];

// Validating builders are always generated. This property is deprecated and ignored.
bool skip_validation = 2 [deprecated = true];

// If specified, provides a version of the Java validation code generator to use.
//
// Otherwise, McJava uses the version of the generator that is bundled with the plugin.
//
string version = 3;
}

// Code generation settings for a group of signal messages.
message Signals {

Expand Down

This file was deleted.

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
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.035"
private const val fallbackVersion = "2.0.0-SNAPSHOT.037"

/**
* The distinct version of the Compiler used by other build tools.
Expand All @@ -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.035"
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.037"

/**
* The artifact for the Compiler Gradle plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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
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
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.378"
const val version = "2.0.0-SNAPSHOT.390"

/**
* The last version of Validation compatible with ProtoData.
Expand All @@ -49,10 +49,12 @@ object Validation {
const val gradlePluginLib = "$group:$prefix-gradle-plugin:$version"

const val runtimeModule = "${Spine.group}:spine-$prefix-jvm-runtime"
const val oldRuntimeModule = "io.spine.validation:spine-validation-java-runtime"
const val runtime = "$runtimeModule:$version"
const val javaModule = "$group:$prefix-java"
const val java = "$javaModule:$version"
const val javaBundleModule = "$group:$prefix-java-bundle"
const val oldJavaBundleModule = "io.spine.validation:spine-validation-java-bundle"

/** Obtains the artifact for the `java-bundle` artifact of the given version. */
fun javaBundle(version: String) = "$javaBundleModule:$version"
Expand Down
38 changes: 14 additions & 24 deletions buildSrc/src/main/kotlin/module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,23 @@ fun Module.forceConfigurations() {
// Exclude in favor of `spine-validation-java-runtime`.
exclude("io.spine", "spine-validate")
resolutionStrategy {
// Substitute the legacy artifact coordinates with the new `ToolBase.lib` alias.
dependencySubstitution {
// Substitute the legacy artifact coordinates with the new `ToolBase.lib` alias.
substitute(module("io.spine.tools:spine-tool-base"))
.using(module(ToolBase.lib))
substitute(module("io.spine.tools:spine-plugin-base"))
.using(module(ToolBase.pluginBase))
substitute(module(Validation.oldJavaBundleModule))
.using(module(Validation.javaBundle))
}

Grpc.forceArtifacts(project, this@all, this@resolutionStrategy)
Ksp.forceArtifacts(project, this@all, this@resolutionStrategy)
Jackson.forceArtifacts(project, this@all, this@resolutionStrategy)
Jackson.DataFormat.forceArtifacts(project, this@all, this@resolutionStrategy)
Jackson.DataType.forceArtifacts(project, this@all, this@resolutionStrategy)
val rs = this@resolutionStrategy
val cfg = this@all
Grpc.forceArtifacts(project, cfg, rs)
Ksp.forceArtifacts(project, cfg, rs)
Jackson.forceArtifacts(project, cfg, rs)
Jackson.DataFormat.forceArtifacts(project, cfg, rs)
Jackson.DataType.forceArtifacts(project, cfg, rs)
force(
Grpc.bom,
Jackson.bom,
Expand All @@ -156,6 +160,8 @@ fun Module.forceConfigurations() {
Base.lib,
Time.lib,
Time.javaExtensions,
Compiler.api,
Compiler.backend,
Compiler.params,
Compiler.gradleApi,
Compiler.pluginLib,
Expand All @@ -178,25 +184,9 @@ fun Module.forceConfigurations() {
Compiler.api,
Compiler.gradleApi,
Compiler.jvm,
"io.spine.validation:spine-validation-java-runtime:2.0.0-SNAPSHOT.360"
Validation.javaBundle,
Validation.runtime,
)
// Force the version to avoid the version conflict for
// the `:gradle-plugins:ProtoData` configuration.
if(config.name.contains("protodata", ignoreCase = true)) {
val compatVersion = Validation.pdCompatibleVersion
force(
"${Validation.runtimeModule}:$compatVersion",
"${Validation.javaBundleModule}:$compatVersion",
"${Validation.javaModule}:$compatVersion",
"${Validation.configModule}:$compatVersion",
)
} else {
force(
Validation.runtime,
Validation.java,
Validation.javaBundle,
)
}
}
}
}
Expand Down
Loading
Loading