You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mt...@apache.org on 2019/03/01 14:04:59 UTC

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

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) {