Upstream has released updates that appear to apply and compile correctly. [Purpur Changes] PurpurMC/Purpur@a52426c: Updated Upstream (Paper) PurpurMC/Purpur@86ad0b3: Updated Upstream (Paper) PurpurMC/Purpur@79d199c: Updated Upstream (Paper) PurpurMC/Purpur@7708a4c: don't send keepalive packet early, closes #1520 PurpurMC/Purpur@4873495: add config to reverse bubble column flow for soulsand and magma blocks PurpurMC/Purpur@eac4198: Updated Upstream (Paper) PurpurMC/Purpur@7219263: [ci skip] inline fqn imports PurpurMC/Purpur@cc56332: Final 1.20.6 Paper Upstream \o/ PurpurMC/Purpur@f1c87e4: add missing armadillo & bogged options, closes #1527 PurpurMC/Purpur@d259ed5: prepare for update PurpurMC/Purpur@1544081: Updated Upstream (Paper) PurpurMC/Purpur@e2b5e14: apply API patches PurpurMC/Purpur@7c38d97: first 5 patches! PurpurMC/Purpur@0ab7756: ridables patch \o/ PurpurMC/Purpur@085de5a: first 50 patches \o/ PurpurMC/Purpur@b191556: 100 patches \o/ PurpurMC/Purpur@2a4d2e5: 150 patches \o/ PurpurMC/Purpur@c716c80: 200 patches \o/ PurpurMC/Purpur@699969f: 250 patches \o/ PurpurMC/Purpur@cfc96e0: all patches apply \o/ PurpurMC/Purpur@59c536c: Updated Upstream (Paper) PurpurMC/Purpur@20e182a: Updated Upstream (Paper) PurpurMC/Purpur@973bcd4: drop damage-with-frost-walker option - can be done with a datapack PurpurMC/Purpur@331c216: re-add timings/mojang profiler removal patches PurpurMC/Purpur@b27c8b2: add back leashable villagers option PurpurMC/Purpur@6b2acdc: infinity on crossbows can be done with datapacks now PurpurMC/Purpur@c3829f2: add back portal permission bypass patch PurpurMC/Purpur@0510294: add back fix-stuck-in-portal patch PurpurMC/Purpur@dedcdd0: re-add generated api patches PurpurMC/Purpur@00126e8: re-add removing curse of binding with weakness patch PurpurMC/Purpur@09ec31b: infinity bow settings can be done through a datapack PurpurMC/Purpur@cdb192f: mending muliplier is better done through a datapack PurpurMC/Purpur@bf6dbdd: fix timings/profiler compilation issues PurpurMC/Purpur@6e1147f: Updated Upstream (Paper) PurpurMC/Purpur@c991735: Fix compilation issues (#1530) PurpurMC/Purpur@25ecbc4: rename enchantment convenience patch PurpurMC/Purpur@ea406a0: use matchingSlot helper method PurpurMC/Purpur@4dca11b: elytra.ignore-unbreaking option can probably be done through datapacks now PurpurMC/Purpur@fa88174: clear out TODOs PurpurMC/Purpur@04a9fec: reuse extrainfo in crash report PurpurMC/Purpur@45774b4: apply the rest of the unapplied patches PurpurMC/Purpur@dd826a3: Updated Upstream (Paper) PurpurMC/Purpur@778995d: Updated Upstream (Paper) PurpurMC/Purpur@9ff84cb: Updated Upstream (Paper) PurpurMC/Purpur@bd49055: [ci skip] replace paper with purpur in log message PurpurMC/Purpur@a122fd7: Updated Upstream (Paper) PurpurMC/Purpur@783acfe: Updated Upstream (Paper) PurpurMC/Purpur@b5f1c48: Updated Upstream (Paper) PurpurMC/Purpur@c0f5e78: add default silverfish movement speed & attack damage attributes PurpurMC/Purpur@b82f693: configurable mob size attribute (#1538) PurpurMC/Purpur@e05f91b: [ci skip] move import to config patch PurpurMC/Purpur@2ba7bee: Updated Upstream (Paper) PurpurMC/Purpur@19da21c: Updated Upstream (Paper) PurpurMC/Purpur@21ec259: fix kickForOutOfOrderChat being applied in the incorrect spot PurpurMC/Purpur@9efd5fc: Updated Upstream (Paper) PurpurMC/Purpur@ad910f8: Updated Upstream (Paper) PurpurMC/Purpur@39617d5: entities with passengers can go through portals now, closes #1540 PurpurMC/Purpur@7d59f25: fix blast resistence config not accepting namespaced values PurpurMC/Purpur@1615793: set burp delay in the correct spot PurpurMC/Purpur@797ce6b: Updated Upstream (Paper) PurpurMC/Purpur@ac6c312: Updated Upstream (Paper) PurpurMC/Purpur@d5c06b4: fix summon_entity effect attempting to add incorrect entity, closes #1545 PurpurMC/Purpur@faa1f93: add PlayerSetTrialSpawnerTypeWithEggEvent, fixes #1546 (#1547) PurpurMC/Purpur@1ab7990: Updated Upstream (Paper) PurpurMC/Purpur@8b987b1: fix infinityWorksWithoutArrows not working PurpurMC/Purpur@de2e7a7: Updated Upstream (Paper) PurpurMC/Purpur@cb0f04b: Updated Upstream (Paper) PurpurMC/Purpur@ff19bcc: Updated Upstream (Paper) PurpurMC/Purpur@b3709b1: Updated Upstream (Paper) PurpurMC/Purpur@5e70800: Updated Upstream (Paper) PurpurMC/Purpur@14136b8: Updated Upstream (Paper) PurpurMC/Purpur@458dc18: Updated Upstream (Paper), closes #1556 PurpurMC/Purpur@87cf9f1: Updated Upstream (Paper) PurpurMC/Purpur@bf63cfa: Updated Upstream (Paper) PurpurMC/Purpur@8f0f20d: Updated Upstream (Paper) PurpurMC/Purpur@86a6543: Updated Upstream (Paper) PurpurMC/Purpur@2e39567: Re-add missing chunk api calls, fixes #1560 PurpurMC/Purpur@eadfff7: Updated Upstream (Paper) PurpurMC/Purpur@65d3665: Updated Upstream (Paper) PurpurMC/Purpur@936c29a: Updated Upstream (Paper) PurpurMC/Purpur@032697e: Updated Upstream (Paper) PurpurMC/Purpur@b2d1fea: always output bukkit/paper plugin header in plugin command PurpurMC/Purpur@61b63b1: Updated Upstream (Paper) PurpurMC/Purpur@c3849be: Fire EntityTeleportHinderedEvent when attempting to teleport a player with passengers (#1563) PurpurMC/Purpur@7e0ca92: [ci skip] missed rebranding PurpurMC/Purpur@82ccc76: Updated Upstream (Paper) PurpurMC/Purpur@72ccfbd: Updated Upstream (Paper) PurpurMC/Purpur@0bd5579: Updated Upstream (Paper) PurpurMC/Purpur@b3623fa: Updated Upstream (Paper) PurpurMC/Purpur@9e444c5: Add Entities can use portals patch back (#1571) PurpurMC/Purpur@930003b: Updated Upstream (Paper) PurpurMC/Purpur@7950960: Updated Upstream (Paper) PurpurMC/Purpur@02e4e76: Updated Upstream (Paper) PurpurMC/Purpur@afabbc9: missed these PurpurMC/Purpur@73a90e8: Updated Upstream (Paper) PurpurMC/Purpur@75e81d8: deprecate old anvil api methods PurpurMC/Purpur@699448c: Merge branch 'ver/1.21' into ver/1.21.1 PurpurMC/Purpur@4e55e26: final 1.21 Paper upstream PurpurMC/Purpur@edd9be7: Merge branch 'ver/1.21' into ver/1.21.1 PurpurMC/Purpur@abf2f21: Updated Upstream (Paper) PurpurMC/Purpur@366af80: Updated Upstream (Paper) PurpurMC/Purpur@07979c3: Updated Upstream (Paper) PurpurMC/Purpur@3f790ac: Updated Upstream (Paper) PurpurMC/Purpur@201e928: Updated Upstream (Pufferfish) (#1575) PurpurMC/Purpur@f2307b8: Updated Upstream (Paper) PurpurMC/Purpur@bba87bf: Updated Upstream (Paper) PurpurMC/Purpur@f530395: Fix no exp drops from spawners using silk touch pickaxe without option enabled (#1582) PurpurMC/Purpur@3510a9e: Updated Upstream (Paper) PurpurMC/Purpur@1d3cef7: Updated Upstream (Paper) PurpurMC/Purpur@c4a6f63: Updated Upstream (Paper) PurpurMC/Purpur@568a028: Updated Upstream (Paper) PurpurMC/Purpur@ef12ede: Updated Upstream (Paper) PurpurMC/Purpur@a61db94: Updated Upstream (Paper) PurpurMC/Purpur@5c0d2f7: Updated Upstream (Paper) PurpurMC/Purpur@49db849: Updated Upstream (Paper) PurpurMC/Purpur@a43711d: Updated Upstream (Paper) PurpurMC/Purpur@0a9941e: Updated Upstream (Paper) PurpurMC/Purpur@88352c3: Updated Upstream (Paper) PurpurMC/Purpur@dee41bc: Updated Upstream (Paper) PurpurMC/Purpur@fdfc12e: Updated Upstream (Paper) PurpurMC/Purpur@bc7bcbb: Fix elytra durability setting not working properly (#1589) PurpurMC/Purpur@8af4ea6: Updated Upstream (Paper) PurpurMC/Purpur@8332fa4: Updated Upstream (Paper) PurpurMC/Purpur@be61a07: Updated Upstream (Paper) PurpurMC/Purpur@f154903: Updated Upstream (Paper) PurpurMC/Purpur@0fa9a50: Updated Upstream (Paper) PurpurMC/Purpur@d7a7c91: Updated Upstream (Paper) PurpurMC/Purpur@20fa61e: Updated Upstream (Paper) PurpurMC/Purpur@501e7c5: Updated Upstream (Paper) PurpurMC/Purpur@2a50638: Updated Upstream (Paper) PurpurMC/Purpur@639bcbd: Updated Upstream (Paper) PurpurMC/Purpur@bcf8103: remove obsolete allowUnsafeEnchants config option PurpurMC/Purpur@51f15ee: fully remove obsolete allowUnsafeEnchants config option PurpurMC/Purpur@3d0716d: Fix colored shulker box contents not dropping when destroyed, supercedes #1594 PurpurMC/Purpur@12e2926: [ci skip] drop old migration patch PurpurMC/Purpur@212c942: delegate itemstack convenience methods PurpurMC/Purpur@2eaea6a: switch to JSpecify annotations PurpurMC/Purpur@4565f41: these options should be off by default PurpurMC/Purpur@4671e1e: show a message stating the removal of mojang profiler when running perf comamnd, closes #1591 PurpurMC/Purpur@e12a4de: Updated Upstream (Paper) PurpurMC/Purpur@7f490a6: Updated Upstream (Paper) PurpurMC/Purpur@4f2fe31: Updated Upstream (Paper) PurpurMC/Purpur@4b57bed: Updated Upstream (Paper)
174 lines
4.8 KiB
Plaintext
174 lines
4.8 KiB
Plaintext
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|
|
|
plugins {
|
|
java
|
|
`maven-publish`
|
|
`kotlin-dsl`
|
|
`always-up-to-date`
|
|
alias(libs.plugins.shadow) apply false
|
|
alias(libs.plugins.paperweight)
|
|
}
|
|
|
|
val jdkVersion = property("jdkVersion").toString().toInt()
|
|
val providerRepo = property("providerRepo").toString()
|
|
val brandName = property("brandName").toString()
|
|
|
|
kotlin.jvmToolchain(jdkVersion)
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://repo.papermc.io/repository/maven-public/") {
|
|
content { onlyForConfigurations(configurations.paperclip.name) }
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
remapper(libs.remapper)
|
|
decompiler(libs.decompiler)
|
|
paperclip(libs.paperclip)
|
|
}
|
|
|
|
allprojects {
|
|
apply(plugin = "java")
|
|
apply(plugin = "maven-publish")
|
|
|
|
java.toolchain.languageVersion.set(JavaLanguageVersion.of(jdkVersion))
|
|
|
|
publishing.repositories.maven("https://maven.pkg.github.com/$providerRepo") {
|
|
name = "githubPackage"
|
|
url = uri("https://maven.pkg.github.com/$providerRepo")
|
|
|
|
credentials {
|
|
username = System.getenv("GITHUB_USERNAME")
|
|
password = System.getenv("GITHUB_TOKEN")
|
|
}
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
tasks {
|
|
withType<JavaCompile>().configureEach {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
options.release = jdkVersion
|
|
options.compilerArgs.addAll(listOf(
|
|
"--add-modules=jdk.incubator.vector",
|
|
"-Xmaxwarns", "1"
|
|
))
|
|
}
|
|
|
|
withType<Javadoc> {
|
|
options.encoding = Charsets.UTF_8.name()
|
|
}
|
|
|
|
withType<ProcessResources> {
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
}
|
|
|
|
withType<Test> {
|
|
testLogging {
|
|
showStackTraces = true
|
|
exceptionFormat = TestExceptionFormat.FULL
|
|
events(TestLogEvent.STANDARD_OUT)
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
maven("https://jitpack.io")
|
|
maven("https://papermc.io/repo/repository/maven-public/")
|
|
}
|
|
}
|
|
|
|
paperweight {
|
|
serverProject = project(":${brandName.lowercase()}-server")
|
|
|
|
remapRepo = "https://repo.papermc.io/repository/maven-public/"
|
|
decompileRepo = "https://repo.papermc.io/repository/maven-public/"
|
|
|
|
usePaperUpstream(providers.gradleProperty("paperCommit")) {
|
|
withPaperPatcher {
|
|
apiPatchDir.set(projectDir.resolve("patches/api"))
|
|
apiOutputDir.set(projectDir.resolve("$brandName-API"))
|
|
|
|
serverPatchDir.set(projectDir.resolve("patches/server"))
|
|
serverOutputDir.set(projectDir.resolve("$brandName-Server"))
|
|
}
|
|
|
|
patchTasks.register("generatedApi") {
|
|
isBareDirectory = true
|
|
upstreamDirPath = "paper-api-generator/generated"
|
|
patchDir = projectDir.resolve("patches/generated-api")
|
|
outputDir = projectDir.resolve("paper-api-generator/generated")
|
|
}
|
|
}
|
|
}
|
|
|
|
val paperRepoVal = property("paperRepo").toString()
|
|
val paperBranch = property("paperBranch").toString()
|
|
val purpurRepoVal = property("purpurRepo").toString()
|
|
val purpurBranch = property("purpurBranch").toString()
|
|
val pufferfishRepoVal = property("pufferfishRepo").toString()
|
|
val pufferfishBranch = property("pufferfishBranch").toString()
|
|
val isUsePufferfish = property("usePufferfish").toString().toBoolean()
|
|
|
|
alwaysUpToDate {
|
|
|
|
paperRepo.set(paperRepoVal)
|
|
paperRef.set(paperBranch)
|
|
paperCommitName.set("paperCommit")
|
|
|
|
purpurRepo.set(purpurRepoVal)
|
|
purpurRef.set(purpurBranch)
|
|
purpurCommitName.set("purpurCommit")
|
|
|
|
pufferfishRepo.set(pufferfishRepoVal)
|
|
pufferfishRef.set(pufferfishBranch)
|
|
usePufferfish.set(isUsePufferfish)
|
|
|
|
}
|
|
|
|
tasks {
|
|
applyPatches {
|
|
dependsOn("applyGeneratedApiPatches")
|
|
}
|
|
|
|
rebuildPatches {
|
|
dependsOn("rebuildGeneratedApiPatches")
|
|
}
|
|
|
|
generateDevelopmentBundle {
|
|
apiCoordinates.set("${project.group}:${brandName.lowercase()}-api")
|
|
libraryRepositories.addAll(
|
|
"https://repo.maven.apache.org/maven2/",
|
|
"https://maven.pkg.github.com/$providerRepo",
|
|
"https://papermc.io/repo/repository/maven-public/"
|
|
)
|
|
}
|
|
|
|
clean {
|
|
doLast {
|
|
listOf(
|
|
".gradle/caches",
|
|
"$brandName-API",
|
|
"$brandName-Server",
|
|
"paper-api-generator",
|
|
"run",
|
|
|
|
// remove dev environment files
|
|
"0001-fixup.patch",
|
|
"compare.txt"
|
|
).forEach {
|
|
projectDir.resolve(it).deleteRecursively()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications.create<MavenPublication>("devBundle") {
|
|
artifact(tasks.generateDevelopmentBundle) { artifactId = "dev-bundle" }
|
|
}
|
|
}
|