Using javaVersion for groovydoc in 4.0.27

Per Nyfelt <[email protected]> Wed, 28 May 2025 21:06:38 +0200
Newsgroups gmane.comp.lang.groovy.user
Organization Alipsa HB
Message-ID <[email protected]>
Hi,

I am keen to use the new javaVersion property added to GroovyDoc in 
4.0.27 but cannot figure it out. According to the gradle documentation, 
"The version of the Groovydoc that is used, is the one from the Groovy 
dependency defined in the build script." so i did this:

add implementation `"org.apache.groovy:groovy-ant:4.0.27"` to dependencies

add a groovydoc config

groovydoc {
     docTitle = "${project.name} ${project.version}"
     windowTitle = "${project.name} ${project.version}"
     link 'https://docs.oracle.com/en/java/javase/21/docs/api/', 'java.'
     javaVersion = 'JAVA_21'
}

But gradle is unhappy with this:

 > Could not set unknown property 'javaVersion' for task 
':matrix-spreadsheet:groovydoc' of type 
org.gradle.api.tasks.javadoc.Groovydoc.

Has anyone got this to work and could share some insights?