Copilot commented on code in PR #2544:
URL: https://github.com/apache/groovy/pull/2544#discussion_r3277638765


##########
build-logic/src/main/groovy/org/apache/groovy/gradle/SharedConfiguration.groovy:
##########
@@ -95,6 +103,27 @@ class SharedConfiguration {
         isCi
     }
 
+    private static boolean isDocumentationTask(String taskName) {
+        String normalized = taskName.toLowerCase(Locale.ROOT)
+        normalized.contains('asciidoc') ||
+                normalized.contains('asciidoctor') ||
+                normalized.contains('javadoc') ||
+                normalized.contains('groovydoc') ||
+                normalized.endsWith('doc') ||
+                normalized.endsWith(':doc') ||
+                normalized.contains('docgdk') ||
+                normalized.endsWith('dist') ||
+                normalized.endsWith(':dist')

Review Comment:
   `isDocumentationTask` only flags the aggregate `dist` task 
(`endsWith('dist')`), but not the distribution tasks that actually build full 
artifacts like `distSdk` (or qualified `:subproject:distSdk`). As a result, 
running `./gradlew distSdk` will leave 
`sharedConfiguration.isDocumentationBuild` false, so the distribution build 
skips applying the Asciidoctor plugins and omits the rendered documentation 
from the SDK/docs zips.
   
   Consider broadening the predicate to treat any task name that starts with 
`dist` (or contains `:dist`) as a documentation build trigger, or explicitly 
include `distSdk`/`distDoc` (and their qualified variants).
   



-- 
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]

Reply via email to