remove accidental connection between task outputs #1709
Merged
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.
Before this PR
If a project has both the com.palantir.recommended-product-dependencies plugin and one of the distribution plugins (asset or service) then gradle8+ will fail with an error like this:
The reason is that both the resolveProductDependencies and the compileRecommendedProductDependencies tasks would write into a directory called build/product-dependencies. The RecommendedProductDependenciesPlugin adds that directory as a resources source. It properly adds compileRecommendedProductDependencies as a dependency of processResources. The fact that resolveProductDependencies gets involved is a coincidence - we just happened to name it's output the same thing even though it's in a different project and plugin.
The two plugins should never be applied to the same project - something shouldn't be both an API jar with recommended dependencies and an SLS distribution that consumes them. But many repos do have both applied (likely accidentally), so this just makes it clear that the two outputs have nothing to do with each other. I may do another PR to enforce this (like we do for the Asset and Service plugins), but I want to get a release out that solves the problem first because it's blocking some repos from upgrading to gradle8.
After this PR
==COMMIT_MSG==
==COMMIT_MSG==
Possible downsides?