diff --git a/main/src/plugin/Run.kt b/main/src/plugin/Run.kt index 2b876ae..7981390 100644 --- a/main/src/plugin/Run.kt +++ b/main/src/plugin/Run.kt @@ -62,7 +62,7 @@ class MindustryRunPlugin : Plugin { if (dataDirLocalProp != null) LocalDataDirLoc(dataDirLocalProp) else client.dataDir ) - mindustryFile.set(proj.provider { + gameFile.set(proj.provider { resolveClient.get().outputs.files.singleFile }) val modpack = x.findModpackByName(client.modpack) @@ -105,7 +105,7 @@ class MindustryRunPlugin : Plugin { if (dataDirLocalProp != null) LocalDataDirLoc(dataDirLocalProp) else server.dataDir ) - mindustryFile.set(proj.provider { + gameFile.set(proj.provider { resolveServer.get().outputs.files.singleFile }) val modpack = x.findModpackByName(server.modpack) diff --git a/main/src/task/ModHjsonGenerate.kt b/main/src/task/ModHjsonGenerate.kt index 205b56d62..1375db7 100644 --- a/main/src/task/ModHjsonGenerate.kt +++ b/main/src/task/ModHjsonGenerate.kt @@ -6,7 +6,6 @@ import io.github.liplum.dsl.prop import io.github.liplum.mindustry.ModMeta.Companion.toHjson import org.gradle.api.DefaultTask import org.gradle.api.tasks.Input -import org.gradle.api.tasks.Optional import org.gradle.api.tasks.OutputFile import org.gradle.api.tasks.TaskAction diff --git a/main/src/task/RunClient.kt b/main/src/task/RunClient.kt index 9f171b2..48ef571 100644 --- a/main/src/task/RunClient.kt +++ b/main/src/task/RunClient.kt @@ -30,7 +30,7 @@ open class RunClient : RunMindustryAbstract() { } } standardInput = System.`in` - args = listOf(mindustryFile.get().absolutePath) + startupArgs.get() + args = listOf(gameFile.get().absolutePath) + startupArgs.get() if (Os.isFamily(Os.FAMILY_MAC)) { // Lwjgl3 application requires it to run on macOS jvmArgs = (jvmArgs ?: mutableListOf()) + "-XstartOnFirstThread" diff --git a/main/src/task/RunMindustryAbstract.kt b/main/src/task/RunMindustryAbstract.kt index 0dd4f04..a2268c9 100644 --- a/main/src/task/RunMindustryAbstract.kt +++ b/main/src/task/RunMindustryAbstract.kt @@ -6,7 +6,7 @@ import io.github.liplum.dsl.stringsProp import org.gradle.api.tasks.* abstract class RunMindustryAbstract : JavaExec() { - val mindustryFile = project.fileProp() + val gameFile = project.fileProp() @InputFile get val dataDir = project.prop() @Optional @Input get diff --git a/main/src/task/RunServer.kt b/main/src/task/RunServer.kt index 61a8608..1e65680 100644 --- a/main/src/task/RunServer.kt +++ b/main/src/task/RunServer.kt @@ -27,7 +27,7 @@ open class RunServer : RunMindustryAbstract() { } } standardInput = System.`in` - args = listOf(mindustryFile.get().absolutePath) + startupArgs.get() + args = listOf(gameFile.get().absolutePath) + startupArgs.get() workingDir = dataDir logger.lifecycle("Run server in $dataDir.") // run Mindustry