Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix publishing #179

Merged
merged 6 commits into from
Jan 4, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ open class CheckVersionIncrement : DefaultTask() {
val versions = metadata?.versioning?.versions
val versionExists = versions?.contains(version) ?: false
if (versionExists) {
throw GradleException("""
throw GradleException(
"""
Version `$version` is already published to maven repository `$repoUrl`.
Try incrementing the library version.
All available versions are: ${versions?.joinToString(separator = ", ")}.
Expand All @@ -88,13 +89,28 @@ open class CheckVersionIncrement : DefaultTask() {

private fun Project.artifactPath(): String {
val group = this.group as String
val name = "spine-${this.name}"
val name = "${artifactPrefix()}${this.name}"

val pathElements = ArrayList(group.split('.'))
pathElements.add(name)
val path = pathElements.joinToString(separator = "/")
return path
}

/**
* Returns the artifact prefix used for the publishing of this project.
*
* All current Spine modules should be using `SpinePublishing`.
* Therefore, the corresponding extension should be present in the root project.
* However, just in case, we define the "standard" prefix here as well.
*
* This value MUST be the same as defined by the defaults in `SpinePublishing`.
*/
private fun Project.artifactPrefix(): String {
val ext = rootProject.extensions.findByType(SpinePublishing::class.java)
val result = ext?.artifactPrefix ?: SpinePublishing.DEFAULT_PREFIX
return result
}
}

private data class MavenMetadata(var versioning: Versioning = Versioning()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ fun Project.spinePublishing(block: SpinePublishing.() -> Unit) {
*/
open class SpinePublishing(private val project: Project) {

companion object {

/**
* The default prefix added before a module name when publishing artifacts.
*/
const val DEFAULT_PREFIX = "spine-"
}

private val protoJar = ProtoJar()
private val testJar = TestJar()
private val dokkaJar = DokkaJar()
Expand Down
56 changes: 28 additions & 28 deletions dependencies.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


# Dependencies of `io.spine.validation:spine-validation-java:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-java:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3.
Expand Down Expand Up @@ -848,12 +848,12 @@

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50: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).
This report was generated on **Sat Jan 04 18:59:50 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.validation:spine-validation-java-bundle:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-java-bundle:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 24.0.1.
Expand Down Expand Up @@ -1448,12 +1448,12 @@ This report was generated on **Sat Jan 04 17:50:08 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50: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).
This report was generated on **Sat Jan 04 18:59:50 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.validation:spine-validation-java-runtime:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-java-runtime:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -2110,12 +2110,12 @@ This report was generated on **Sat Jan 04 17:50:08 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50: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).
This report was generated on **Sat Jan 04 18:59:50 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.validation:spine-validation-java-tests:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-java-tests:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3.
Expand Down Expand Up @@ -3031,12 +3031,12 @@ This report was generated on **Sat Jan 04 17:50:08 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50: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).
This report was generated on **Sat Jan 04 18:59:50 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.validation:spine-validation-model:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-model:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3.
Expand Down Expand Up @@ -3895,12 +3895,12 @@ This report was generated on **Sat Jan 04 17:50:08 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:09 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).
This report was generated on **Sat Jan 04 18:59:51 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.validation:spine-validation-proto:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-proto:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3.
Expand Down Expand Up @@ -4785,12 +4785,12 @@ This report was generated on **Sat Jan 04 17:50:09 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:09 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).
This report was generated on **Sat Jan 04 18:59:51 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.validation:spine-validation-consumer:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-consumer:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3.
Expand Down Expand Up @@ -5657,12 +5657,12 @@ This report was generated on **Sat Jan 04 17:50:09 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:09 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).
This report was generated on **Sat Jan 04 18:59:51 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.validation:spine-validation-consumer-dependency:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-consumer-dependency:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -6410,12 +6410,12 @@ This report was generated on **Sat Jan 04 17:50:09 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:09 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).
This report was generated on **Sat Jan 04 18:59:51 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.validation:spine-validation-extensions:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-extensions:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3.
Expand Down Expand Up @@ -7308,12 +7308,12 @@ This report was generated on **Sat Jan 04 17:50:09 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:10 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).
This report was generated on **Sat Jan 04 18:59:52 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.validation:spine-validation-runtime:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-runtime:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -8064,12 +8064,12 @@ This report was generated on **Sat Jan 04 17:50:10 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:10 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).
This report was generated on **Sat Jan 04 18:59:52 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.validation:spine-validation-validating:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-validating:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -8824,12 +8824,12 @@ This report was generated on **Sat Jan 04 17:50:10 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:10 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).
This report was generated on **Sat Jan 04 18:59:52 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.validation:spine-validation-vanilla:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-vanilla:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -9575,12 +9575,12 @@ This report was generated on **Sat Jan 04 17:50:10 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:10 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).
This report was generated on **Sat Jan 04 18:59:53 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.validation:spine-validation-configuration:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-configuration:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3.
Expand Down Expand Up @@ -10449,12 +10449,12 @@ This report was generated on **Sat Jan 04 17:50:10 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:10 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).
This report was generated on **Sat Jan 04 18:59:53 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.validation:spine-validation-context:2.0.0-SNAPSHOT.182`
# Dependencies of `io.spine.validation:spine-validation-context:2.0.0-SNAPSHOT.183`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.3.
Expand Down Expand Up @@ -11323,4 +11323,4 @@ This report was generated on **Sat Jan 04 17:50:10 WET 2025** using [Gradle-Lice

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Sat Jan 04 17:50:11 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).
This report was generated on **Sat Jan 04 18:59:53 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).
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject.
-->
<groupId>io.spine.validation</groupId>
<artifactId>validation</artifactId>
<version>2.0.0-SNAPSHOT.182</version>
<version>2.0.0-SNAPSHOT.183</version>

<inceptionYear>2015</inceptionYear>

Expand Down
2 changes: 1 addition & 1 deletion version.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
*
* For Spine-based dependencies please see [io.spine.dependency.local.Spine].
*/
val validationVersion by extra("2.0.0-SNAPSHOT.182")
val validationVersion by extra("2.0.0-SNAPSHOT.183")
Loading