jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimirsitni...@apache.org
Subject [jmeter] branch master updated: Simplify runGui Gradle task
Date Wed, 11 Mar 2020 12:44:38 GMT
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new ea2c56d  Simplify runGui Gradle task
ea2c56d is described below

commit ea2c56dc844c67270a54c4060dfa76f5adce6f18
Author: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
AuthorDate: Wed Mar 11 15:43:39 2020 +0300

    Simplify runGui Gradle task
    
    It enables to debug task execution from IDE
---
 src/dist/build.gradle.kts | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

diff --git a/src/dist/build.gradle.kts b/src/dist/build.gradle.kts
index 5b3d12c..7da9094 100644
--- a/src/dist/build.gradle.kts
+++ b/src/dist/build.gradle.kts
@@ -501,26 +501,22 @@ releaseArtifacts {
     }
 }
 
-val runGui by tasks.registering() {
+val runGui by tasks.registering(JavaExec::class) {
     group = "Development"
     description = "Builds and starts JMeter GUI"
     dependsOn(createDist)
 
-    doLast {
-        javaexec {
-            workingDir = File(project.rootDir, "bin")
-            main = "org.apache.jmeter.NewDriver"
-            classpath("$rootDir/bin/ApacheJMeter.jar")
-            jvmArgs("-Xss256k")
-            jvmArgs("-XX:MaxMetaspaceSize=256m")
-
-            val osName = System.getProperty("os.name")
-            if (osName.contains(Regex("mac os x|darwin|osx", RegexOption.IGNORE_CASE))) {
-                jvmArgs("-Xdock:name=JMeter")
-                jvmArgs("-Xdock:icon=$rootDir/xdocs/images/jmeter_square.png")
-                jvmArgs("-Dapple.laf.useScreenMenuBar=true")
-                jvmArgs("-Dapple.eawt.quitStrategy=CLOSE_ALL_WINDOWS")
-            }
-        }
+    workingDir = File(project.rootDir, "bin")
+    main = "org.apache.jmeter.NewDriver"
+    classpath("$rootDir/bin/ApacheJMeter.jar")
+    jvmArgs("-Xss256k")
+    jvmArgs("-XX:MaxMetaspaceSize=256m")
+
+    val osName = System.getProperty("os.name")
+    if (osName.contains(Regex("mac os x|darwin|osx", RegexOption.IGNORE_CASE))) {
+        jvmArgs("-Xdock:name=JMeter")
+        jvmArgs("-Xdock:icon=$rootDir/xdocs/images/jmeter_square.png")
+        jvmArgs("-Dapple.laf.useScreenMenuBar=true")
+        jvmArgs("-Dapple.eawt.quitStrategy=CLOSE_ALL_WINDOWS")
     }
 }


Mime
View raw message