Groovydoc used to support the noscripts option to not include scripts, and nomainforscripts to exclude the script's main method from the documentation. As of Groovy 3, these options no longer work, because they were only part of the old parser, and never added to the new one. They should either be removed from the documentation and API, or reimplemented.
1. Make a Script.groovy
2. Run groovydoc -noscripts --destdir=doc . Script.groovy under Groovy 2
3. Notice that the Script class is NOT in the docs.
4. Run groovydoc -noscripts --destdir=doc . Script.groovy under Groovy 3 or 4.
5. Notice that the Script class is now in the docs.
A similar set of steps can be used for nomainforscripts.