Skip to content

Fix release workflow for Gradle 8.6 compatibility#586

Merged
wmoustafa merged 2 commits intolinkedin:masterfrom
YogeshKothari26:fix-release-changelog-gradle8
Mar 25, 2026
Merged

Fix release workflow for Gradle 8.6 compatibility#586
wmoustafa merged 2 commits intolinkedin:masterfrom
YogeshKothari26:fix-release-changelog-gradle8

Conversation

@YogeshKothari26
Copy link
Copy Markdown
Contributor

@YogeshKothari26 YogeshKothari26 commented Mar 24, 2026

Summary

The Gradle 6.7.1 → 8.6 upgrade (#580) introduced strict task dependency validation that breaks the release workflow. The generateChangelog task from shipkit shares the project root directory with compilation tasks, and Gradle 8 flags this as an implicit dependency.

This was not caught in CI because the release tasks (githubRelease, publishToSonatype) are only run in the release workflow, not in the build/test checks.

Fix

Add mustRunAfter declaration to generateChangelog — this is solution #3 from Gradle's own validation guide:

Declare an explicit dependency on ':coral-common:compileJava' from ':generateChangelog' using Task#mustRunAfter.

See also: Gradle docs on task ordering.

Test plan

  • ./gradlew githubRelease --dry-run passes locally
  • Fix is isolated to gradle/shipkit.gradle — no production code changes

Note

Tested with --dry-run which validates task configuration but does not execute tasks. If the release still fails after merge, the fallback fix would be to redirect generateChangelog's output to a dedicated directory to avoid the directory overlap entirely.

The generateChangelog task from shipkit shares the project root directory
with compilation tasks. Gradle 8 enforces strict implicit dependency
validation and fails when tasks use overlapping directories without
declaring dependencies. Add mustRunAfter to resolve the ordering.
@wmoustafa wmoustafa merged commit 5628613 into linkedin:master Mar 25, 2026
1 check passed
YogeshKothari26 added a commit to YogeshKothari26/coral that referenced this pull request Mar 25, 2026
The previous fix (linkedin#586) only listed 5 specific task names, but the
release workflow runs additional tasks (javadoc, javadocJar,
signJavaLibraryPublication, sourcesJar, etc.) that also conflict.
Use mustRunAfter(subprojects.collect { it.tasks }) to cover all
current and future subproject tasks.

https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency
wmoustafa pushed a commit that referenced this pull request Mar 25, 2026
The previous fix (#586) only listed 5 specific task names, but the
release workflow runs additional tasks (javadoc, javadocJar,
signJavaLibraryPublication, sourcesJar, etc.) that also conflict.
Use mustRunAfter(subprojects.collect { it.tasks }) to cover all
current and future subproject tasks.

https://docs.gradle.org/8.6/userguide/validation_problems.html#implicit_dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants