Skip to content

Commit eaa5ac8

Browse files
committed
Fix inherited run attributes not respecting buildscript preferences
Not sure how I didn't catch this earlier, but I once again fell for the `(Map/List)Property#convention` trap.
1 parent e6415fe commit eaa5ac8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/net/minecraftforge/gradle/internal/SlimeLauncherOptionsImpl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,14 @@ public SlimeLauncherOptionsInternal inherit(Map<String, RunConfig> configs, Stri
275275
var target = getObjects().newInstance(SlimeLauncherOptionsImpl.class, name);
276276
target.getMainClass().convention(this.getMainClass());
277277
target.getInheritArgs().convention(this.getInheritArgs());
278-
target.getArgs().convention(this.getArgs());
278+
target.getArgs().convention(this.getArgs()).addAll(this.getArgs());
279279
target.getInheritJvmArgs().convention(this.getInheritJvmArgs());
280-
target.getJvmArgs().convention(this.getJvmArgs());
281-
target.getClasspath().convention(this.getClasspath());
280+
target.getJvmArgs().convention(this.getJvmArgs()).addAll(this.getJvmArgs());
281+
target.getClasspath().convention(this.getClasspath()).setFrom(this.getClasspath());
282282
target.getMinHeapSize().convention(this.getMinHeapSize());
283283
target.getMaxHeapSize().convention(this.getMaxHeapSize());
284-
target.getSystemProperties().convention(this.getSystemProperties());
285-
target.getEnvironment().convention(this.getEnvironment());
284+
target.getSystemProperties().convention(this.getSystemProperties()).putAll(this.getSystemProperties());
285+
target.getEnvironment().convention(this.getEnvironment()).putAll(this.getEnvironment());
286286
target.getWorkingDir().convention(this.getWorkingDir().orElse(getProjectLayout().getProjectDirectory().dir("runs/" + sourceSetName + '/' + this.name)));
287287
target.getClient().convention(this.getClient());
288288
return this.inherit(target, sourceSetName, configs, name);

0 commit comments

Comments
 (0)