Skip to content

fix(build): rename GitInfoService Parameters.isRelease to release#4865

Merged
jbonofre merged 1 commit into
apache:mainfrom
jbonofre:fix/gitinfo-release-property
Jun 22, 2026
Merged

fix(build): rename GitInfoService Parameters.isRelease to release#4865
jbonofre merged 1 commit into
apache:mainfrom
jbonofre:fix/gitinfo-release-property

Conversation

@jbonofre

@jbonofre jbonofre commented Jun 22, 2026

Copy link
Copy Markdown
Member

Gradle's managed-property generation rejects an abstract getter that returns Property<Boolean> when it uses the is-prefix convention, since isX() getters are only valid for primitive boolean. The Kotlin property isRelease maps to an isRelease() getter, so instantiating GitInfoService.Parameters fails with:

  Cannot have abstract method Parameters.isRelease(): Property<Boolean>.

The parameters are only instantiated on the release/publish path (e.g. the releaseEmailTemplate task), so ordinary build/test runs never hit it. The error reproduces identically on Gradle 9.5.1 and 9.6.0: it is a latent bug from the BuildService introduction, not tied to the 9.6.0 upgrade.

Rename the property to release so it generates a valid getRelease() getter, and update the two references.

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

Gradle's managed-property generation rejects an abstract getter that
returns Property<Boolean> when it uses the is-prefix convention, since
isX() getters are only valid for primitive boolean. The Kotlin property
isRelease maps to an isRelease() getter, so instantiating
GitInfoService.Parameters fails with:

  Cannot have abstract method Parameters.isRelease(): Property<Boolean>.

The parameters are only instantiated on the release/publish path (e.g.
the releaseEmailTemplate task), so ordinary build/test runs never hit
it. The error reproduces identically on Gradle 9.5.1 and 9.6.0 -- it is
a latent bug from the BuildService introduction, not tied to the 9.6.0
upgrade.

Rename the property to release so it generates a valid getRelease()
getter, and update the two references.
@jbonofre jbonofre requested review from dimas-b and snazy June 22, 2026 20:09
@github-project-automation github-project-automation Bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jun 22, 2026
@jbonofre jbonofre merged commit 6042224 into apache:main Jun 22, 2026
24 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in Basic Kanban Board Jun 22, 2026
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