You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by jb...@apache.org on 2026/06/22 20:31:56 UTC
(polaris) branch main updated: fix(build): rename GitInfoService Parameters.isRelease to release (#4865)
This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 604222464e fix(build): rename GitInfoService Parameters.isRelease to release (#4865)
604222464e is described below
commit 604222464e08410093c8058f7f205a93fcfc8e78
Author: JB Onofré <jb...@apache.org>
AuthorDate: Mon Jun 22 22:31:51 2026 +0200
fix(build): rename GitInfoService Parameters.isRelease to release (#4865)
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.
---
build-logic/src/main/kotlin/GitInfo.kt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/build-logic/src/main/kotlin/GitInfo.kt b/build-logic/src/main/kotlin/GitInfo.kt
index f3e5053edb..5bda16bc50 100644
--- a/build-logic/src/main/kotlin/GitInfo.kt
+++ b/build-logic/src/main/kotlin/GitInfo.kt
@@ -44,7 +44,7 @@ class GitInfo(val gitHead: String, val gitDescribe: String, private val rawLinkR
"gitInfo-$isRelease",
GitInfoService::class.java,
) {
- parameters.isRelease.set(isRelease)
+ parameters.release.set(isRelease)
}
return service.get().gitInfo
}
@@ -53,13 +53,13 @@ class GitInfo(val gitHead: String, val gitDescribe: String, private val rawLinkR
abstract class GitInfoService : BuildService<GitInfoService.Parameters> {
interface Parameters : BuildServiceParameters {
- val isRelease: Property<Boolean>
+ val release: Property<Boolean>
}
@get:Inject abstract val execOperations: ExecOperations
val gitInfo: GitInfo by lazy {
- val isRelease = parameters.isRelease.get()
+ val isRelease = parameters.release.get()
val gitHead = execGit("rev-parse", "HEAD")
val gitDescribe =
if (isRelease) {