mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-01-08 09:27:33 +01:00
[CI-SKIP] Fix Paperclip building on windows (#381)
* Fix Paperclip building on windows Fixes https://github.com/YatopiaMC/Yatopia/issues/348 * Toothpick Updates figured I'd just tack this on here Co-authored-by: Zoe <duplexsys@protonmail.com>
This commit is contained in:
parent
021f928c4d
commit
da1e376b10
@ -1,15 +1,18 @@
|
|||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.api.tasks.javadoc.Javadoc
|
||||||
|
import org.gradle.api.tasks.testing.Test
|
||||||
|
import org.gradle.kotlin.dsl.withType
|
||||||
import task.*
|
import task.*
|
||||||
|
|
||||||
@Suppress("UNUSED_VARIABLE")
|
@Suppress("UNUSED_VARIABLE")
|
||||||
internal fun Project.initToothpickTasks() {
|
internal fun Project.initToothpickTasks() {
|
||||||
if (project.hasProperty("fast")) {
|
gradle.taskGraph.whenReady {
|
||||||
gradle.taskGraph.whenReady {
|
val fast = project.hasProperty("fast")
|
||||||
gradle.taskGraph.allTasks.filter {
|
tasks.withType<Test> {
|
||||||
it.name.contains("test", ignoreCase = true) || it.name.contains("javadoc", ignoreCase = true)
|
onlyIf { !fast }
|
||||||
}.forEach {
|
}
|
||||||
it.onlyIf { false }
|
tasks.withType<Javadoc> {
|
||||||
}
|
onlyIf { !fast || gradle.taskGraph.allTasks.any { it.name.contains("publish", ignoreCase = true) } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ internal fun Project.createPaperclipTask(
|
|||||||
"-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