build: Make OS detection a little cleaner
This commit is contained in:
1 file changed
+4
-1
@@ -1,3 +1,5 @@
|
|||||||
|
import org.apache.tools.ant.taskdefs.condition.Os
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("de.siphalor.tweed5.minecraft.mod.dummy")
|
id("de.siphalor.tweed5.minecraft.mod.dummy")
|
||||||
}
|
}
|
||||||
@@ -24,7 +26,8 @@ tasks.register<Exec>("compileCommonsLogging") {
|
|||||||
inputs.file(vendoredCommonsLogging.resolve("pom.xml"))
|
inputs.file(vendoredCommonsLogging.resolve("pom.xml"))
|
||||||
inputs.dir(vendoredCommonsLogging.resolve("src"))
|
inputs.dir(vendoredCommonsLogging.resolve("src"))
|
||||||
outputs.dir(vendoredCommonsLogging.resolve("target"))
|
outputs.dir(vendoredCommonsLogging.resolve("target"))
|
||||||
commandLine(if (System.getProperty("os.name").lowercase().contains("windows")) "mvn.cmd" else "mvn", "package", "-DskipTests")
|
val mvnCmd = if (Os.isFamily(Os.FAMILY_WINDOWS)) { "mvn.cmd" } else { "mvn" }
|
||||||
|
commandLine(mvnCmd, "package", "-DskipTests")
|
||||||
workingDir(vendoredCommonsLogging)
|
workingDir(vendoredCommonsLogging)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user