mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-02-10 17:31:34 +01:00
parent
536f09e69f
commit
a56fe2b4cc
@ -90,14 +90,4 @@ open class ToothpickExtension(objects: ObjectFactory) {
|
|||||||
}
|
}
|
||||||
return upstreamArray.stream().sorted { upstream1, upstream2 -> upstream1.id - upstream2.id}.collect(Collectors.toList())
|
return upstreamArray.stream().sorted { upstream1, upstream2 -> upstream1.id - upstream2.id}.collect(Collectors.toList())
|
||||||
}
|
}
|
||||||
|
|
||||||
internal val mavenCommand: String by lazy {
|
|
||||||
if (exitsSuccessfully("mvn", "-v")) {
|
|
||||||
return@lazy "mvn"
|
|
||||||
}
|
|
||||||
if (exitsSuccessfully("mvn.cmd", "-v")) {
|
|
||||||
return@lazy "mvn.cmd"
|
|
||||||
}
|
|
||||||
error("Unable to locate maven. Please ensure you have maven installed and on your path.")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -22,11 +22,12 @@ internal fun Project.createPaperclipTask(
|
|||||||
val patchedJarPath = inputs.files.singleFile.absolutePath
|
val patchedJarPath = inputs.files.singleFile.absolutePath
|
||||||
logger.lifecycle(">>> Building paperclip")
|
logger.lifecycle(">>> Building paperclip")
|
||||||
val paperclipCmd = arrayListOf(
|
val paperclipCmd = arrayListOf(
|
||||||
toothpick.mavenCommand, "-T", "2C", "clean", "package",
|
"mvn", "-T", "2C", "clean", "package",
|
||||||
"-Dmcver=${toothpick.minecraftVersion}",
|
"-Dmcver=${toothpick.minecraftVersion}",
|
||||||
"-Dpaperjar=$patchedJarPath",
|
"-Dpaperjar=$patchedJarPath",
|
||||||
"-Dvanillajar=$vanillaJarPath"
|
"-Dvanillajar=$vanillaJarPath"
|
||||||
)
|
)
|
||||||
|
if (System.getProperty("os.name").startsWith("Windows")) paperclipCmd[0] = "mvn.cmd"
|
||||||
if (jenkins) paperclipCmd.add("-Dstyle.color=never")
|
if (jenkins) paperclipCmd.add("-Dstyle.color=never")
|
||||||
ensureSuccess(cmd(*paperclipCmd.toTypedArray(), dir = paperclipDir, printOut = true))
|
ensureSuccess(cmd(*paperclipCmd.toTypedArray(), dir = paperclipDir, printOut = true))
|
||||||
val paperClip = paperclipDir.resolve("assembly/target/paperclip-${toothpick.minecraftVersion}.jar")
|
val paperClip = paperclipDir.resolve("assembly/target/paperclip-${toothpick.minecraftVersion}.jar")
|
||||||
|
Loading…
Reference in New Issue
Block a user