svn commit: r1854590 - /ofbiz/ofbiz-framework/trunk/build.gradle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1854590 - /ofbiz/ofbiz-framework/trunk/build.gradle

mthl
Author: mthl
Date: Fri Mar  1 14:04:59 2019
New Revision: 1854590

URL: http://svn.apache.org/viewvc?rev=1854590&view=rev
Log:
02ca904efc Improved: Rewrite ‘getDirectoryInActiveComponentsIfExists’ in build script (OFBIZ-10695)

Modified:
    ofbiz/ofbiz-framework/trunk/build.gradle

Modified: ofbiz/ofbiz-framework/trunk/build.gradle
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/build.gradle?rev=1854590&r1=1854589&r2=1854590&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/build.gradle (original)
+++ ofbiz/ofbiz-framework/trunk/build.gradle Fri Mar  1 14:04:59 2019
@@ -1050,14 +1050,9 @@ def spawnProcess(command) {
 }
 
 def getDirectoryInActiveComponentsIfExists(String dirName) {
-    def dirInComponents = []
-    activeComponents().each { component ->
-        def subDir = file(component.toString() + '/' + dirName)
-        if (subDir.exists()) {
-            dirInComponents.add subDir
-        }
-    }
-    return dirInComponents
+    activeComponents()
+        .collect { file(it.toString() + '/' + dirName) }
+        .findAll { it.exists() }
 }
 
 def deleteAllInDirWithExclusions(dirName, exclusions) {