Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ protected void jvmArgs(Object... args) {
this.jvmArgs.addAll(Arrays.asList(args));
}

public void setJvmArgs(List<Object> args) {
this.jvmArgs.clear();
this.jvmArgs.addAll(args);
}

public List<Object> getJvmArgs() {
return this.jvmArgs;
}

protected void argIfEnabled(Boolean condition, String arg) {
if (Boolean.TRUE.equals(condition)) {
args(arg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package de.richsource.gradle.plugins.gwt;

import java.io.File;
import java.util.List;
import java.util.concurrent.Callable;

import org.gradle.api.internal.IConventionAware;
Expand Down Expand Up @@ -66,6 +67,7 @@ protected void addArgs() {
argOnOff(getOverlappingSourceWarnings(), "-overlappingSourceWarnings", "-nooverlappingSourceWarnings");
argOnOff(getSaveSource(), "-saveSource", "-nosaveSource");
argIfSet("-saveSourceOutput", getSaveSourceOutput());
jvmArgs(getJvmArgs().toArray());
}

protected void configure(final GwtCompileOptions options) {
Expand Down Expand Up @@ -411,4 +413,14 @@ public File getSaveSourceOutput() {
public void setSaveSourceOutput(File saveSourceOutput) {
options.setSaveSourceOutput(saveSourceOutput);
}

@Override
public void setJvmArgs(Object... args) {
options.setJvmArgs(args);
}

@Override
public List<Object> getJvmArgs() {
return options.getJvmArgs();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,12 @@ public JsInteropMode call() throws Exception {
return extension.getJsInteropMode();
}
});
conventionMapping.map("jvmArgs", new Callable<List<Object>>() {
@Override
public List<Object> call() throws Exception {
return extension.getJvmArgs();
}
});
}});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package de.richsource.gradle.plugins.gwt;

import java.io.File;
import java.util.List;


/**
Expand Down Expand Up @@ -233,4 +234,9 @@ public interface GwtCompileOptions {
* @param saveSourceOutput the saveSourceOutput to set
*/
void setSaveSourceOutput(File saveSourceOutput);

List<Object> getJvmArgs();

void setJvmArgs(Object... args);

}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class GwtPluginExtension {
private final GwtSuperDevOptions superDev = new GwtSuperDevOptionsImpl();
private final GwtCompileOptions compiler = new GwtCompileOptionsImpl();
private final GwtTestOptions test = new GwtTestOptions();
private List<Object> jvmArgs = new ArrayList<Object>();

public List<String> getModules() {
return modules;
Expand Down Expand Up @@ -245,4 +246,13 @@ public String getModulePathPrefix() {
public void setModulePathPrefix(String modulePathPrefix) {
this.modulePathPrefix = modulePathPrefix;
}

public List<Object> getJvmArgs() {
return jvmArgs;
}

public void setJvmArgs(List<Object> jvmArgs) {
this.jvmArgs.clear();
this.jvmArgs.addAll(jvmArgs);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
package de.richsource.gradle.plugins.gwt.internal;

import java.io.File;
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;

import de.richsource.gradle.plugins.gwt.GwtCompileOptions;
import de.richsource.gradle.plugins.gwt.Namespace;
Expand Down Expand Up @@ -61,6 +64,8 @@ public class GwtCompileOptionsImpl implements GwtCompileOptions {
private Boolean saveSource;
private File saveSourceOutput;

private List<Object> jvmArgs = new ArrayList<Object>();

/** {@inheritDoc} */
@Override
public Integer getLocalWorkers() {
Expand Down Expand Up @@ -361,4 +366,15 @@ public File getSaveSourceOutput() {
public void setSaveSourceOutput(File saveSourceOutput) {
this.saveSourceOutput = saveSourceOutput;
}

@Override
public List<Object> getJvmArgs() {
return jvmArgs;
}

@Override
public void setJvmArgs(Object... args) {
jvmArgs.addAll(Arrays.asList(args));
}

}