Skip to content

Commit 8598bcb

Browse files
Merge pull request #241 from SpineEventEngine/gradle-plugin
`io.spine.tools.validation` package and `io.spine.validation` Gradle plugin
2 parents c94466b + 0ba43ab commit 8598bcb

File tree

404 files changed

+2864
-2421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

404 files changed

+2864
-2421
lines changed
188 KB
Loading
-220 KB
Binary file not shown.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ Follow these steps to create a custom option:
105105
- Policy (`MyOptionPolicy`) – discovers and validates the option.
106106
- View (`MyOptionView`) – accumulates valid option applications.
107107
- Generator (`MyOptionGenerator`) – generates Java code for the option.
108-
4. Register them via `io.spine.validation.api.ValidationOption`.
108+
4. Register them via `io.spine.tools.validation.java.ValidationOption`.
109109

110110
Below is a workflow diagram for a typical option:
111111

112-
![Typical custom option](.github/readme/typical_custom_option.png)
112+
![Typical custom option](.github/readme/typical_custom_option.jpg)
113113

114114
Take a look at the `:java-tests:extensions` module that contains a full example of
115115
implementation of the custom `(currency)` option.

build.gradle.kts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ buildscript {
6464
classpath(io.spine.dependency.local.ToolBase.protobufSetupPlugins)
6565

6666
classpath(io.spine.dependency.kotlinx.DateTime.lib)
67+
68+
// For `io.spine.artifact-meta` plugin.
69+
classpath(io.spine.dependency.local.ToolBase.jvmToolPluginDogfooding)
6770
}
6871
}
6972

@@ -81,8 +84,7 @@ spinePublishing {
8184
":proto:context",
8285
"java",
8386
"java-bundle",
84-
"java-runtime",
85-
"java-api"
87+
"jvm-runtime",
8688
)
8789
modulesWithCustomPublishing = setOf(
8890
"java-bundle",
@@ -93,13 +95,13 @@ spinePublishing {
9395
cloudArtifactRegistry
9496
)
9597
}
96-
artifactPrefix = "spine-validation-"
98+
artifactPrefix = "validation-"
9799
}
98100

99101
allprojects {
100102
apply(from = "$rootDir/version.gradle.kts")
101103
repositories.standardToSpineSdk()
102-
group = "io.spine.validation"
104+
group = "io.spine.tools"
103105
version = extra["validationVersion"]!!
104106

105107
configurations.all {

buildSrc/src/main/kotlin/fat-jar.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ tasks.shadowJar {
112112
"org/intellij/**",
113113
"org/jetbrains/**",
114114

115-
// Exclude the descriptor set file which comes from `spine-validation-java-runtime`
115+
// Exclude the descriptor set file which comes from `spine-validation-jvm-runtime`
116116
// used to build Validation itself.
117-
"io.spine.validation_java-runtime_main_${Validation.version}.desc",
117+
"io.spine.validation_jvm-runtime_main_${Validation.version}.desc",
118118
)
119119

120120
isZip64 = true /* The archive has way too many items. So using the Zip64 mode. */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ object Compiler {
7070
* The version of the Compiler dependencies.
7171
*/
7272
val version: String
73-
private const val fallbackVersion = "2.0.0-SNAPSHOT.034"
73+
private const val fallbackVersion = "2.0.0-SNAPSHOT.035"
7474

7575
/**
7676
* The distinct version of the Compiler used by other build tools.
@@ -79,7 +79,7 @@ object Compiler {
7979
* transitive dependencies, this is the version used to build the project itself.
8080
*/
8181
val dogfoodingVersion: String
82-
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.030"
82+
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.035"
8383

8484
/**
8585
* The artifact for the Compiler Gradle plugin.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ object CoreJvmCompiler {
4646
/**
4747
* The version used to in the build classpath.
4848
*/
49-
const val dogfoodingVersion = "2.0.0-SNAPSHOT.035"
49+
const val dogfoodingVersion = "2.0.0-SNAPSHOT.040"
5050

5151
/**
5252
* The version to be used for integration tests.
5353
*/
54-
const val version = "2.0.0-SNAPSHOT.035"
54+
const val version = "2.0.0-SNAPSHOT.040"
5555

5656
/**
5757
* The ID of the Gradle plugin.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object Validation {
3636
/**
3737
* The version of the Validation library artifacts.
3838
*/
39-
const val version = "2.0.0-SNAPSHOT.354"
39+
const val version = "2.0.0-SNAPSHOT.360"
4040

4141
/**
4242
* The last version of Validation compatible with ProtoData.

buildSrc/src/main/kotlin/io/spine/gradle/publish/PublicationHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private const val MAVEN_PUBLISH = "maven-publish"
5353
* the [`spinePublishing`][io.spine.gradle.publish.SpinePublishing.destinations]
5454
* extension applied to the subproject.
5555
*/
56-
internal sealed class PublicationHandler(
56+
sealed class PublicationHandler(
5757
protected val project: Project,
5858
protected var destinations: Set<Repository>
5959
) {

buildSrc/src/main/kotlin/io/spine/gradle/publish/StandardJavaPublicationHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import org.gradle.kotlin.dsl.create
5757
* The Maven Publish Plugin | Publications</a>
5858
* @see CustomPublicationHandler
5959
*/
60-
internal class StandardJavaPublicationHandler private constructor(
60+
class StandardJavaPublicationHandler private constructor(
6161
project: Project,
6262
private val jarFlags: JarFlags,
6363
destinations: Set<Repository>,

0 commit comments

Comments
 (0)