Skip to content

Commit

Permalink
Merge pull request #93 from lightsuner/master
Browse files Browse the repository at this point in the history
feature: add ability to use array of commands as runJavaParameters
  • Loading branch information
FibreFoX authored Dec 28, 2017
2 parents 760e79f + bcb10db commit 5b90599
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ public class JavaFXGradlePluginExtension {
private String runJavaParameter = null;
private String runAppParameter = null;

private List<String> runJavaParameters = null;

// generic settings (not present on javafx-maven-plugin)
private String alternativePathToJarFile = null;
private boolean usePatchedJFXAntLib = true;
Expand Down Expand Up @@ -629,4 +631,11 @@ public void setCheckForAbsolutePaths(boolean checkForAbsolutePaths) {
this.checkForAbsolutePaths = checkForAbsolutePaths;
}

public List<String> getRunJavaParameters() {
return runJavaParameters;
}

public void setRunJavaParameters(List<String> runJavaParameters) {
this.runJavaParameters = runJavaParameters;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,21 @@ public void jfxrun(Project project) {

List<String> command = new ArrayList<>();
command.add(getEnvironmentRelativeExecutablePath(ext.isUseEnvironmentRelativeExecutables()) + "java");

Optional.ofNullable(ext.getRunJavaParameter()).ifPresent(runJavaParameter -> {
if( runJavaParameter.trim().isEmpty() ){
return;
}
command.add(runJavaParameter);
});

Optional.ofNullable(ext.getRunJavaParameters()).ifPresent(runJavaParameters -> {
if( runJavaParameters.isEmpty() ){
return;
}
command.addAll(runJavaParameters);
});

command.add("-jar");
command.add(ext.getJfxMainAppJarName());
Optional.ofNullable(ext.getRunAppParameter()).ifPresent(runAppParameter -> {
Expand Down

0 comments on commit 5b90599

Please sign in to comment.