Add Upstream updaters in buildscript (#78)
* Use libs.versions.toml * Use libs.versions.toml * Add update upstream tasks * Some cleanup
This commit is contained in:
@@ -1,2 +0,0 @@
|
|||||||
purpurCommit = c46cb7ef66675e00a48e20c40febed7ff914f35d
|
|
||||||
pufferfishCommit = bc89152d4cd4bb0f9644da2fe10774df4cc25661
|
|
||||||
@@ -1,11 +1,18 @@
|
|||||||
import io.papermc.paperweight.util.*
|
|
||||||
import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
|
import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
|
||||||
|
|
||||||
|
group = "org.plazmamc.plazma"
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
`kotlin-dsl`
|
||||||
id("io.papermc.paperweight.patcher") version "1.5.10"
|
`always-up-to-date`
|
||||||
|
alias(libs.plugins.shadow) apply false
|
||||||
|
alias(libs.plugins.paperweight)
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin.jvmToolchain {
|
||||||
|
languageVersion = JavaLanguageVersion.of(17)
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -18,9 +25,9 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
remapper("net.fabricmc:tiny-remapper:0.8.11:fat")
|
remapper(libs.remapper)
|
||||||
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
|
decompiler(libs.decompiler)
|
||||||
paperclip("io.papermc:paperclip:3.0.3")
|
paperclip(libs.paperclip)
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
@@ -103,6 +110,15 @@ paperweight {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alwaysUpToDate {
|
||||||
|
paperRepository.set("https://github.com/PaperMC/Paper")
|
||||||
|
paperBranch.set("master")
|
||||||
|
purpurRepository.set("https://github.com/PurpurMC/Purpur")
|
||||||
|
purpurBranch.set("ver/1.20.4")
|
||||||
|
pufferfishRepository.set("https://github.com/pufferfish-gg/Pufferfish")
|
||||||
|
pufferfishBranch.set("ver/1.20")
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
generateDevelopmentBundle {
|
generateDevelopmentBundle {
|
||||||
apiCoordinates.set("org.plazmamc.plazma:plazma-api")
|
apiCoordinates.set("org.plazmamc.plazma:plazma-api")
|
||||||
@@ -112,30 +128,4 @@ tasks {
|
|||||||
"https://papermc.io/repo/repository/maven-public/"
|
"https://papermc.io/repo/repository/maven-public/"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
register("updateUpstream") {
|
|
||||||
val tempDir = layout.cacheDir("updateUpstream")
|
|
||||||
val file = "gradle.properties"
|
|
||||||
|
|
||||||
doFirst {
|
|
||||||
val apiResponse = layout.cache.resolve("apiResponse.json")
|
|
||||||
download.get().download("https://api.github.com/repos/PaperMC/Paper/commits/master", apiResponse)
|
|
||||||
val latestCommit = gson.fromJson<paper.libs.com.google.gson.JsonObject>(apiResponse)["sha"].asString
|
|
||||||
|
|
||||||
copy {
|
|
||||||
from(file)
|
|
||||||
into(tempDir)
|
|
||||||
filter { line: String ->
|
|
||||||
line.replace("paperCommit = .*".toRegex(), "paperCommit = $latestCommit")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
doLast {
|
|
||||||
copy {
|
|
||||||
from(tempDir.file("gradle.properties"))
|
|
||||||
into(project.file(file).parent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
33
buildSrc/build.gradle.kts
Normal file
33
buildSrc/build.gradle.kts
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
plugins {
|
||||||
|
java
|
||||||
|
`kotlin-dsl`
|
||||||
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
maven("https://papermc.io/repo/repository/maven-public/")
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin.jvmToolchain {
|
||||||
|
languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
shadow("io.papermc.paperweight:paperweight-patcher:1.5.11-SNAPSHOT")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks {
|
||||||
|
jar {
|
||||||
|
finalizedBy(shadowJar)
|
||||||
|
}
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
archiveFileName.set("buildSrc.jar")
|
||||||
|
configurations = listOf(project.configurations["shadow"])
|
||||||
|
|
||||||
|
exclude("META-INF/gradle-plugins/io.papermc.paperweight.patcher.properties")
|
||||||
|
relocate("io.papermc.paperweight", "org.plazmamc.alwaysuptodate.internal.paperweight")
|
||||||
|
minimize()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package org.plazmamc.alwaysuptodate
|
||||||
|
|
||||||
|
import org.gradle.api.Plugin
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import org.plazmamc.alwaysuptodate.tasks.*
|
||||||
|
|
||||||
|
class AlwaysUpToDate : Plugin<Project> {
|
||||||
|
|
||||||
|
override fun apply(target: Project) {
|
||||||
|
target.extensions.create("alwaysUpToDate", AlwaysUpToDateExtension::class.java)
|
||||||
|
target.tasks.register("updatePaper", PaperUpdateTask::class.java)
|
||||||
|
target.tasks.register("updatePurpur", PurpurUpdateTask::class.java)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package org.plazmamc.alwaysuptodate
|
||||||
|
|
||||||
|
class AlwaysUpToDateException : Exception {
|
||||||
|
constructor(message: String) : super(message)
|
||||||
|
constructor(message: String, cause: Throwable?) : super(message, cause)
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package org.plazmamc.alwaysuptodate
|
||||||
|
|
||||||
|
import org.gradle.api.provider.Property
|
||||||
|
|
||||||
|
interface AlwaysUpToDateExtension {
|
||||||
|
|
||||||
|
val paperRepository: Property<String>
|
||||||
|
val paperBranch: Property<String>
|
||||||
|
|
||||||
|
val pufferfishRepository: Property<String>
|
||||||
|
val pufferfishBranch: Property<String>
|
||||||
|
|
||||||
|
val purpurRepository: Property<String>
|
||||||
|
val purpurBranch: Property<String>
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package org.plazmamc.alwaysuptodate.tasks
|
||||||
|
|
||||||
|
import io.papermc.paperweight.util.Git
|
||||||
|
import org.gradle.api.tasks.TaskAction
|
||||||
|
import org.gradle.kotlin.dsl.get
|
||||||
|
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||||
|
import org.plazmamc.alwaysuptodate.AlwaysUpToDateExtension
|
||||||
|
import org.plazmamc.alwaysuptodate.utils.pathIO
|
||||||
|
import java.io.File
|
||||||
|
|
||||||
|
abstract class PaperUpdateTask : Task() {
|
||||||
|
|
||||||
|
private val property = project.extensions["alwaysUpToDate"] as AlwaysUpToDateExtension
|
||||||
|
private val regex = "[a-z0-9]{40}\trefs/heads/${property.paperBranch}".toRegex()
|
||||||
|
private val git = Git(project.pathIO)
|
||||||
|
|
||||||
|
override fun init() {
|
||||||
|
outputs.upToDateWhen { check() }
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun check(): Boolean {
|
||||||
|
val latestCommit = git("ls-remote", property.paperRepository.get()).readText()?.lines()
|
||||||
|
?.filterNot { regex.matches(it) }?.first()?.split("\t")?.first()
|
||||||
|
?: throw AlwaysUpToDateException("Failed to get latest Paper commit")
|
||||||
|
val currentCommit = project.properties["paperCommit"] as String
|
||||||
|
|
||||||
|
return currentCommit == latestCommit
|
||||||
|
}
|
||||||
|
|
||||||
|
@TaskAction
|
||||||
|
fun update() {
|
||||||
|
if (check()) return
|
||||||
|
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), project.file("gradle.properties"))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updatePaperCommit(repo: String, branch: String, properties: File) {
|
||||||
|
val latestCommit = Git(properties.parentFile.toPath())("ls-remote", repo).readText()?.lines()
|
||||||
|
?.filterNot { "[a-z0-9]{40}\trefs/heads/$branch".toRegex().matches(it) }?.first()?.split("\t")?.first()
|
||||||
|
?: throw AlwaysUpToDateException("Failed to get latest Paper commit")
|
||||||
|
|
||||||
|
properties.writeText(properties.readText().replace("paperCommit = .*".toRegex(), "paperCommit = $latestCommit"))
|
||||||
|
}
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
package org.plazmamc.alwaysuptodate.tasks
|
||||||
|
|
||||||
|
import io.papermc.paperweight.util.*
|
||||||
|
import org.gradle.api.tasks.TaskAction
|
||||||
|
import org.gradle.kotlin.dsl.get
|
||||||
|
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||||
|
import org.plazmamc.alwaysuptodate.AlwaysUpToDateExtension
|
||||||
|
import org.plazmamc.alwaysuptodate.utils.Gradle
|
||||||
|
import org.plazmamc.alwaysuptodate.utils.addCommit
|
||||||
|
import org.plazmamc.alwaysuptodate.utils.clone
|
||||||
|
import org.plazmamc.alwaysuptodate.utils.pathIO
|
||||||
|
import java.nio.file.Path
|
||||||
|
import kotlin.io.path.createDirectories
|
||||||
|
import kotlin.io.path.exists
|
||||||
|
|
||||||
|
abstract class PurpurUpdateTask : Task() {
|
||||||
|
|
||||||
|
private val property = project.extensions["alwaysUpToDate"] as AlwaysUpToDateExtension
|
||||||
|
private val pufferfishCommit = """
|
||||||
|
Pufferfish
|
||||||
|
Copyright (C) 2024 Pufferfish Studios LLC
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
""".trimIndent()
|
||||||
|
private val purpurCommit = """
|
||||||
|
PurpurMC
|
||||||
|
Copyright (C) 2024 PurpurMC
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
""".trimIndent()
|
||||||
|
|
||||||
|
override fun init() {
|
||||||
|
outputs.upToDateWhen { check() }
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun check(): Boolean {
|
||||||
|
val regex = "[a-z0-9]{40}\trefs/heads/${property.purpurBranch}".toRegex()
|
||||||
|
val latestCommit = Git(project.pathIO)("ls-remote", property.purpurRepository.get()).readText()?.lines()
|
||||||
|
?.filterNot { regex.matches(it) }?.first()?.split("\t")?.first()
|
||||||
|
?: throw AlwaysUpToDateException("Failed to get latest Purpur commit")
|
||||||
|
val currentCommit = project.properties["purpurCommit"] as String
|
||||||
|
|
||||||
|
return currentCommit == latestCommit
|
||||||
|
}
|
||||||
|
|
||||||
|
@TaskAction
|
||||||
|
fun update() {
|
||||||
|
if (check()) return
|
||||||
|
Git.checkForGit()
|
||||||
|
|
||||||
|
val dir = project.layout.cache.resolve("AlwaysUpToDate/UpdatePurpur")
|
||||||
|
if (dir.exists()) dir.toFile().deleteRecursively()
|
||||||
|
|
||||||
|
dir.createDirectories()
|
||||||
|
|
||||||
|
val git = Git(dir)
|
||||||
|
val pufferfish = git.clone("Pufferfish", property.pufferfishRepository.get(), property.pufferfishBranch.get(), dir)
|
||||||
|
val purpur = git.clone("Purpur", property.purpurRepository.get(), property.purpurBranch.get(), dir)
|
||||||
|
|
||||||
|
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), pufferfish.resolve("gradle.properties").toFile())
|
||||||
|
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), purpur.resolve("gradle.properties").toFile())
|
||||||
|
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), project.file("gradle.properties"))
|
||||||
|
|
||||||
|
val purpurGradle = Gradle(purpur)
|
||||||
|
val purpurPatches = purpur.resolve("patches").also {
|
||||||
|
val puffefishPatches = pufferfish.resolve("patches").also { that -> that.toFile().deleteRecursively() }
|
||||||
|
copyPatch(it.resolve("server"), puffefishPatches.resolve("server"), "0001-Pufferfish-Server-Changes.patch")
|
||||||
|
copyPatch(it.resolve("api"), puffefishPatches.resolve("api"), "0001-Pufferfish-API-Changes.patch")
|
||||||
|
}
|
||||||
|
|
||||||
|
Gradle(pufferfish)("applyPatches").executeOut()
|
||||||
|
purpurGradle("applyPatches").executeOut()
|
||||||
|
|
||||||
|
pufferfish.resolve("pufferfish-server").also {
|
||||||
|
val dotGit = it.resolve(".git").toFile()
|
||||||
|
dotGit.deleteRecursively()
|
||||||
|
copySource(it)
|
||||||
|
|
||||||
|
val paper = pufferfish.resolve(".gradle/caches/paperweight/upstreams/paper/Paper-Server")
|
||||||
|
copySource(paper)
|
||||||
|
Git(paper)("add", ".").executeOut()
|
||||||
|
Git(paper)("commit", "-m", "Vanilla Sources", "--author=Vanilla <auto@mated.null>").executeOut()
|
||||||
|
paper.resolve(".git").toFile().copyRecursively(dotGit, overwrite = true)
|
||||||
|
|
||||||
|
Git(it).addCommit("Pufferfish Server Changes\n\n$pufferfishCommit", "--author=Kevin Raneri <kevin.raneri@gmail.com>")
|
||||||
|
|
||||||
|
val server = purpur.resolve("Purpur-Server")
|
||||||
|
copySource(server)
|
||||||
|
dotGit.copyRecursively(server.resolve(".git").toFile().also { that -> that.deleteRecursively() }, overwrite = true)
|
||||||
|
Git(server).addCommit("Purpur Server Changes\n\n$purpurCommit", "--author=granny <contact@granny.dev>")
|
||||||
|
}
|
||||||
|
|
||||||
|
with(purpur.resolve("Purpur-API")) {
|
||||||
|
pufferfish.resolve("pufferfish-api/.git").toFile()
|
||||||
|
.copyRecursively(resolve(".git").toFile().also { it.deleteRecursively() }, overwrite = true)
|
||||||
|
Git(this).addCommit("Purpur API Changes\n\n$purpurCommit", "--author=granny <contact@granny.dev>")
|
||||||
|
}
|
||||||
|
|
||||||
|
purpurGradle("rebuildPatches").executeOut()
|
||||||
|
project.layout.projectDirectory.path.resolve("patches").also {
|
||||||
|
with(purpurPatches.resolve("server")) {
|
||||||
|
val target = it.resolve("server")
|
||||||
|
copyPatch(this, target, "0001-Pufferfish-Server-Changes.patch")
|
||||||
|
copyPatch(this, target, "0002-Purpur-Server-Changes.patch")
|
||||||
|
}
|
||||||
|
|
||||||
|
with(purpurPatches.resolve("api")) {
|
||||||
|
val target = it.resolve("api")
|
||||||
|
copyPatch(this, target, "0001-Pufferfish-API-Changes.patch")
|
||||||
|
copyPatch(this, target, "0002-Purpur-API-Changes.patch")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun copySource(dir: Path) {
|
||||||
|
with(dir.resolve(".gradle/caches/paperweight/mc-dev-sources")) {
|
||||||
|
val target = dir.resolve("src/main")
|
||||||
|
resolve("net").toFile().copyRecursively(target.resolve("java/net").toFile(), overwrite = true)
|
||||||
|
resolve("data").toFile().copyRecursively(target.resolve("resources/data").toFile(), overwrite = true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun copyPatch(from: Path, to: Path, name: String) {
|
||||||
|
with(from.resolve(name)) {
|
||||||
|
if (exists()) toFile().copyTo(to.resolve(name).toFile(), overwrite = true)
|
||||||
|
else from.toFile().walk().filter { it.name.endsWith(name.substring(4)) }.first().copyTo(to.resolve(name).toFile(), overwrite = true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package org.plazmamc.alwaysuptodate.tasks
|
||||||
|
|
||||||
|
import org.gradle.api.DefaultTask
|
||||||
|
|
||||||
|
abstract class Task : DefaultTask() {
|
||||||
|
|
||||||
|
protected open fun init() {
|
||||||
|
}
|
||||||
|
|
||||||
|
init {
|
||||||
|
this.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package org.plazmamc.alwaysuptodate.utils
|
||||||
|
|
||||||
|
import io.papermc.paperweight.util.Git
|
||||||
|
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||||
|
import java.nio.file.Path
|
||||||
|
import kotlin.io.path.notExists
|
||||||
|
|
||||||
|
fun Git.clone(name: String, uri: String, branch: String, dir: Path): Path {
|
||||||
|
val target = dir.resolve(name)
|
||||||
|
this("clone", "--depth", "1", "--branch", branch, uri, target.toString()).executeSilently(silenceErr = true)
|
||||||
|
if (target.notExists()) throw AlwaysUpToDateException("Failed to clone repository")
|
||||||
|
return target
|
||||||
|
}
|
||||||
|
|
||||||
|
fun Git.addCommit(vararg args: String) {
|
||||||
|
this("add", ".").executeSilently(silenceErr = true)
|
||||||
|
this("commit", "-m", *args).executeSilently(silenceErr = true)
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.plazmamc.alwaysuptodate.utils
|
||||||
|
|
||||||
|
import io.papermc.paperweight.util.Command
|
||||||
|
import io.papermc.paperweight.util.directory
|
||||||
|
import org.plazmamc.alwaysuptodate.AlwaysUpToDateException
|
||||||
|
import java.nio.file.Path
|
||||||
|
import kotlin.io.path.notExists
|
||||||
|
|
||||||
|
class Gradle(private val repo: Path) {
|
||||||
|
|
||||||
|
init {
|
||||||
|
if (repo.resolve("gradle").notExists())
|
||||||
|
throw AlwaysUpToDateException("Git repository does not exist: $repo")
|
||||||
|
}
|
||||||
|
|
||||||
|
operator fun invoke(vararg args: String): Command {
|
||||||
|
val builder = ProcessBuilder("java", "-cp", "gradle/wrapper/gradle-wrapper.jar", "org.gradle.wrapper.GradleWrapperMain", *args, "--no-daemon", "--stacktrace").directory(repo)
|
||||||
|
val command = builder.command().joinToString(" ") { if (it.codePoints().anyMatch(Character::isWhitespace)) "\"$it\"" else it }
|
||||||
|
|
||||||
|
return try {
|
||||||
|
Command(builder, command)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
throw AlwaysUpToDateException("Failed to execute command: $command", e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package org.plazmamc.alwaysuptodate.utils
|
||||||
|
|
||||||
|
import io.papermc.paperweight.util.path
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import java.nio.file.Path
|
||||||
|
|
||||||
|
val Project.pathIO: Path get() = layout.projectDirectory.path
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
implementation-class=org.plazmamc.alwaysuptodate.AlwaysUpToDate
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
group = org.plazmamc.plazma
|
|
||||||
version = 1.20.2-R0.1-SNAPSHOT
|
version = 1.20.2-R0.1-SNAPSHOT
|
||||||
mcVersion = 1.20.2
|
mcVersion = 1.20.2
|
||||||
|
|
||||||
paperCommit = 931781c220b98dde0159c9a3c8dce06c3b2b1e13
|
paperCommit = 931781c220b98dde0159c9a3c8dce06c3b2b1e13
|
||||||
|
purpurCommit = c46cb7ef66675e00a48e20c40febed7ff914f35d
|
||||||
|
pufferfishCommit = bc89152d4cd4bb0f9644da2fe10774df4cc25661
|
||||||
|
|
||||||
org.gradle.caching = true
|
org.gradle.caching = true
|
||||||
org.gradle.parallel = true
|
org.gradle.parallel = true
|
||||||
|
|||||||
15
gradle/libs.versions.toml
Normal file
15
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[versions]
|
||||||
|
shadow = "8.1.1"
|
||||||
|
paperweight = "1.5.10"
|
||||||
|
paperclip = "3.0.3"
|
||||||
|
decompiler = "2.0.627.2"
|
||||||
|
remapper = "0.3.0:fat"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
remapper = { group = "net.fabricmc", name = "tiny-remapper", version.ref="remapper" }
|
||||||
|
decompiler = { group = "net.minecraftforge", name = "forgeflower", version.ref = "decompiler" }
|
||||||
|
paperclip = { group = "io.papermc", name = "paperclip", version.ref = "paperclip" }
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
|
||||||
|
paperweight = { id = "io.papermc.paperweight.patcher", version.ref = "paperweight" }
|
||||||
29
libs/api.versions.toml
Normal file
29
libs/api.versions.toml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
[versions]
|
||||||
|
gson = "2.10.1"
|
||||||
|
joml = "1.10.5"
|
||||||
|
guava = "32.1.2-jre"
|
||||||
|
sentry = "5.4.0"
|
||||||
|
fastutil = "8.5.6"
|
||||||
|
findbugs = "1.3.9"
|
||||||
|
slf4j-api = "1.8.0-beta4"
|
||||||
|
bungeechat = "1.20-R0.1-deprecated+build.14"
|
||||||
|
json-simple = "1.1.1"
|
||||||
|
annotations = "24.0.1"
|
||||||
|
checkerqual = "3.21.0"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
joml = { group = "org.joml", name = "joml", version.ref = "joml" }
|
||||||
|
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
|
||||||
|
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
|
||||||
|
sentry = { group = "io.sentry", name = "sentry", version.ref = "sentry" }
|
||||||
|
fastutil = { group = "it.unimi.dsi", name = "fastutil", version.ref = "fastutil" }
|
||||||
|
findbugs = { group = "com.google.code.findbugs", name = "jsr305", version.ref = "findbugs" }
|
||||||
|
slf4j-api = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j-api" }
|
||||||
|
bungeechat = { group = "net.md-5", name = "bungeecord-chat", version.ref = "bungeechat" }
|
||||||
|
jsonsimple = { group = "com.googlecode.json-simple", name = "json-simple", version.ref = "json-simple" }
|
||||||
|
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
|
||||||
|
checkerqual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerqual" }
|
||||||
|
|
||||||
|
[bundles]
|
||||||
|
api = [ "guava", "gson", "bungeechat", "joml", "fastutil", "slf4j-api", "sentry" ]
|
||||||
|
annotations = [ "annotations", "checkerqual" ]
|
||||||
45
libs/common.versions.toml
Normal file
45
libs/common.versions.toml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
[versions]
|
||||||
|
asm = "9.6"
|
||||||
|
log4j = "2.19.0"
|
||||||
|
mockito = "5.5.0"
|
||||||
|
jupiter = "5.10.0"
|
||||||
|
hamcrest = "2.2"
|
||||||
|
snakeyaml = "2.2"
|
||||||
|
adventure = "4.14.0"
|
||||||
|
commons-lang2 = "2.6"
|
||||||
|
commons-lang3 = "3.12.0"
|
||||||
|
maven-provider = "3.8.5"
|
||||||
|
maven-resolver = "1.7.3"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
mockito = { group = "org.mockito", name = "mockito-core", version.ref = "mockito" }
|
||||||
|
jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "jupiter" }
|
||||||
|
hamcrest = { group = "org.hamcrest", name = "hamcrest", version.ref = "hamcrest" }
|
||||||
|
snakeyaml = { group = "org.yaml", name = "snakeyaml", version.ref = "snakeyaml" }
|
||||||
|
|
||||||
|
asm-head = { group = "org.ow2.asm", name = "asm", version.ref = "asm" }
|
||||||
|
asm-tree = { group = "org.ow2.asm", name = "asm-tree", version.ref = "asm" }
|
||||||
|
asm-commons = { group = "org.ow2.asm", name = "asm-commons", version.ref = "asm" }
|
||||||
|
log4j-api = { group = "org.apache.logging.log4j", name = "log4j-api", version.ref = "log4j" }
|
||||||
|
log4j-core = { group = "org.apache.logging.log4j", name = "log4j-core", version.ref = "log4j" }
|
||||||
|
log4j-iostreams = { group = "org.apache.logging.log4j", name = "log4j-iostreams", version.ref = "log4j" }
|
||||||
|
maven-provider = { group = "org.apache.maven", name = "maven-resolver-provider", version.ref = "maven-provider" }
|
||||||
|
maven-connector = { group = "org.apache.maven.resolver", name = "maven-resolver-connector-basic", version.ref = "maven-resolver" }
|
||||||
|
maven-transport = { group = "org.apache.maven.resolver", name = "maven-resolver-transport-http", version.ref = "maven-resolver" }
|
||||||
|
commons-lang2 = { group = "commons-lang", name = "commons-lang", version.ref = "commons-lang2" }
|
||||||
|
commons-lang3 = { group = "org.apache.commons", name = "commons-lang3", version.ref = "commons-lang3" }
|
||||||
|
|
||||||
|
adventure-bom = { group = "net.kyori", name = "adventure-bom", version.ref = "adventure" }
|
||||||
|
adventure-api = { group = "net.kyori", name = "adventure-api", version.ref = "adventure" }
|
||||||
|
adventure-slf4j = { group = "net.kyori", name = "adventure-text-logger-slf4j", version.ref = "adventure" }
|
||||||
|
adventure-minimessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure" }
|
||||||
|
adventure-serializer-gson = { group = "net.kyori", name = "adventure-text-serializer-gson", version.ref = "adventure" }
|
||||||
|
adventure-serializer-ansi = { group = "net.kyori", name = "adventure-text-serializer-ansi", version.ref = "adventure" }
|
||||||
|
adventure-serializer-plain = { group = "net.kyori", name = "adventure-text-serializer-plain", version.ref = "adventure" }
|
||||||
|
adventure-serializer-legacy = { group = "net.kyori", name = "adventure-text-serializer-legacy", version.ref = "adventure" }
|
||||||
|
|
||||||
|
[bundles]
|
||||||
|
asm = [ "asm-head", "asm-commons" ]
|
||||||
|
test = [ "jupiter", "hamcrest", "mockito" ]
|
||||||
|
maven = [ "maven-connector", "maven-transport" ]
|
||||||
|
adventure = [ "adventure-api", "adventure-slf4j", "adventure-minimessage", "adventure-serializer-gson", "adventure-serializer-plain", "adventure-serializer-legacy" ]
|
||||||
35
libs/server.versions.toml
Normal file
35
libs/server.versions.toml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
[versions]
|
||||||
|
ansi = "1.0.3"
|
||||||
|
jansi = "3.21.0"
|
||||||
|
rhino = "1.7.14"
|
||||||
|
mysql = "8.1.0"
|
||||||
|
sqlite = "3.42.0.1"
|
||||||
|
haproxy = "4.1.97.Final"
|
||||||
|
velocity = "3.1.2-SNAPSHOT"
|
||||||
|
disruptor = "3.4.4"
|
||||||
|
simpleyaml = "1.8.4"
|
||||||
|
classgraph = "4.8.47"
|
||||||
|
mapping-io = "0.5.0"
|
||||||
|
configurate = "4.2.0-SNAPSHOT"
|
||||||
|
terminal-appender = "1.3.0"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
ansi = { group = "net.kyori", name = "ansi", version.ref = "ansi" }
|
||||||
|
mysql = { group = "com.mysql", name = "mysql-connector-j", version.ref = "mysql" }
|
||||||
|
jansi = { group = "org.jline", name = "jline-terminal-jansi", version.ref = "jansi" }
|
||||||
|
sqlite = { group = "org.xerial", name = "sqlite-jdbc", version.ref = "sqlite" }
|
||||||
|
haproxy = { group = "io.netty", name = "netty-codec-haproxy", version.ref = "haproxy" }
|
||||||
|
velocity = { group = "com.velocitypowered", name = "velocity-native", version.ref = "velocity" }
|
||||||
|
disruptor = { group = "com.lmax", name = "disruptor", version.ref = "disruptor" }
|
||||||
|
mappingio = { group = "net.fabricmc", name = "mapping-io", version.ref = "mapping-io" }
|
||||||
|
classgraph = { group = "io.github.classgraph", name = "classgraph", version.ref = "classgraph" }
|
||||||
|
simpleyaml = { group = "com.github.carleslc.Simple-YAML", name = "Simple-Yaml", version.ref = "simpleyaml" }
|
||||||
|
configurate = { group = "org.spongepowered", name = "configurate-yaml", version.ref = "configurate" }
|
||||||
|
|
||||||
|
rhino-engine = { group = "org.mozilla", name = "rhino-engine", version.ref = "rhino" }
|
||||||
|
rhino-runtime = { group = "org.mozilla", name = "rhino-runtime", version.ref = "rhino" }
|
||||||
|
terminal-appender = { group = "net.minecrell", name = "terminalconsoleappender", version.ref="terminal-appender" }
|
||||||
|
|
||||||
|
[bundles]
|
||||||
|
runtime = [ "sqlite", "mysql", "disruptor" ]
|
||||||
|
implementation = [ "jansi", "terminal-appender", "ansi", "haproxy", "configurate", "mappingio", "rhino-engine", "rhino-runtime" ]
|
||||||
115
patches/api/0003-Build-system-changes.patch
Normal file
115
patches/api/0003-Build-system-changes.patch
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: AlphaKR93 <dev@alpha93.kr>
|
||||||
|
Date: Sun, 14 Jan 2024 19:50:29 +0900
|
||||||
|
Subject: [PATCH] Build system changes
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
|
index 41d7b75e904b94073dfcd12b776a7759a963b66f..96974f191c13424d72839d85dfa2a6c29b9f4d1d 100644
|
||||||
|
--- a/build.gradle.kts
|
||||||
|
+++ b/build.gradle.kts
|
||||||
|
@@ -9,11 +9,13 @@ java {
|
||||||
|
withJavadocJar()
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* // Plazma - Use libs.versions.toml
|
||||||
|
val annotationsVersion = "24.0.1"
|
||||||
|
val bungeeCordChatVersion = "1.20-R0.1"
|
||||||
|
val adventureVersion = "4.14.0"
|
||||||
|
val slf4jVersion = "1.8.0-beta4"
|
||||||
|
val log4jVersion = "2.17.1"
|
||||||
|
+ */ // Plazma - Use libs.versions.toml
|
||||||
|
val apiAndDocs: Configuration by configurations.creating {
|
||||||
|
attributes {
|
||||||
|
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||||
|
@@ -28,15 +30,39 @@ configurations.api {
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
// api dependencies are listed transitively to API consumers
|
||||||
|
+ /* // Plazma - Use libs.versions.toml
|
||||||
|
api("com.google.guava:guava:32.1.2-jre")
|
||||||
|
api("com.google.code.gson:gson:2.10.1")
|
||||||
|
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.14") // Paper
|
||||||
|
api("org.yaml:snakeyaml:2.2")
|
||||||
|
api("org.joml:joml:1.10.5")
|
||||||
|
+ */ // Plazma - Use libs.versions.toml
|
||||||
|
// Paper start
|
||||||
|
- api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||||
|
+ api(api.jsonsimple) { // Plazma - Use libs.versions.toml
|
||||||
|
isTransitive = false // includes junit
|
||||||
|
}
|
||||||
|
+ // Plazma start
|
||||||
|
+ implementation(common.bundles.asm)
|
||||||
|
+
|
||||||
|
+ compileOnly(api.findbugs)
|
||||||
|
+ compileOnly(common.bundles.maven)
|
||||||
|
+
|
||||||
|
+ compileOnly(api.annotations)
|
||||||
|
+ compileOnlyApi(api.checkerqual)
|
||||||
|
+ testCompileOnly(api.bundles.annotations)
|
||||||
|
+
|
||||||
|
+ testImplementation(common.asm.tree)
|
||||||
|
+ testImplementation(common.bundles.test)
|
||||||
|
+ testImplementation(common.commons.lang3)
|
||||||
|
+
|
||||||
|
+ api(api.bundles.api)
|
||||||
|
+ api(common.snakeyaml)
|
||||||
|
+ api(common.log4j.api)
|
||||||
|
+ api(common.maven.provider)
|
||||||
|
+ apiAndDocs(platform(common.adventure.bom))
|
||||||
|
+ apiAndDocs(common.bundles.adventure)
|
||||||
|
+ /*
|
||||||
|
+ // Plazma end
|
||||||
|
api("it.unimi.dsi:fastutil:8.5.6")
|
||||||
|
apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
|
||||||
|
apiAndDocs("net.kyori:adventure-api")
|
||||||
|
@@ -73,6 +99,7 @@ dependencies {
|
||||||
|
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||||
|
testImplementation("org.mockito:mockito-core:5.5.0")
|
||||||
|
testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||||
|
+ */ // Plazma - Use libs.versions.toml
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
@@ -133,25 +160,27 @@ tasks.withType<Javadoc> {
|
||||||
|
options.use()
|
||||||
|
options.isDocFilesSubDirs = true
|
||||||
|
options.links(
|
||||||
|
- "https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||||
|
- "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||||
|
- "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||||
|
+ // Plazma start - Use libs.versions.toml
|
||||||
|
+ "https://guava.dev/releases/${api.guava.orNull?.version}/api/docs/",
|
||||||
|
+ "https://javadoc.io/doc/org.yaml/snakeyaml/${common.snakeyaml.orNull?.version}/",
|
||||||
|
+ "https://javadoc.io/doc/org.jetbrains/annotations/${api.annotations.orNull?.version}/", // Paper - we don't want Java 5 annotations
|
||||||
|
// "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/", // Paper - don't link to bungee chat
|
||||||
|
// Paper start - add missing javadoc links
|
||||||
|
- "https://javadoc.io/doc/org.joml/joml/1.10.5/index.html",
|
||||||
|
- "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
|
||||||
|
+ "https://javadoc.io/doc/org.joml/joml/${api.joml.orNull?.version}/index.html",
|
||||||
|
+ "https://www.javadoc.io/doc/com.google.code.gson/gson/${api.gson.orNull?.version}",
|
||||||
|
// Paper end
|
||||||
|
// Paper start
|
||||||
|
- "https://jd.advntr.dev/api/$adventureVersion/",
|
||||||
|
- "https://jd.advntr.dev/text-minimessage/$adventureVersion/",
|
||||||
|
- "https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
|
||||||
|
- "https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
|
||||||
|
- "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
|
||||||
|
- "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
|
||||||
|
- "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
|
||||||
|
- "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
|
||||||
|
+ "https://jd.advntr.dev/api/${common.adventure.api.orNull?.version}/",
|
||||||
|
+ "https://jd.advntr.dev/text-minimessage/${common.adventure.api.orNull?.version}/",
|
||||||
|
+ "https://jd.advntr.dev/text-serializer-gson/${common.adventure.api.orNull?.version}/",
|
||||||
|
+ "https://jd.advntr.dev/text-serializer-legacy/${common.adventure.api.orNull?.version}/",
|
||||||
|
+ "https://jd.advntr.dev/text-serializer-plain/${common.adventure.api.orNull?.version}/",
|
||||||
|
+ "https://jd.advntr.dev/text-logger-slf4j/${common.adventure.api.orNull?.version}/",
|
||||||
|
+ "https://javadoc.io/doc/org.slf4j/slf4j-api/${api.slf4j.api.orNull?.version}/",
|
||||||
|
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/${common.log4j.api.orNull?.version}/",
|
||||||
|
// Paper end
|
||||||
|
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||||
|
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/${common.maven.provider.orNull?.version}", // Paper
|
||||||
|
+ // Plazma end
|
||||||
|
)
|
||||||
|
options.tags("apiNote:a:API Note:")
|
||||||
|
|
||||||
78
patches/server/0003-Build-system-changes.patch
Normal file
78
patches/server/0003-Build-system-changes.patch
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: AlphaKR93 <dev@alpha93.kr>
|
||||||
|
Date: Sun, 14 Jan 2024 19:51:19 +0900
|
||||||
|
Subject: [PATCH] Build system changes
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
|
index f083d422678f5fd21825439944af888fbdc9bf3c..e30b51ed329f0c66a2329da45996ef0fc0db8ffb 100644
|
||||||
|
--- a/build.gradle.kts
|
||||||
|
+++ b/build.gradle.kts
|
||||||
|
@@ -19,6 +19,7 @@ dependencies {
|
||||||
|
exclude("io.papermc.paper", "paper-api")
|
||||||
|
}
|
||||||
|
// Purpur end
|
||||||
|
+ /* // Plazma - Use libs.versions.toml
|
||||||
|
// Paper start
|
||||||
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||||
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||||
|
@@ -46,9 +47,32 @@ dependencies {
|
||||||
|
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||||
|
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||||
|
// Paper start - Use Velocity cipher
|
||||||
|
- implementation("com.velocitypowered:velocity-native:3.1.2-SNAPSHOT") {
|
||||||
|
+ // Plazma start - Use libs.versions.toml
|
||||||
|
+ */
|
||||||
|
+ implementation(common.snakeyaml)
|
||||||
|
+ implementation(common.bundles.asm)
|
||||||
|
+ implementation(common.commons.lang2)
|
||||||
|
+ implementation(common.adventure.serializer.ansi)
|
||||||
|
+ implementation(common.log4j.core)
|
||||||
|
+ implementation(common.log4j.iostreams)
|
||||||
|
+ log4jPlugins.annotationProcessorConfigurationName(common.log4j.core)
|
||||||
|
+ runtimeOnly(log4jPlugins.output)
|
||||||
|
+ alsoShade(log4jPlugins.output)
|
||||||
|
+
|
||||||
|
+ implementation(server.ansi)
|
||||||
|
+ implementation(server.bundles.implementation)
|
||||||
|
+ implementation(server.velocity) {
|
||||||
|
+ // Plazma end
|
||||||
|
isTransitive = false
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ runtimeOnly(common.bundles.maven)
|
||||||
|
+ runtimeOnly(common.maven.provider)
|
||||||
|
+ runtimeOnly(server.bundles.runtime)
|
||||||
|
+
|
||||||
|
+ testImplementation(common.bundles.test)
|
||||||
|
+ testImplementation(server.classgraph)
|
||||||
|
+ /* // Plazma - Use libs.versions.toml
|
||||||
|
// Paper end
|
||||||
|
|
||||||
|
runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||||
|
@@ -57,19 +81,22 @@ dependencies {
|
||||||
|
|
||||||
|
// Pufferfish start
|
||||||
|
implementation("org.yaml:snakeyaml:1.32")
|
||||||
|
- implementation ("com.github.carleslc.Simple-YAML:Simple-Yaml:1.8.4") {
|
||||||
|
+ */ // Plazma - Use libs.versions.toml
|
||||||
|
+ implementation(server.simpleyaml) { // Plazma - Use libs.versions.toml
|
||||||
|
exclude(group="org.yaml", module="snakeyaml")
|
||||||
|
}
|
||||||
|
// Pufferfish end
|
||||||
|
|
||||||
|
- implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur
|
||||||
|
- implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
|
||||||
|
+ //implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur // Plazma - Use libs.versions.toml
|
||||||
|
+ //implementation("org.mozilla:rhino-engine:1.7.14") // Purpur // Plazma - Use libs.versions.toml
|
||||||
|
implementation("dev.omega24:upnp4j:1.0") // Purpur
|
||||||
|
|
||||||
|
+ /* // Plazma - Use libs.versions.toml
|
||||||
|
testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
|
||||||
|
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||||
|
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||||
|
testImplementation("org.mockito:mockito-core:5.5.0")
|
||||||
|
+ */ // Plazma - Use libs.versions.toml
|
||||||
|
}
|
||||||
|
|
||||||
|
val craftbukkitPackageVersion = "1_20_R2" // Paper
|
||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index f083d422678f5fd21825439944af888fbdc9bf3c..526f25bdf5216dba09d51eca73f38884c106e872 100644
|
index e30b51ed329f0c66a2329da45996ef0fc0db8ffb..d91928799014596de519d1a1b3f1bb0a80ac925c 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -14,7 +14,7 @@ val alsoShade: Configuration by configurations.creating
|
@@ -14,7 +14,7 @@ val alsoShade: Configuration by configurations.creating
|
||||||
@@ -17,7 +17,7 @@ index f083d422678f5fd21825439944af888fbdc9bf3c..526f25bdf5216dba09d51eca73f38884
|
|||||||
implementation("io.papermc.paper:paper-mojangapi:${project.version}") {
|
implementation("io.papermc.paper:paper-mojangapi:${project.version}") {
|
||||||
exclude("io.papermc.paper", "paper-api")
|
exclude("io.papermc.paper", "paper-api")
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,7 @@ tasks.jar {
|
@@ -120,7 +120,7 @@ tasks.jar {
|
||||||
attributes(
|
attributes(
|
||||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||||
"Implementation-Title" to "CraftBukkit",
|
"Implementation-Title" to "CraftBukkit",
|
||||||
@@ -351,7 +351,7 @@ index 9b8bdffbbfe45c6712d0f4da3643424fa94fc69e..84eca01450db5b737c676cab2439d041
|
|||||||
|
|
||||||
File commandFile = (File) optionset.valueOf("commands-settings");
|
File commandFile = (File) optionset.valueOf("commands-settings");
|
||||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||||
index cda4544ae96a4fcb5c6c4483df67a59f1b53fd27..2282992d04669a705a5b67f616fe921c289182ab 100644
|
index fe82a20efb2b130a568bc06aec5b86d3082062a3..8dddcacec38bf2d5d79ce7fc0f26a2cced5d271d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||||
@@ -131,14 +131,14 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
@@ -131,14 +131,14 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||||
@@ -185,7 +185,7 @@ index d70c1206df96b03c031399049a65e6a765d80347..e885d2f21cfbf1fd1c61b29e34f3f51a
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||||
index f52802e871efb73c02b9d11d914fd17d417ebc55..075108ca9d5123e4d0bbae16fff9479029c93494 100644
|
index f9f7664e4a6a4e24dcb3b8da0a807a984a698429..22e74b716d29ecfe75bd49234bef861cd97cb79e 100644
|
||||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||||
@@ -329,6 +329,7 @@ public class PurpurConfig {
|
@@ -329,6 +329,7 @@ public class PurpurConfig {
|
||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add some missing Pufferfish configurations
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||||
index c97ef420581803b569d130b58a97f67d1fee54f2..e562dffdf84612b50c5d464f9913cfe8ec5c6279 100644
|
index bcc3458afac5ece9637df63b9d02c445aa0a4ef9..0ee7a663988bbcc37d72da690fa9372ca1d14425 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||||
@@ -168,10 +168,12 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
@@ -168,10 +168,12 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Completely remove Mojang Profiler
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 8e5492bbdddb199bee021d79769ed2ee051128cf..e915f2cbf83e0eed9faa30e48740617b74d4e4cd 100644
|
index 389322d3ca9b1f3789271936a7e6c60bd7c27893..6ca87960654becdc7fd7d9b8465a140c0db2b8b9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -113,16 +113,16 @@ import net.minecraft.util.Unit;
|
@@ -113,16 +113,16 @@ import net.minecraft.util.Unit;
|
||||||
@@ -79,7 +79,7 @@ index 8e5492bbdddb199bee021d79769ed2ee051128cf..e915f2cbf83e0eed9faa30e48740617b
|
|||||||
private void endMetricsRecordingTick() {
|
private void endMetricsRecordingTick() {
|
||||||
//this.profiler.endTick(); // Purpur
|
//this.profiler.endTick(); // Purpur
|
||||||
diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
diff --git a/src/main/java/net/minecraft/server/ServerAdvancementManager.java b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
||||||
index ebcd2bbcf8f25c52de3deaff32a8522dbf662141..0ff246c5f7c6f02c12a55b1d9c7b35ad3fd4c1c0 100644
|
index 8189c549edd14a351fc5e75be23da7378bbd3532..8c44b54aa6b3db4f52d0d6ad7f3d341f11b293f7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
--- a/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
+++ b/src/main/java/net/minecraft/server/ServerAdvancementManager.java
|
||||||
@@ -22,7 +22,7 @@ import net.minecraft.resources.ResourceLocation;
|
@@ -22,7 +22,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
@@ -136,7 +136,7 @@ index 097ac55028d66ef9ab430ff5dd103db6e3b99fc7..2993e9f326c43ef3f06d5e332899f9fa
|
|||||||
|
|
||||||
public class ServerFunctionManager {
|
public class ServerFunctionManager {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 3771caa73..a88f6bbed 100644
|
index 3771caa73b0b41428f3d629aca1f562df7bcfaff..a88f6bbed191b6fd3ef2da625df45520331cf7d7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -68,7 +68,7 @@ import net.minecraft.server.level.progress.ChunkProgressListener;
|
@@ -68,7 +68,7 @@ import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||||
@@ -162,7 +162,7 @@ index 43a46feb5fb4bf23d71bc4f6c08caa93b1959ffc..16c2db8fbfcaf15efb94c04e1bb2508e
|
|||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.ai.village.poi.PoiManager;
|
import net.minecraft.world.entity.ai.village.poi.PoiManager;
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index e46207a25..9301ec814 100644
|
index e46207a250a5456589da06fd5fad2a385ef7d4a5..9301ec8142fbf5c5112cac75aef1b8e35737ce43 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -77,7 +77,7 @@ import net.minecraft.util.Mth;
|
@@ -77,7 +77,7 @@ import net.minecraft.util.Mth;
|
||||||
@@ -652,7 +652,7 @@ index 863343a87fe34d72f04af89d75268b477b2adc7a..00000000000000000000000000000000
|
|||||||
- }
|
- }
|
||||||
-}
|
-}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index 599094f231787db475882c38721b724a2e3bf41c..620b5011a675e456ac685d4323df233b5b8f8799 100644
|
index 80c03bd4e5d7e20bb8a4e14af5620f5c57a05fd4..aeae6117b398b84d5c8ecaa175a72867416ff166 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -147,8 +147,8 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
@@ -147,8 +147,8 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
@@ -701,7 +701,7 @@ index 02978315bc2b828cc603ce7478408f3f82c249c2..4f9b19c45afd6b26833ba892a90d3a95
|
|||||||
public void addGoal(int priority, Goal goal) {
|
public void addGoal(int priority, Goal goal) {
|
||||||
this.availableGoals.add(new WrappedGoal(priority, goal));
|
this.availableGoals.add(new WrappedGoal(priority, goal));
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||||
index 666fc85bc2079cb367b340f2605f29fe002f4d22..36c60716c6aaa446ff7123a3babafb2edd2266ac 100644
|
index 388363948595247471fa4c3c6801fc493d61c0d0..6851ee45b5b41cf549a8aed14d95545b0d120414 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
||||||
@@ -31,7 +31,7 @@ import net.minecraft.resources.ResourceLocation;
|
@@ -31,7 +31,7 @@ import net.minecraft.resources.ResourceLocation;
|
||||||
@@ -7,6 +7,21 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencyResolutionManagement {
|
||||||
|
versionCatalogs {
|
||||||
|
create("libs") {}
|
||||||
|
create("api") {
|
||||||
|
from(files("libs/api.versions.toml"))
|
||||||
|
}
|
||||||
|
create("server") {
|
||||||
|
from(files("libs/server.versions.toml"))
|
||||||
|
}
|
||||||
|
create("common") {
|
||||||
|
from(files("libs/common.versions.toml"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
rootProject.name = "plazma"
|
rootProject.name = "plazma"
|
||||||
for (name in listOf("Plazma-API", "Plazma-Server")) {
|
for (name in listOf("Plazma-API", "Plazma-Server")) {
|
||||||
val projName = name.lowercase(Locale.ENGLISH)
|
val projName = name.lowercase(Locale.ENGLISH)
|
||||||
|
|||||||
Reference in New Issue
Block a user