Skip to content

Accept extra.set(...) in version parsers; bump Compiler; tidy imports#723

Merged
alexander-yevsyukov merged 3 commits into
masterfrom
misc-fixes
Jul 1, 2026
Merged

Accept extra.set(...) in version parsers; bump Compiler; tidy imports#723
alexander-yevsyukov merged 3 commits into
masterfrom
misc-fixes

Conversation

@alexander-yevsyukov

@alexander-yevsyukov alexander-yevsyukov commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This is a misc-fixes branch bundling three commits.

1. Accept extra.set(...) in the version tooling — companion to SpineEventEngine/agents#29

Gradle deprecated the by extra(...) property delegate used in version.gradle.kts.
The agents PR extends the bump-version skill to migrate declarations to
extra.set("name", value); this PR teaches the config repo's version tooling to
read/write the new form while still accepting the legacy spelling, so the transition
is safe for lazily-migrated repos (a migrating branch is compared against an
old-form base).

  • buildSrc/.../VersionGradleFile.kt — the CI Version Guard parser: add
    extra.set literal/alias regexes, fold them into parse(), and document both
    spellings in the KDoc. Two new spec cases cover the literal and alias forms.
  • scripts/publish-documentation/publish.sh — emit extra.set(...) when stamping
    the Dokka publishing version (copyright header bumped to 2026).
  • scripts/revalidate-versions.shparse_version() reads both spellings.

Merge ordering: land this before any repo migrates its version.gradle.kts,
so the Version Guard recognizes the new form. Both sides are backward-compatible, so
beyond that, order doesn't matter.

2. Bump Compiler fallback versions to 2.0.0-SNAPSHOT.059

Updates fallbackVersion and fallbackDfVersion in Compiler from .057 to
.059. (The commit message was corrected from an earlier inaccurate
"Remove redundant imports" — the diff was always this version bump.)

3. Remove redundant imports

Drops two redundant private property imports in Compiler.kt.
The imports were accidentally (and forcibly) added by IntelliJ IDEA.

Verification

./gradlew -p buildSrc buildBUILD SUCCESSFUL (compiles + VersionGradleFileSpec
passes). Reviewed by spine-code-review, kotlin-engineer (both APPROVE),
review-docs (APPROVE WITH CHANGES — minor KDoc-wording nits), and dependency-audit
(the Compiler bump is a clean forward bump — no rollback/BOM mismatch). Version gate
not applicable (config has no root version.gradle.kts).

🤖 Generated with Claude Code

alexander-yevsyukov and others added 3 commits July 1, 2026 17:28
Update `fallbackVersion` and `fallbackDfVersion` in `Compiler`
from `2.0.0-SNAPSHOT.057` to `2.0.0-SNAPSHOT.059`.
Companion to the `agents` change that migrates `version.gradle.kts` off Gradle's
deprecated `by extra(...)` property delegate. Teach the config repo's version
tooling to read and write the new `extra.set("name", value)` form while still
accepting the legacy `by extra(...)` spelling, so the transition is safe for
lazily-migrated repos (a migrating branch is compared against an old-form base).

- buildSrc `VersionGradleFile`: add `extra.set` literal/alias regexes to the CI
  Version Guard parser; KDoc documents both spellings, with tests for the new
  literal and alias forms.
- scripts/publish-documentation/publish.sh: emit `extra.set(...)` when stamping
  the Dokka publishing version.
- scripts/revalidate-versions.sh: `parse_version()` reads both spellings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 config repo’s version tooling to recognize Gradle’s newer extra.set("key", …) form (while keeping legacy by extra(...) compatibility), bumps the Spine Compiler fallback snapshot versions, and tidies a couple of redundant imports.

Changes:

  • Extend VersionGradleFile parsing (and tests) to support both extra.set(...) and legacy by extra(...) declarations, including one-hop alias resolution.
  • Update documentation publishing and version revalidation scripts to emit/parse extra.set(...).
  • Bump Compiler fallback versions from 2.0.0-SNAPSHOT.057 to 2.0.0-SNAPSHOT.059 and remove redundant self-imports.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
scripts/revalidate-versions.sh Teach parse_version() to read extra.set(...) literals/aliases while retaining legacy parsing.
scripts/publish-documentation/publish.sh Emit extra.set("versionToPublish", "...") when stamping Dokka publishing version; update copyright year.
buildSrc/src/test/kotlin/io/spine/gradle/VersionGradleFileSpec.kt Add coverage for extra.set(...) literal and alias cases.
buildSrc/src/main/kotlin/io/spine/gradle/VersionGradleFile.kt Add extra.set(...) regex support and integrate it into parse() alongside legacy regexes.
buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt Bump fallback Compiler versions to .059 and remove redundant imports.

@alexander-yevsyukov alexander-yevsyukov moved this from 🏗 In progress to In Review in v2.0 Jul 1, 2026
@alexander-yevsyukov alexander-yevsyukov merged commit 997f02a into master Jul 1, 2026
4 checks passed
@alexander-yevsyukov alexander-yevsyukov deleted the misc-fixes branch July 1, 2026 16:47
@github-project-automation github-project-automation Bot moved this from In Review to ✅ Done in v2.0 Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants