You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/09/01 03:47:59 UTC

[groovy] branch GROOVY_3_0_X updated: minor refactor

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

paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_3_0_X by this push:
     new ad59ca6094 minor refactor
ad59ca6094 is described below

commit ad59ca60942a350e6823061d7ff8db399dc9d015
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu Sep 1 13:47:50 2022 +1000

    minor refactor
---
 build.gradle                                 | 4 ++--
 src/spec/test/ExtensionModuleSpecTest.groovy | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/build.gradle b/build.gradle
index 6ff683aaf0..a7c8efffb0 100644
--- a/build.gradle
+++ b/build.gradle
@@ -363,8 +363,8 @@ allprojects {
         compileOnly "com.github.spotbugs:spotbugs-annotations:$spotbugsAnnotationsVersion"
     }
 
-    tasks.withType(AbstractCopyTask) {
-        duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+    tasks.withType(AbstractCopyTask) { t ->
+        duplicatesStrategy = t.name.contains('TestResources') ? DuplicatesStrategy.INCLUDE : DuplicatesStrategy.EXCLUDE
     }
 
     tasks.withType(JavaCompile) {
diff --git a/src/spec/test/ExtensionModuleSpecTest.groovy b/src/spec/test/ExtensionModuleSpecTest.groovy
index f1b1ec066b..59af0b9465 100644
--- a/src/spec/test/ExtensionModuleSpecTest.groovy
+++ b/src/spec/test/ExtensionModuleSpecTest.groovy
@@ -1,5 +1,3 @@
-import groovy.test.GroovyTestCase
-
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -18,6 +16,8 @@ import groovy.test.GroovyTestCase
  *  specific language governing permissions and limitations
  *  under the License.
  */
+import groovy.test.GroovyTestCase
+
 class ExtensionModuleSpecTest extends GroovyTestCase {
     void testShouldAddMaxRetriesToInteger() {
         assertScript '''// tag::instance_extension_assert[]