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

mthl
Author: mthl
Date: Sat Mar 16 20:17:18 2019
New Revision: 1855669

URL: http://svn.apache.org/viewvc?rev=1855669&view=rev
Log:
Improved: Assign ‘jvmArguments’ only once

Using less mutations and a more declarative style simplifies the build
script.

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=1855669&r1=1855668&r2=1855669&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/build.gradle (original)
+++ ofbiz/ofbiz-framework/trunk/build.gradle Sat Mar 16 20:17:18 2019
@@ -52,10 +52,10 @@ ext.os = System.getProperty('os.name').t
 ext.pluginsDir = "${rootDir}/plugins"
 
 // java settings
-List jvmArguments = ['-Xms128M', '-Xmx1024M']
-if (project.hasProperty('jvmArgs')) {
-    jvmArguments = jvmArgs.tokenize()
-}
+List jvmArguments = project.hasProperty('jvmArgs')
+        ? jvmArgs.tokenize()
+        : ['-Xms128M', '-Xmx1024M']
+
 ext.ofbizMainClass = 'org.apache.ofbiz.base.start.Start'
 
 javadoc.failOnError = true