mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
switch fully away from submodule
This commit is contained in:
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,4 +0,0 @@
|
|||||||
[submodule "Paper"]
|
|
||||||
path = Paper
|
|
||||||
url = https://github.com/PaperMC/Paper
|
|
||||||
branch = dev/1.17
|
|
||||||
1
Paper
1
Paper
Submodule Paper deleted from 19da14ee00
@@ -1,5 +1,3 @@
|
|||||||
import io.papermc.paperweight.util.Git
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
|
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
|
||||||
@@ -52,69 +50,10 @@ subprojects {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
val paperDir = layout.projectDirectory.dir("Paper")
|
|
||||||
val paperBranch = "dev/1.17"
|
|
||||||
|
|
||||||
val initSubmodules by tasks.registering {
|
|
||||||
group = "paperweight"
|
|
||||||
|
|
||||||
outputs.upToDateWhen { false }
|
|
||||||
doLast {
|
|
||||||
paperDir.asFile.mkdirs()
|
|
||||||
Git(layout.projectDirectory)("submodule", "update", "--init", "--recursive").executeOut()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val upstreamUpdate by tasks.registering {
|
|
||||||
group = "paperweight"
|
|
||||||
|
|
||||||
outputs.upToDateWhen { false }
|
|
||||||
finalizedBy(cleanUpstreamCaches)
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
Git(paperDir)("fetch").executeOut()
|
|
||||||
Git(paperDir)("clean", "-fd").executeOut()
|
|
||||||
Git(paperDir)("reset", "--hard", "origin/$paperBranch").executeOut()
|
|
||||||
Git(layout.projectDirectory)("add", "--force", paperDir.asFile.name).executeOut()
|
|
||||||
Git(layout.projectDirectory)("submodule", "update", "--init", "--recursive").executeOut()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val cleanUpstreamCaches by tasks.registering(GradleBuild::class) {
|
|
||||||
dir = paperDir.asFile
|
|
||||||
tasks = listOf("cleanCache")
|
|
||||||
}
|
|
||||||
|
|
||||||
val upstreamCommit by tasks.registering {
|
|
||||||
group = "paperweight"
|
|
||||||
|
|
||||||
outputs.upToDateWhen { false }
|
|
||||||
doLast {
|
|
||||||
val old = Git(layout.projectDirectory)("ls-tree", "HEAD", paperDir.asFile.name).readText()
|
|
||||||
?.substringAfter("commit ")?.substringBefore("\t")
|
|
||||||
val changes = Git(paperDir)("log", "--oneline", "$old...HEAD").readText()
|
|
||||||
changes ?: run {
|
|
||||||
println("No changes to commit?")
|
|
||||||
return@doLast
|
|
||||||
}
|
|
||||||
val commitMessage = """
|
|
||||||
|Updated Upstream (Paper)
|
|
||||||
|
|
|
||||||
|Upstream has released updates that appear to apply and compile correctly.
|
|
||||||
|
|
|
||||||
|Paper Changes:
|
|
||||||
|$changes
|
|
||||||
""".trimMargin()
|
|
||||||
Git(layout.projectDirectory)("commit", "-m", commitMessage).executeOut()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
paperweight {
|
paperweight {
|
||||||
serverProject.set(project(":Purpur-Server"))
|
serverProject.set(project(":Purpur-Server"))
|
||||||
|
|
||||||
usePaperUpstream(providers.gradleProperty("paperRef")) {
|
usePaperUpstream(providers.gradleProperty("paperCommit")) {
|
||||||
withPaperPatcher {
|
withPaperPatcher {
|
||||||
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
||||||
apiOutputDir.set(layout.projectDirectory.dir("Purpur-API"))
|
apiOutputDir.set(layout.projectDirectory.dir("Purpur-API"))
|
||||||
@@ -123,29 +62,4 @@ paperweight {
|
|||||||
serverOutputDir.set(layout.projectDirectory.dir("Purpur-Server"))
|
serverOutputDir.set(layout.projectDirectory.dir("Purpur-Server"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
upstreams {
|
|
||||||
register("paper") {
|
|
||||||
upstreamDataTask {
|
|
||||||
dependsOn(initSubmodules)
|
|
||||||
projectDir.set(paperDir)
|
|
||||||
workDir.set(layout.projectDirectory)
|
|
||||||
}
|
|
||||||
|
|
||||||
patchTasks {
|
|
||||||
register("api") {
|
|
||||||
sourceDir.set(paperDir.dir("Paper-API"))
|
|
||||||
patchDir.set(layout.projectDirectory.dir("patches/api"))
|
|
||||||
outputDir.set(layout.projectDirectory.dir("Purpur-API"))
|
|
||||||
}
|
|
||||||
register("server") {
|
|
||||||
sourceDir.set(paperDir.dir("Paper-Server"))
|
|
||||||
patchDir.set(layout.projectDirectory.dir("patches/server"))
|
|
||||||
outputDir.set(layout.projectDirectory.dir("Purpur-Server"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
group = "net.pl3x.purpur"
|
group=net.pl3x.purpur
|
||||||
version = 1.17-R0.1-SNAPSHOT
|
version=1.17-R0.1-SNAPSHOT
|
||||||
packageVersion = 1_17_R1
|
packageVersion=1_17_R1
|
||||||
paperRef = dev/1.17
|
paperCommit=0ea382b41d440644c103961fd9373574b6e12772
|
||||||
|
|
||||||
|
org.gradle.jvmargs=-Xmx3G
|
||||||
|
|||||||
Reference in New Issue
Block a user