Fix BuildTachidesk task on Unix machines

This commit is contained in:
Syer10
2021-07-09 14:39:32 -04:00
parent 0ae7a2fe9a
commit f6a6f333c5

View File

@@ -86,7 +86,11 @@ fun TaskContainerScope.registerTachideskTasks(project: Project) {
onlyIfTachideskDoesntExist(rootDir) onlyIfTachideskDoesntExist(rootDir)
workingDir(File(tmpDir(), "Tachidesk-${tachideskVersion.drop(1)}/")) workingDir(File(tmpDir(), "Tachidesk-${tachideskVersion.drop(1)}/"))
commandLine("cmd", "/c", "gradlew", ":server:shadowJar") val os = DefaultNativePlatform.getCurrentOperatingSystem()
when {
os.isWindows -> commandLine("cmd", "/c", "gradlew", ":server:shadowJar")
os.isLinux || os.isMacOsX -> commandLine("./gradlew", ":server:shadowJar")
}
} }
register<Copy>(copyTachideskJarTask) { register<Copy>(copyTachideskJarTask) {
group = tachideskGroup group = tachideskGroup