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

jleroux@apache.org
Author: jleroux
Date: Thu Jun 21 11:41:22 2018
New Revision: 1833997

URL: http://svn.apache.org/viewvc?rev=1833997&view=rev
Log:
Improved: Use `in` and spread operator in `gradlewSubprocess`
(OFBIZ-10431)

No functional change. The idea of using the spread operator is to have less
mutation involved. In Groovy, using operator overloads like in is more idiomatic
than using explicitly the associated method.

Thanks: Mathieu Lirzin

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=1833997&r1=1833996&r2=1833997&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/build.gradle (original)
+++ ofbiz/ofbiz-framework/trunk/build.gradle Thu Jun 21 11:41:22 2018
@@ -1041,8 +1041,6 @@ def taskExistsInproject(fullyQualifiedPr
 }
 
 def gradlewSubprocess(commandList) {
-    def gradleRunner = os.contains('windows') ? 'gradlew.bat' : './gradlew'
-    def fullCommand = [gradleRunner, "--no-daemon"]
-    fullCommand.addAll(commandList)
-    exec { commandLine fullCommand }
-}
+    def gradlew = os.contains('windows') ? 'gradlew.bat' : './gradlew'
+    exec { commandLine(gradlew, "--no-daemon", *commandList) }
+}
\ No newline at end of file