Change JDK compatibility check to also account for Java 16.
Some tweaks for Groovy 4 (most notably, invokedynamic is enabled by default for Groovy 4 and cannot be disabled).
New parameter (attachGroovyDocAnnotation) to enable attaching GroovyDoc annotation.
New parameter (parallelParsing) to enable parallel parsing (enabled by default with Groovy 4).
Remove previewFeatures parameter from stub generation goals, since it's not used there.
Potentially breaking changes
If you were using the previewFeatures parameter without
also including a compilation goal that would make that config valid,
the build will fail because it's no longer a valid parameter. The fix would
be to move that configuration to the appropriate execution(s).