mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
update paper, now we can edit Purpur-MojangAPI ^_^
This commit is contained in:
@@ -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"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user