[ 
https://issues.apache.org/jira/browse/GROOVY-12019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18082452#comment-18082452
 ] 

ASF GitHub Bot commented on GROOVY-12019:
-----------------------------------------

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).
   





> Enable gradle configuration cache
> ---------------------------------
>
>                 Key: GROOVY-12019
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12019
>             Project: Groovy
>          Issue Type: Improvement
>          Components: build
>            Reporter: Daniel Sun
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to