I keep having to add a DuplicatesStrategy DSL block to builds to get them to work under Gradle 7.x.
Here is an example:
Execution failed for task ':processResources'. > Entry README.md is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
There is only one README.md in this particular project so why is there a duplicate? Can someone clarify what this means by “duplicate”? What is it a duplicate in? By “duplicate” does it mean it is being included in more than one sourceSet? How do I make it not be a duplicate?
Also, the JavaDoc linked to in the error message says DuplicatesStrategy defaults to INHERIT. The error messages says “but no duplicate handling strategy has been set”, but a default exists so why do I have to set it explicitly?