You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2021/09/18 09:39:37 UTC

[groovy] 01/01: Try to set duplicate handling strategy of Copy task

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch GROOVY-10242
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit 4325fc75113fe0a0ea959bc32ae00a363d536981
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sat Sep 18 17:24:24 2021 +0800

    Try to set duplicate handling strategy of Copy task
    
    Execution failed for task ':asciidoctor'.
    > Entry assets/css/style.css 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.
---
 build.gradle | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/build.gradle b/build.gradle
index 7507b67..64a3bc5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -181,8 +181,14 @@ configurations {
     }
 }
 
-tasks.withType(AbstractCopyTask).configureEach {
-    it.duplicatesStrategy = DuplicatesStrategy.WARN
+allprojects {
+    tasks.withType(AbstractCopyTask).configureEach {
+        it.duplicatesStrategy = DuplicatesStrategy.WARN
+    }
+
+    tasks.withType(Copy).configureEach {
+        it.duplicatesStrategy = DuplicatesStrategy.WARN
+    }
 }
 
 tasks.named('jar') {