Fix: (build) Defer shadowJar output access to fix exclusive lock issue#4805
Merged
NotMyFault merged 2 commits intoIntellectualSites:mainfrom Dec 22, 2025
Merged
Fix: (build) Defer shadowJar output access to fix exclusive lock issue#4805NotMyFault merged 2 commits intoIntellectualSites:mainfrom
NotMyFault merged 2 commits intoIntellectualSites:mainfrom
Conversation
dordsor21
reviewed
Dec 16, 2025
build.gradle.kts
Outdated
| .map { task -> (task as Jar).archiveFile } | ||
| .toTypedArray()) | ||
| // Defer the access to the execution phase. | ||
| pluginJars(project.files(plotSquaredShadowJarProviders)) |
Member
There was a problem hiding this comment.
Not sure we need to move the logic further up into a variable but makes sense otherwise
Contributor
Author
There was a problem hiding this comment.
You're totally right. my bad.
Avoids eager task output resolution for runServer tasks Uses Provider API for shadowJar output in runServer tasks
dordsor21
approved these changes
Dec 22, 2025
pull bot
pushed a commit
to Craftstuebchen/PlotSquared
that referenced
this pull request
Dec 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Description
This issue is only present when running the project with
org.gradle.parallel=trueThe previous implementation accessed the
.archiveFileproperty directly during the configuration phase. This is not allowed.This eager access forces Gradle to resolve dependent configs inmmediately, potentially leading to this error when running in parallel or with Configuration Cache.
This ensures that the output file path is only resolved during the Execution Phase, where Gradle holds the necessary locks, thereby eliminating the unsafe access and improving build stability ;)
Gradle Docs
Submitter Checklist
@since TODO.