svn commit: r1753382 - /ofbiz/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: r1753382 - /ofbiz/trunk/build.gradle

jleroux@apache.org
Author: jleroux
Date: Tue Jul 19 13:22:32 2016
New Revision: 1753382

URL: http://svn.apache.org/viewvc?rev=1753382&view=rev
Log:
Creates a (short term) Gradle "cleanAnt" task to remove old build dirs - https://issues.apache.org/jira/browse/OFBIZ-7898

Taher proposed off line a better writing for the cleanAntBuild task, using Groovy rather than copying from the old Ant task. He  tested it, so here it is.

Modified:
    ofbiz/trunk/build.gradle

Modified: ofbiz/trunk/build.gradle
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.gradle?rev=1753382&r1=1753381&r2=1753382&view=diff
==============================================================================
--- ofbiz/trunk/build.gradle (original)
+++ ofbiz/trunk/build.gradle Tue Jul 19 13:22:32 2016
@@ -620,26 +620,13 @@ task cleanAll(group: cleanupGroup, depen
     description 'Execute all cleaning tasks.'
 }
 
-task cleanAntBuild(type: Delete, description: "Sort Term Task: clean old build dirs generated by Ant and the old ofbiz.jar in OFBiz root dir, see OFBIZ-7898") {
-    FileCollection applicationsBuildDirs = files("${rootDir}/applications/content/build", "${rootDir}/applications/party/build", "${rootDir}/applications/workeffort/build",
-        "${rootDir}/applications/product/build", "${rootDir}/applications/marketing/build", "${rootDir}/applications/order/build", "${rootDir}/applications/manufacturing/build",
-        "${rootDir}/applications/accounting/build", "${rootDir}/applications/securityext/build", "${rootDir}/applications/humanres/build")
-
-
-    FileCollection frameworkBuildDirs = files("${rootDir}/framework/start/build,base/build", "${rootDir}/framework/entity/build", "${rootDir}/framework/geronimo/build",
-        "${rootDir}/framework/catalina/build", "${rootDir}/framework/security/build", "${rootDir}/framework/service/build", "${rootDir}/framework/entityext/build",
-        "${rootDir}/framework/minilang/build", "${rootDir}/framework/webapp/build", "${rootDir}/framework/widget/build", "${rootDir}/framework/common/build",
-        "${rootDir}/framework/datafile/build", "${rootDir}/framework/testtools/build", "${rootDir}/framework/webtools/build")
-
-    FileCollection specialpurposeBuildDirs = files("${rootDir}/specialpurpose/assetmaint/build", "${rootDir}/specialpurpose/birt/build", "${rootDir}/specialpurpose/ebay/build",
-        "${rootDir}/specialpurpose/ebaystore/build", "${rootDir}/specialpurpose/ecommerce/build", "${rootDir}/specialpurpose/example/build", "${rootDir}/specialpurpose/hhfacility/build",
-        "${rootDir}/specialpurpose/ldap/build", "${rootDir}/specialpurpose/lucene/build", "${rootDir}/specialpurpose/solr/build", "${rootDir}/specialpurpose/oagis/build",
-        "${rootDir}/specialpurpose/pos/build", "${rootDir}/specialpurpose/projectmgr/build", "${rootDir}/specialpurpose/scrum/build", "${rootDir}/specialpurpose/bi/build",
-        "${rootDir}/specialpurpose/webpos/build", "${rootDir}/specialpurpose/passport/build")
-
-    FileCollection buildDirs =  files("ofbiz.jar") + applicationsBuildDirs + frameworkBuildDirs + specialpurposeBuildDirs
-
-    delete(buildDirs)
+task cleanAntBuild(type: Delete, description: "Short Term Task: clean old build dirs generated by Ant and the old ofbiz.jar in OFBiz root dir, see OFBIZ-7898 for details") {
+    ['framework', 'specialpurpose', 'applications'].each { componentGroup ->
+        file(componentGroup).eachDir { component ->
+            delete file(component.toString() + '/build')
+        }
+    }
+    delete 'ofbiz.jar'
 }
 
 // ========== Tasks for OFBiz committers ==========