diff --git a/desktop/build.gradle.kts b/desktop/build.gradle.kts index f88dec330c..ef05ef7f60 100644 --- a/desktop/build.gradle.kts +++ b/desktop/build.gradle.kts @@ -25,7 +25,10 @@ val deployFolder = file("../deploy") // and https://github.com/yairm210/Unciv/issues/5679 val jvmArgsForMac = listOf("-XstartOnFirstThread", "-Djava.awt.headless=true") tasks.register("run") { - jvmArgs = jvmArgsForMac + jvmArgs = mutableListOf() + if ("mac" in System.getProperty("os.name").toLowerCase()) + (jvmArgs as MutableList).addAll(jvmArgsForMac) + // These are non-standard, only available/necessary on Mac. dependsOn(tasks.getByName("classes")) @@ -159,4 +162,4 @@ tasks.register("zipLinuxFilesForJar") { archiveFileName.set("linuxFilesForJar.zip") from(file("linuxFilesForJar")) destinationDirectory.set(deployFolder) -} \ No newline at end of file +}