A consequence of GROOVY-10708 is that Tasks or Extensions having an is...() getter returning a Boolean are no longer recognized as properties.
One known example comes from the spring-boot-gradle-plugin. Property o.s.b.g.t.b.DockerSpec#tlsVerify is backed by a primitive boolean field, but the accessor returns a Booleanhere. This will fail task validation at build time when we upgrade our bundled Groovy to version 4, as shown below:
- Error: Type 'org.springframework.boot.gradle.tasks.bundling.DockerSpec' method 'isTlsVerify()' should not be annotated with: @Input, @Optional.
Reason: Input/Output annotations are ignored if they are placed on something else than a getter.
Possible solutions:
1. Remove the annotations.
2. Rename the method.
tl;dr
Beginning with Gradle 8.1, we should proactively detect and warn that this pattern will fail in a future version of Gradle where we bundle Groovy 4 - likely Gradle 9.0.
A consequence of GROOVY-10708 is that Tasks or Extensions having an
is...()
getter returning aBoolean
are no longer recognized as properties.One known example comes from the
spring-boot-gradle-plugin
. Propertyo.s.b.g.t.b.DockerSpec#tlsVerify
is backed by a primitive boolean field, but the accessor returns aBoolean
here. This will fail task validation at build time when we upgrade our bundled Groovy to version 4, as shown below:tl;dr
Beginning with Gradle 8.1, we should proactively detect and warn that this pattern will fail in a future version of Gradle where we bundle Groovy 4 - likely Gradle 9.0.