groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [groovy] branch master updated: GROOVY-9105: tweak to get source extension from config
Date Sat, 04 May 2019 06:27:42 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 7a49adb  GROOVY-9105: tweak to get source extension from config
7a49adb is described below

commit 7a49adb6862cb4f94f6ebb8ba015fb964298a0b3
Author: Paul King <paulk@asert.com.au>
AuthorDate: Sat May 4 16:27:14 2019 +1000

    GROOVY-9105: tweak to get source extension from config
---
 .../src/main/java/org/codehaus/groovy/ant/GenerateStubsTask.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/GenerateStubsTask.java
b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/GenerateStubsTask.java
index 8ae2096..2123d65 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/GenerateStubsTask.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/GenerateStubsTask.java
@@ -56,8 +56,9 @@ public class GenerateStubsTask extends CompileTaskSupport {
                     cu.addSource(file);
                 }
 
-                // Increment the count for each non/java src we found
-                if (includeName.endsWith(".groovy")) {
+                // Increment the count for each groovy src we found
+                // TODO support config.getScriptExtensions()?
+                if (includeName.endsWith(config.getDefaultScriptExtension())) {
                     count++;
                 }
             }
@@ -73,6 +74,7 @@ public class GenerateStubsTask extends CompileTaskSupport {
     }
 
     private boolean isSource(String includeName) {
-        return includeName.endsWith(".groovy") || includeName.endsWith(".java");
+        // TODO support config.getScriptExtensions()?
+        return includeName.endsWith(config.getDefaultScriptExtension()) || includeName.endsWith(".java");
     }
 }


Mime
View raw message