Skip to content

Commit 91c2547

Browse files
Merge pull request #68 from SpineEventEngine/use-new-validation-package
Use new validation package
2 parents 8d1831e + b3be3d2 commit 91c2547

File tree

33 files changed

+247
-801
lines changed

33 files changed

+247
-801
lines changed

base/src/main/kotlin/io/spine/tools/core/jvm/gradle/settings/CoreJvmCompilerSettings.kt

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,11 @@ public class CoreJvmCompilerSettings @Internal public constructor(private val pr
9898
*/
9999
public val comparables: ComparableSettings = ComparableSettings(project)
100100

101-
/**
102-
* Settings for the generated validation code.
103-
*/
104-
public val validation: ValidationSettings = ValidationSettings(project)
105-
106101
/**
107102
* Settings for the generated code of grouped messages.
108103
*/
109104
public val messageGroups: MutableSet<MessageGroup> = mutableSetOf()
110105

111-
/**
112-
* Obtains the configuration settings for the generated validation code.
113-
*/
114-
@Deprecated("Please use property syntax instead.", ReplaceWith("validation"))
115-
public fun validation(): ValidationSettings = validation
116-
117106
/**
118107
* Obtains an instance of [FilePatternFactory] which creates file patterns.
119108
*
@@ -170,7 +159,7 @@ public class CoreJvmCompilerSettings @Internal public constructor(private val pr
170159
}
171160

172161
/**
173-
* Configures code generation for particular message.
162+
* Configures code generation for a particular message.
174163
*/
175164
public fun forMessage(protoTypeName: String, action: Action<MessageGroupSettings>) {
176165
val pattern = pattern {
@@ -199,13 +188,6 @@ public class CoreJvmCompilerSettings @Internal public constructor(private val pr
199188
action.execute(comparables)
200189
}
201190

202-
/**
203-
* Configures code generation for validation messages.
204-
*/
205-
public fun validation(action: Action<ValidationSettings>) {
206-
action.execute(validation)
207-
}
208-
209191
override fun toProto(): Combined {
210192
val self = this@CoreJvmCompilerSettings
211193
val ss = signalSettings {
@@ -222,7 +204,6 @@ public class CoreJvmCompilerSettings @Internal public constructor(private val pr
222204
signalSettings = ss
223205
groupSettings = gs
224206
entities = self.entities.toProto()
225-
validation = self.validation.toProto()
226207
uuids = self.uuids.toProto()
227208
comparables = self.comparables.toProto()
228209
classpath = cp

base/src/main/kotlin/io/spine/tools/core/jvm/gradle/settings/ValidationSettings.kt

Lines changed: 0 additions & 56 deletions
This file was deleted.

base/src/main/proto/spine/tools/core/jvm/settings.proto

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ import "spine/compiler/render_actions.proto";
5050
//
5151
message Combined {
5252

53-
// The configuration related to validation code.
54-
Validation validation = 1;
53+
reserved 1;
54+
reserved "validation";
5555

5656
// The configuration related to entity states.
5757
Entities entities = 2;
@@ -75,22 +75,6 @@ message Combined {
7575
Comparables comparables = 11;
7676
}
7777

78-
// Configuration related to validation code.
79-
message Validation {
80-
81-
// Validating builders are always generated. This property is deprecated and ignored.
82-
bool skip_builders = 1 [deprecated = true];
83-
84-
// Validating builders are always generated. This property is deprecated and ignored.
85-
bool skip_validation = 2 [deprecated = true];
86-
87-
// If specified, provides a version of the Java validation code generator to use.
88-
//
89-
// Otherwise, McJava uses the version of the generator that is bundled with the plugin.
90-
//
91-
string version = 3;
92-
}
93-
9478
// Code generation settings for a group of signal messages.
9579
message Signals {
9680

base/src/test/kotlin/io/spine/tools/core/jvm/gradle/settings/ValidationSettingsSpec.kt

Lines changed: 0 additions & 64 deletions
This file was deleted.

buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ package io.spine.dependency.lib
3333
)
3434
object Protobuf {
3535
const val group = "com.google.protobuf"
36-
const val version = "4.33.1"
36+
const val version = "4.33.2"
3737

3838
/**
3939
* The Java library with Protobuf data types.

buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ package io.spine.dependency.local
3333
*/
3434
@Suppress("ConstPropertyName", "unused")
3535
object Base {
36-
const val version = "2.0.0-SNAPSHOT.383"
37-
const val versionForBuildScript = "2.0.0-SNAPSHOT.383"
36+
const val version = "2.0.0-SNAPSHOT.384"
37+
const val versionForBuildScript = "2.0.0-SNAPSHOT.384"
3838
const val group = Spine.group
3939
private const val prefix = "spine"
4040
const val libModule = "$prefix-base"

buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ package io.spine.dependency.local
3333
*/
3434
@Suppress("ConstPropertyName")
3535
object BaseTypes {
36-
const val version = "2.0.0-SNAPSHOT.212"
36+
const val version = "2.0.0-SNAPSHOT.222"
3737
const val group = Spine.group
3838
const val artifact = "spine-base-types"
3939
const val lib = "$group:$artifact:$version"

buildSrc/src/main/kotlin/io/spine/dependency/local/Change.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ package io.spine.dependency.local
3333
*/
3434
@Suppress("ConstPropertyName")
3535
object Change {
36-
const val version = "2.0.0-SNAPSHOT.200"
36+
const val version = "2.0.0-SNAPSHOT.205"
3737
const val group = Spine.group
3838
const val artifact = "spine-change"
3939
const val lib = "$group:$artifact:$version"

buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ object Compiler : Dependency() {
7272
* The version of the Compiler dependencies.
7373
*/
7474
override val version: String
75-
private const val fallbackVersion = "2.0.0-SNAPSHOT.035"
75+
private const val fallbackVersion = "2.0.0-SNAPSHOT.037"
7676

7777
/**
7878
* The distinct version of the Compiler used by other build tools.
@@ -81,7 +81,7 @@ object Compiler : Dependency() {
8181
* transitive dependencies, this is the version used to build the project itself.
8282
*/
8383
val dogfoodingVersion: String
84-
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.035"
84+
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.037"
8585

8686
/**
8787
* The artifact for the Compiler Gradle plugin.

buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typealias CoreJava = CoreJvm
3838
@Suppress("ConstPropertyName", "unused")
3939
object CoreJvm {
4040
const val group = Spine.group
41-
const val version = "2.0.0-SNAPSHOT.358"
41+
const val version = "2.0.0-SNAPSHOT.370"
4242

4343
const val coreArtifact = "spine-core"
4444
const val clientArtifact = "spine-client"

0 commit comments

Comments
 (0)