Skip to content

Apply new publishing#286

Merged
alexander-yevsyukov merged 8 commits intomasterfrom
new-publishing
Apr 3, 2026
Merged

Apply new publishing#286
alexander-yevsyukov merged 8 commits intomasterfrom
new-publishing

Conversation

@alexander-yevsyukov
Copy link
Copy Markdown
Collaborator

This PR brings changes to SpinePublishing through pulling latest config.

Other notable changes

dependabot bot and others added 8 commits March 26, 2026 00:11
Bumps  and [picomatch](https://github.com/micromatch/picomatch). These dependencies needed to be updated together.

Updates `picomatch` from 2.3.1 to 2.3.2
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/picomatch@2.3.1...2.3.2)

Updates `picomatch` from 4.0.3 to 4.0.4
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/picomatch@2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Copilot AI review requested due to automatic review settings April 3, 2026 17:15
@alexander-yevsyukov alexander-yevsyukov marked this pull request as ready for review April 3, 2026 17:15
@alexander-yevsyukov alexander-yevsyukov self-assigned this Apr 3, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c12e182b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

*
* @see artifactPrefix
*/
var toolArtifactPrefix: String = ""
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Apply toolArtifactPrefix when computing published artifact IDs

This adds toolArtifactPrefix, but the publication path still ignores it: PublicationHandler.copyProjectAttributes() continues to prepend project.spinePublishing.artifactPrefix for every module, and nothing calls SpinePublishing.artifactId(project). In a mixed project, tool modules (group == io.spine.tools) will still be published as spine-validation-* even when toolArtifactPrefix = "validation-", which breaks expected coordinates (for example, pom.xml still references io.spine.tools:validation-java-bundle).

Useful? React with 👍 / 👎.

}

spinePublishing {
artifactPrefix = "spine-validation-"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid double spine prefix for jvm-runtime publication

Setting the root artifactPrefix to spine-validation- causes jvm-runtime to generate a doubled artifact ID because jvm-runtime/build.gradle.kts already does artifactId = "$defaultPrefix$projectPrefix${project.name}" with defaultPrefix = "spine-"; this now resolves to spine-spine-validation-jvm-runtime. That will publish runtime under an unexpected coordinate and break consumers expecting spine-validation-jvm-runtime.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the project’s publishing configuration (via SpinePublishing) and refreshes dependency/version coordinates, including a Dependabot-reported picomatch bump for the docs preview.

Changes:

  • Adjust SpinePublishing API/behavior to support separate artifact prefixes for tool vs non-tool modules and return the configured extension instance.
  • Bump project and related Spine dependency versions; update docs/snippets and generated dependency report accordingly.
  • Update test tooling/dependencies (Kotest assertions usage, buildSrc test deps) and patch plugin-version update regex handling.

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
version.gradle.kts Bumps the overall project version.
pom.xml Updates Maven project/dependency versions (incl. Kotest).
build.gradle.kts Configures new SpinePublishing prefixes for tool publishing.
java-bundle/build.gradle.kts Aligns Time artifact constant usage with updated Time dependency model.
docs/content/docs/validation/01-getting-started/adding-to-build.md Updates plugin version in documentation snippet.
docs/_preview/package-lock.json Bumps picomatch versions per Dependabot/security update.
dependencies.md Regenerates dependency/license report for the new versions.
buildSrc/build.gradle.kts Updates buildSrc test dependencies (JUnit BOM via version var; adds Kotest assertions).
buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt Implements tool/non-tool artifact prefixing and adjusts extension naming/return value.
buildSrc/src/test/kotlin/io/spine/gradle/publish/SpinePublishingTest.kt Adds tests covering SpinePublishing artifactId/config validation/repo resolution logic.
buildSrc/src/main/kotlin/io/spine/gradle/docs/UpdatePluginVersion.kt Escapes plugin IDs in regex to avoid regex metacharacter issues.
buildSrc/src/test/kotlin/io/spine/gradle/docs/UpdatePluginVersionTest.kt Switches assertions to Kotest matchers and adds display name.
buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt Bumps Kotest version constant.
buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt Bumps local Validation dependency version constant.
buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt Bumps ToolBase versions.
buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt Bumps Base versions.
buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt Refactors Time into Dependency()-based model and bumps version.
Files not reviewed (1)
  • docs/_preview/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

fun Project.spinePublishing(block: SpinePublishing.() -> Unit): SpinePublishing {
apply<MavenPublishPlugin>()
val name = SpinePublishing::class.java.simpleName
.replaceFirstChar { it.lowercase(Locale.getDefault()) }
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Locale.getDefault() when deriving the Gradle extension name can produce different names on machines with different default locales (e.g., Turkish locale casing), which may break Kotlin DSL accessors and reduce build reproducibility. Consider using a locale-invariant option such as Locale.ROOT when lowercasing the first character.

Suggested change
.replaceFirstChar { it.lowercase(Locale.getDefault()) }
.replaceFirstChar { it.lowercase(Locale.ROOT) }

Copilot uses AI. Check for mistakes.
fun kotlinExtensions(version: String): String = "$group:$infix-kotlin:$version"
val kotlinExtensions get() = kotlinExtensions(version)

fun testLib(version: String): String = "${Spine.toolsGroup}:time-testlib:$version"
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

testLib() uses the artifact time-testlib, which is inconsistent with the infix (spine-time) and with the established naming pattern for other *-testlib artifacts in this repo (e.g. spine-logging-testlib, spine-core-testlib). This looks like a wrong Maven coordinate and may lead to unresolved dependencies; consider deriving it from infix (e.g. spine-time-testlib) to keep it consistent.

Suggested change
fun testLib(version: String): String = "${Spine.toolsGroup}:time-testlib:$version"
fun testLib(version: String): String = "${Spine.toolsGroup}:${infix}-testlib:$version"

Copilot uses AI. Check for mistakes.
Comment on lines +159 to +162
// Subproject's extension must be named 'SpinePublishing'
// to be found by SpinePublishing::class.java.simpleName
val extensionName = SpinePublishing::class.java.simpleName
val subExtension = subproject.extensions.create<SpinePublishing>(extensionName, subproject)
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments about the subproject extension needing to be named SpinePublishing to be found by SpinePublishing::class.java.simpleName appear incorrect/misleading: the production code looks up the extension by type (findByType<SpinePublishing>()), not by name. Consider updating/removing this note to avoid confusion (and note that spinePublishing() now lowercases the extension name).

Suggested change
// Subproject's extension must be named 'SpinePublishing'
// to be found by SpinePublishing::class.java.simpleName
val extensionName = SpinePublishing::class.java.simpleName
val subExtension = subproject.extensions.create<SpinePublishing>(extensionName, subproject)
// Use the conventional extension name used by the plugin.
val subExtension = subproject.extensions.create<SpinePublishing>("spinePublishing", subproject)

Copilot uses AI. Check for mistakes.
@alexander-yevsyukov alexander-yevsyukov merged commit e31db6a into master Apr 3, 2026
11 of 12 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the new-publishing branch April 3, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants