Skip to content

Commit 36752fa

Browse files
committed
Fix inherited run attributes not respecting buildscript preferences
Copied from MinecraftForge/ForgeGradle@eaa5ac8
1 parent dc417e7 commit 36752fa

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/groovy/net/minecraftforge/forgedev/tasks/launcher/SlimeLauncherOptionsImpl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,13 @@ public void environment(Provider<? extends Map<String, ?>> properties) {
263263
public SlimeLauncherOptionsInternal inherit(Map<String, RunConfig> configs, String sourceSetName, String name) {
264264
var target = getObjects().newInstance(SlimeLauncherOptionsImpl.class, name);
265265
target.getMainClass().convention(this.getMainClass());
266-
target.getArgs().convention(this.getArgs());
267-
target.getJvmArgs().convention(this.getJvmArgs());
268-
target.getClasspath().convention(this.getClasspath());
266+
target.getArgs().convention(this.getArgs()).addAll(this.getArgs());
267+
target.getJvmArgs().convention(this.getJvmArgs()).addAll(this.getJvmArgs());
268+
target.getClasspath().convention(this.getClasspath()).setFrom(this.getClasspath());
269269
target.getMinHeapSize().convention(this.getMinHeapSize());
270270
target.getMaxHeapSize().convention(this.getMaxHeapSize());
271-
target.getSystemProperties().convention(this.getSystemProperties());
272-
target.getEnvironment().convention(this.getEnvironment());
271+
target.getSystemProperties().convention(this.getSystemProperties()).putAll(this.getSystemProperties());
272+
target.getEnvironment().convention(this.getEnvironment()).putAll(this.getEnvironment());
273273
target.getWorkingDir().convention(this.getWorkingDir().orElse(getProjectLayout().getProjectDirectory().dir("runs/" + sourceSetName + '/' + this.name)));
274274
target.getClient().convention(this.getClient());
275275
return this.inherit(target, sourceSetName, configs, name);

0 commit comments

Comments
 (0)