You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by ja...@apache.org on 2026/05/01 16:46:18 UTC
(grails-static-website) 01/01: Order renderGuide_* tasks after main-site rendering tasks (refs #354)
This is an automated email from the ASF dual-hosted git repository.
jamesfredley pushed a commit to branch hotfix-implicit-deps
in repository https://gitbox.apache.org/repos/asf/grails-static-website.git
commit f628ae1940dbcec49dfd23748a7a196e3190b2e7
Author: James Fredley <ja...@users.noreply.github.com>
AuthorDate: Fri May 1 12:46:12 2026 -0400
Order renderGuide_* tasks after main-site rendering tasks (refs #354)
Gradle 9.4 fails the build when one task uses the directory output of another
without an explicit or implicit dependency relationship. The renderGuide_*
tasks read build/staged-guides/<name>/<v>/ as input, and renderSite/genPlugins/
renderBlog/renderMinutes/genProfilesPage/genHtaccess/genBskyAtProtoDid/
genSitemap/copyAssets/genDocsPage/genDownloads/genFaq/genGuides all declare
build/ as their @OutputDirectory (overlap), which Gradle treats as an implicit
dependency violation when both task chains run under publishMainSite.
Fix: declare mustRunAfter against each main-site task. mustRunAfter only orders
if both are scheduled, so calling buildAllGuides standalone still works; calling
publishMainSite (which schedules both chains) gets correct ordering with no
validation errors.
Local verification: ./gradlew clean build buildAllGuides --no-daemon --no-configuration-cache produces BUILD SUCCESSFUL with 270 tasks executed and no validation errors.
Assisted-by: claude-code:claude-4.6-opus
---
.../main/groovy/website/gradle/RenderGuidesPlugin.groovy | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/buildSrc/src/main/groovy/website/gradle/RenderGuidesPlugin.groovy b/buildSrc/src/main/groovy/website/gradle/RenderGuidesPlugin.groovy
index 1597d45f4dc..4df191f8395 100644
--- a/buildSrc/src/main/groovy/website/gradle/RenderGuidesPlugin.groovy
+++ b/buildSrc/src/main/groovy/website/gradle/RenderGuidesPlugin.groovy
@@ -230,6 +230,19 @@ class RenderGuidesPlugin {
// copy byte-clean for re-vendor.
task.notCompatibleWithConfigurationCache(
'Vendored grails.doc.gradle.PublishGuideTask references Project + AntBuilder')
+ // Several main-site rendering tasks declare build/ as their
+ // @OutputDirectory (they write to build/dist/<x>.html), which
+ // overlaps with build/staged-guides/<name>/<v>/. Without
+ // explicit ordering, Gradle 9.4 raises a fatal validation
+ // error: 'renderGuide_* uses output of :renderSite/:genPlugins/
+ // :renderBlog/:renderMinutes/:genProfilesPage without declaring
+ // dependency'. mustRunAfter resolves the ordering without
+ // forcing those tasks to be invoked when only renderGuide_* is
+ // scheduled.
+ task.mustRunAfter('renderSite', 'genPlugins', 'renderBlog',
+ 'renderMinutes', 'genProfilesPage', 'genHtaccess',
+ 'genBskyAtProtoDid', 'genSitemap', 'copyAssets',
+ 'genDocsPage', 'genDownloads', 'genFaq', 'genGuides')
}
wiring.renderTaskNames << renderTaskName