update paper, now we can edit Purpur-MojangAPI ^_^

This commit is contained in:
Ben Kerllenevich
2021-06-14 07:03:19 -04:00
parent 77061c25b3
commit 7bf37a5c12
6 changed files with 56 additions and 15 deletions

View File

@@ -1,3 +1,6 @@
import io.papermc.paperweight.util.cache
import io.papermc.paperweight.util.Git
plugins {
java
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
@@ -50,6 +53,15 @@ subprojects {
}
}
val initMojangApi by tasks.registering {
val paperMojangApi = project.layout.cache.resolve("paperweight/upstreams/paper/Paper-MojangAPI").toFile()
doLast {
Git(paperMojangApi)("init").executeOut()
Git(paperMojangApi)("add", ".").executeOut()
Git(paperMojangApi)("commit", "-m", "Initial Source", "--author=Initial <auto@mated.null>").executeOut()
}
}
paperweight {
serverProject.set(project(":Purpur-Server"))
@@ -62,4 +74,16 @@ paperweight {
serverOutputDir.set(layout.projectDirectory.dir("Purpur-Server"))
}
}
upstreams {
register("Paper") {
upstreamDataTask.get().finalizedBy(initMojangApi)
patchTasks.register("mojangApi") {
sourceDir.set(project.layout.cache.resolve("paperweight/upstreams/paper/Paper-MojangAPI").toFile())
patchDir.set(file("patches/mojangapi"))
outputDir.set(file("Purpur-MojangAPI"))
}
}
}
}