FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Resolve registerDependencies output lazily so a custom build directory applies by jjh75607 · Pull Request #3022 · diffplug/spotless · GitHub

Resolve registerDependencies output lazily so a custom build directory applies - #3022

Merged
nedtwigg merged 2 commits into
diffplug:mainfrom
jjh75607:fix/register-dependencies-build-dir
Aug 18, 2026
Merged

Resolve registerDependencies output lazily so a custom build directory applies#3022
nedtwigg merged 2 commits into
diffplug:mainfrom
jjh75607:fix/register-dependencies-build-dir

Conversation

Copy link
Copy Markdown
Contributor

Fixes #2114

setup() resolved the build directory eagerly and stored a plain File behind @OutputFile.
A layout.buildDirectory set later in the build script was therefore ignored. The marker file
stayed under the default build/.

getUnitOutput() is now a RegularFileProperty fed from getBuildDirectory().file(...), so
it resolves at execution time. The field was only read inside this task, so nothing else
changes.

One note on the reproduction. On current main this task is only registered by
SpotlessExtensionPredeclare. The test therefore drives it through spotlessPredeclare, not
the plain spotless { java {} } from the original report. I could not reproduce it without
predeclare.

nedtwigg merged commit 98547dc into diffplug:main Aug 18, 2026
20 checks passed
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gradle: Unable to recognize layout.buildDirectory in build.gradle.

2 participants


Back | FazBrowse Home | New Git URL