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

mthl
Author: mthl
Date: Sun Mar 17 00:13:08 2019
New Revision: 1855678

URL: http://svn.apache.org/viewvc?rev=1855678&view=rev
Log:
Improved: Provide multi-arguments to the ‘Exec#args’ method

Previously only one argument at a time was passed to the ‘Exec#args’
method.  Since it is possible to pass multiple arguments we can remove
some syntax redudancy.

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=1855678&r1=1855677&r2=1855678&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/build.gradle (original)
+++ ofbiz/ofbiz-framework/trunk/build.gradle Sun Mar 17 00:13:08 2019
@@ -383,16 +383,13 @@ task loadTenant(group: ofbizServer, desc
     createOfbizCommandTask('executeLoadTenant', [], jvmArguments, false)
 
     if (project.hasProperty('tenantId')) {
-        executeLoadTenant.args '--load-data'
-        executeLoadTenant.args "delegator=default#${tenantId}"
+        executeLoadTenant.args '--load-data', "delegator=default#${tenantId}"
     }
     if (project.hasProperty('tenantReaders')) {
-        executeLoadTenant.args '--load-data'
-        executeLoadTenant.args "readers=${tenantReaders}"
+        executeLoadTenant.args '--load-data', "readers=${tenantReaders}"
     }
     if (project.hasProperty('tenantComponent')) {
-        executeLoadTenant.args '--load-data'
-        executeLoadTenant.args "component=${tenantComponent}"
+        executeLoadTenant.args '--load-data', "component=${tenantComponent}"
     }
 
     executeLoadTenant.doFirst {
@@ -472,17 +469,14 @@ task createTenant(group: ofbizServer, de
      * because we are in the configuration phase. We cannot
      * set the parameters at the execution phase. */
     if (project.hasProperty('tenantId')) {
-        loadTenantData.args '--load-data'
-        loadTenantData.args "delegator=default#${tenantId}"
-
-        loadTenantAdminUserLogin.args '--load-data'
-        loadTenantAdminUserLogin.args "delegator=default#${tenantId}"
-        loadTenantAdminUserLogin.args '--load-data'
-        loadTenantAdminUserLogin.args "file=${rootDir}/runtime/tmp/tmpFilteredUserLogin.xml"
+        loadTenantData.args '--load-data', "delegator=default#${tenantId}"
+        loadTenantAdminUserLogin.args(
+            '--load-data', "delegator=default#${tenantId}",
+            '--load-data', "file=${rootDir}/runtime/tmp/tmpFilteredUserLogin.xml"
+        )
     }
     if (project.hasProperty('tenantReaders')) {
-        loadTenantData.args '--load-data'
-        loadTenantData.args "readers=${tenantReaders}"
+        loadTenantData.args '--load-data', "readers=${tenantReaders}"
     }
 
     dependsOn(loadTenantAdminUserLogin)
@@ -996,9 +990,7 @@ def createOfbizCommandTask(taskName, arg
         debug = isDebugMode
         classpath = files(ofbizJarName)
         main = ofbizMainClass
-        arguments.each { argument ->
-            args argument
-        }
+        args arguments
 
         if (taskName ==~ /^ofbiz.*--test.*/
             || taskName ==~ /^ofbiz.*-t.*/) {