Skip to content

Support Gradle's configuration cache - #478

Open
DragonFSKY wants to merge 1 commit into
spring-io:mainfrom
DragonFSKY:fix-gh-461-configuration-cache
Open

Support Gradle's configuration cache#478
DragonFSKY wants to merge 1 commit into
spring-io:mainfrom
DragonFSKY:fix-gh-461-configuration-cache

Conversation

@DragonFSKY

Copy link
Copy Markdown

Closes gh-461

CheckFormat currently accesses Task.project during task execution when it builds the formatting-violation message. Gradle configuration-cache validation rejects that access.

This change injects ProjectLayout into CheckFormat and uses its project directory to preserve the existing project-relative violation paths without accessing Task.project at execution time. It also adds a Gradle 9.1 TestKit regression that runs the failing check twice, verifies that the violation is still reported, and confirms that the second run reuses the configuration cache.

Tests:

  • ./gradlew check --no-daemon
  • ./mvnw clean install --batch-mode --no-transfer-progress

Closes spring-iogh-461

Signed-off-by: dragonfsky <dragonfsky@gmail.com>
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.

Support Gradle's configuration cache

1 participant