Since upgrading from Gradle 6.8.3 to Gradle 7.0.2,...
# gradle
j
Since upgrading from Gradle 6.8.3 to Gradle 7.0.2, my builds are failing with this message:
Copy code
Entry antlr/SQLLexer.g4 is a duplicate but no duplicate handling strategy has been set. Please refer to <https://docs.gradle.org/7.0.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy> for details.
and it's failing on a different non-JVM file every time, sometimes a PNG, sometimes a ANTLR g4 file The link says I need to set the
DuplicatesStrategy
in the CopyPlugin, any idea what that means?
this seems to fix it, adding it to all the sub projects where I'm getting this error:
Copy code
tasks.withType<Copy> {
	duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
v
I would prefer finding out why the files are there twice. With that setting you just copy it twice and let the second one overwrite the first one. If they are the same, it might be ok, but usually it is better to find out what is set up wrongly.