No implicit or explicit dependency on rncToXsd
task causes caching to be disabled for some tasks
#13668
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.
This change addresses a deprecation warning causing caching to be disabled for some tasks. The deprecation is caused by
rncToXsd
writing files tosrc/main/resources
of thespring-security-config
project. That directory is used as an input to several tasks, so there is ambiguity when computing the task graph. Gradle must therefore disable caching for these tasks.Prior to this change, a build scan would show us that caching for
rncToXsd
is disabled to ensure correctness. We can also see the corresponding deprecation warnings. To resolve this, the output ofrncToXsd
is wired to the main resources source set. This informs Gradle that it must executerncToXsd
before any task using the main resources as an input.Resolving this deprecation warning caused the same issue for the
checkstyleNohttp
task of the root project. To address this, thecheckstyleNohttp
task is made aware of the output of therncToXsd
task fromspring-security-config
. This makes sure therncToXsd
task is executed before running thecheckstyleNohttp
task.Now with these changes, we can see caching is never disabled to ensure correctness and the deprecation warnings are gone. It's worth noting these deprecation warnings prevented the upgrade to Gradle 8.0. Only 2 deprecation warnings remain preventing the upgrade.