lkishalmi commented on a change in pull request #1416: add read jvmargs from
~/.gradle/gradle.properties.
URL: https://github.com/apache/netbeans/pull/1416#discussion_r312730663
##########
File path:
groovy/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java
##########
@@ -803,7 +812,34 @@ public void setStackTrace(StackTrace st) {
}
public void configure(ConfigurableLauncher launcher) {
- launcher.setJvmArguments(getArgs(EnumSet.of(SYSTEM)));
+ List<String> jvmargs = getArgs(EnumSet.of(SYSTEM));
+ String userHomeDir = System.getProperty("user.home");
+ File gradlePropertiesFile = Paths.get(userHomeDir, ".gradle",
"gradle.properties").toFile();
+ if (gradlePropertiesFile.exists()){
+ Properties pps = new Properties();
+ InputStream in = null;
+ try {
+ in = new BufferedInputStream(new
FileInputStream(gradlePropertiesFile));
+ pps.load(in);
+ if (pps.containsKey("org.gradle.jvmargs")){
+ String jvmargs_value =
pps.getProperty("org.gradle.jvmargs");
Review comment:
Constant declaration would be nice, tough a //NOI18N shall be added.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists