jamesfredley opened a new pull request, #15430: URL: https://github.com/apache/grails-core/pull/15430
## Summary Potential path to allow end-user Grails applications to use modern Java features (17+) and still generate accurate Groovydoc documentation. Gradle's built-in Groovydoc task does not expose the `javaVersion` parameter (added in Groovy 4.0.27 via [GROOVY-11668](https://issues.apache.org/jira/browse/GROOVY-11668)), so projects using Java 17+ features (sealed classes, records, pattern matching, text blocks, etc.) fail to generate Groovydoc. This PR publishes the `GroovydocEnhancerPlugin` (from #15420) as a standalone Gradle plugin that end-user Grails applications can consume. ## Changes ### New Published Module: `grails-gradle-groovydoc` - **Maven coordinate**: `org.apache.grails.gradle:grails-gradle-groovydoc` - **Plugin ID**: `org.apache.grails.gradle.groovydoc` - Located in `grails-gradle/groovydoc/` following the existing grails-gradle subproject pattern - Automatically included in `grails-gradle-bom` (subproject auto-inclusion) - Manually added to `grails-bom` via `gradleBuildProjects` map for end-user app BOM resolution ### Forge Integration (DefaultFeature) - New `GroovydocEnhancer` feature class applied to **all** generated Grails applications by default - Adds `grails-gradle-groovydoc` as a buildscript classpath dependency (version managed by `grails-bom`) - Applies `org.apache.grails.gradle.groovydoc` plugin via `apply plugin` ### Profile Integration - Updated `base/profile.yml` to include the plugin for `grails` CLI-based app generation - Both forge and profile paths now generate apps with Groovydoc enhancer support ### Build-Logic - `build-logic/` retains its own copy of the plugin for the framework build itself (bootstrap constraint - build-logic cannot depend on grails-gradle artifacts without circular dependency) - The published `grails-gradle-groovydoc` module is the canonical version for end-user consumption ## Architecture Note There are two copies of the enhancer plugin: 1. **`build-logic/plugins/`** - convention plugin for building grails-core itself (unpublished, internal) 2. **`grails-gradle/groovydoc/`** - published plugin for end-user Grails apps This duplication exists because `build-logic` is evaluated before `grails-gradle` builds, creating a bootstrap dependency that prevents `build-logic` from consuming the published artifact directly. Future work could explore composite build substitution or a shared source set to eliminate this duplication. ## Testing - `grails-gradle-groovydoc` builds successfully standalone - `grails-bom` POM generation succeeds with the new artifact - `grails-forge-core` compiles with the new feature class - Code style checks pass ## Depends On - #15420 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
