Skip to content

hotfix: don't override version in maven publishing configuration#116

Merged
jacob-derynk merged 1 commit into
masterfrom
hotfix/version-crash
Mar 2, 2026
Merged

hotfix: don't override version in maven publishing configuration#116
jacob-derynk merged 1 commit into
masterfrom
hotfix/version-crash

Conversation

@jacob-derynk

Copy link
Copy Markdown
Contributor

Problem

Release publish was failing on CI with:
"The value for extension 'mavenPublishing' property 'version$plugin' is
final and cannot be changed any further."

vanniktech/gradle-maven-publish-plugin 0.34.0 automatically reads
VERSION_NAME
from Gradle project properties and finalizes the version field during plugin
configuration. The explicit coordinates(version = ...) call then tried to
overwrite an already-finalized value.

Snapshot publish worked because it doesn't pass -PVERSION_NAME, so the
plugin
never finalized the property.

Fix

  • Remove version from coordinates() in both library build files — the
    plugin
    reads VERSION_NAME natively.
  • Add VERSION_NAME=2.X.X-SNAPSHOT to gradle.properties as the default for
    snapshot builds. Release CI overrides it with -PVERSION_NAME=x.y.z.

@jacob-derynk jacob-derynk self-assigned this Mar 2, 2026
@jacob-derynk
jacob-derynk merged commit 00cdc8e into master Mar 2, 2026
1 check passed
@jacob-derynk
jacob-derynk deleted the hotfix/version-crash branch March 2, 2026 16:06
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.

2 participants