Preserve JVM args when auto-configuring a Java agent in Gradle bootRun

Fixes #1411
This commit is contained in:
Andy Wilkinson
2014-08-21 15:25:02 +01:00
parent c75782424c
commit 9717b7d840
5 changed files with 160 additions and 0 deletions

View File

@@ -108,6 +108,11 @@ public class AgentTasksEnhancer implements Action<Project> {
if (this.noverify != null && this.noverify) {
exec.jvmArgs("-noverify");
}
Iterable<?> defaultJvmArgs = exec.getConventionMapping().getConventionValue(
null, "jvmArgs", false);
if (defaultJvmArgs != null) {
exec.jvmArgs(defaultJvmArgs);
}
}
}