mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-01-06 00:18:46 +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.tasks.javadoc.Javadoc
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
import task.*
|
||||
|
||||
@Suppress("UNUSED_VARIABLE")
|
||||
internal fun Project.initToothpickTasks() {
|
||||
if (project.hasProperty("fast")) {
|
||||
gradle.taskGraph.whenReady {
|
||||
gradle.taskGraph.allTasks.filter {
|
||||
it.name.contains("test", ignoreCase = true) || it.name.contains("javadoc", ignoreCase = true)
|
||||
}.forEach {
|
||||
it.onlyIf { false }
|
||||
}
|
||||
gradle.taskGraph.whenReady {
|
||||
val fast = project.hasProperty("fast")
|
||||
tasks.withType<Test> {
|
||||
onlyIf { !fast }
|
||||
}
|
||||
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",
|
||||
"-Dvanillajar=$vanillaJarPath"
|
||||
)
|
||||
if (System.getProperty("os.name").startsWith("Windows")) paperclipCmd[0] = "mvn.cmd"
|
||||
if (jenkins) paperclipCmd.add("-Dstyle.color=never")
|
||||
ensureSuccess(cmd(*paperclipCmd.toTypedArray(), dir = paperclipDir, printOut = true))
|
||||
val paperClip = paperclipDir.resolve("assembly/target/paperclip-${toothpick.minecraftVersion}.jar")
|
||||
|
Loading…
Reference in New Issue
Block a user