-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Edenor-Minecraft/1.21.4-hard-fork
Implement Hard Fork
- Loading branch information
Showing
169 changed files
with
4,818 additions
and
7,101 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
* text=auto | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
*.sh text eol=lf | ||
gradlew text eol=lf | ||
*.bat text eol=crlf | ||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
||
*.jar binary | ||
# Binary files should be left untouched | ||
*.jar binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,19 @@ | ||
.gradle/ | ||
build/ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Eclipse stuff | ||
.classpath | ||
.project | ||
.settings/ | ||
# Ignore Gradle build output directory | ||
build | ||
|
||
# VSCode stuff | ||
.vscode/ | ||
/run | ||
|
||
# netbeans | ||
nbproject/ | ||
nbactions.xml | ||
/folia-server/build.gradle.kts | ||
/folia-server/src/minecraft | ||
/foldenor-server/build.gradle.kts | ||
/foldenor-server/src/minecraft | ||
/paper-server | ||
/folia-api/build.gradle.kts | ||
/foldenor-api/build.gradle.kts | ||
/paper-api | ||
/paper-api-generator | ||
|
||
# we use maven! | ||
build.xml | ||
|
||
# maven | ||
target/ | ||
dependency-reduced-pom.xml | ||
|
||
# vim | ||
.*.sw[a-p] | ||
|
||
# various other potential build files | ||
build/ | ||
bin/ | ||
dist/ | ||
manifest.mf | ||
|
||
# Mac filesystem dust | ||
.DS_Store/ | ||
.DS_Store | ||
|
||
# intellij | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
out/ | ||
|
||
# Linux temp files | ||
*~ | ||
|
||
# other stuff | ||
run/ | ||
|
||
Folia-Server | ||
Folia-API | ||
|
||
!gradle/wrapper/gradle-wrapper.jar | ||
Foldenor-Server/ | ||
Foldenor-API/ | ||
.патчи | ||
/paper-api-generator/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +0,0 @@ | ||
# We would like for paperweight to generate 100% perfect reobf mappings (and deobf mappings for that matter). | ||
# But unfortunately it's not quite there yet - and it may be some time before that happens. Generating perfect mappings | ||
# from Spigot's mappings is extremely difficult due to Spigot's bad tooling and bad mappings. To add insult to injury | ||
# we remap Spigot's _source code_ which is a lot more complex and error-prone than bytecode remapping. So with all that | ||
# said, this file exists to help fill in the gap. | ||
# | ||
# We will continue to improve paperweight and will work on fixing these issues so they don't come up in the first place, | ||
# but these mappings exist to prevent these issues from holding everything else in Paper up while we work through all | ||
# of these issues. Due to the complex nature of mappings generation and the debugging difficulty involved it may take | ||
# a significant amount of time for us to track down every possible issue, so this file will likely be around and in | ||
# use - at least in some capacity - for a long time. | ||
# | ||
# If you are adding mappings patches which are correcting for issues in paperweight's reobf mappings generation, | ||
# unrelated to any changes in your patches, we ask that you PR the mapping to Paper so more users can benefit rather | ||
# than keep the fix for your own fork. If the mappings patch is there to correct reobf for changes made in your patches, | ||
# then obviously it doesn't make any sense to PR them upstream. | ||
|
||
tiny 2 0 mojang+yarn spigot | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,111 @@ | ||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat | ||
import org.gradle.api.tasks.testing.logging.TestLogEvent | ||
import io.papermc.paperweight.tasks.RebuildGitPatches | ||
|
||
plugins { | ||
java | ||
`maven-publish` | ||
id("io.papermc.paperweight.patcher") version "1.7.7" | ||
java // TODO java launcher tasks | ||
id("io.papermc.paperweight.patcher") version "2.0.0-beta.13" | ||
} | ||
|
||
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" | ||
|
||
repositories { | ||
mavenCentral() | ||
maven(paperMavenPublicUrl) { | ||
content { onlyForConfigurations(configurations.paperclip.name) } | ||
paperweight { | ||
upstreams.register("Folia") { | ||
repo = github("PaperMC", "Folia") | ||
ref = providers.gradleProperty("foliaRef") | ||
|
||
patchFile { | ||
path = "folia-server/build.gradle.kts" | ||
outputFile = file("foldenor-server/build.gradle.kts") | ||
patchFile = file("foldenor-server/build.gradle.kts.patch") | ||
} | ||
patchFile { | ||
path = "folia-api/build.gradle.kts" | ||
outputFile = file("foldenor-api/build.gradle.kts") | ||
patchFile = file("foldenor-api/build.gradle.kts.patch") | ||
} | ||
patchRepo("paperApi") { | ||
upstreamPath = "paper-api" | ||
patchesDir = file("foldenor-api/paper-patches") | ||
outputDir = file("paper-api") | ||
} | ||
patchRepo("paperApiGenerator") { | ||
upstreamPath = "paper-api-generator" | ||
patchesDir = file("foldenor-api-generator/paper-patches") | ||
outputDir = file("paper-api-generator") | ||
} | ||
patchDir("foliaApi") { | ||
upstreamPath = "folia-api" | ||
excludes = listOf("build.gradle.kts", "build.gradle.kts.patch", "paper-patches") | ||
patchesDir = file("foldenor-api/fork-patches") | ||
outputDir = file("folia-api") | ||
} | ||
} | ||
maven("https://maven.nostal.ink/repository/maven-snapshots/") | ||
} | ||
|
||
dependencies { | ||
remapper("net.fabricmc:tiny-remapper:0.10.3:fat") | ||
decompiler("org.vineflower:vineflower:1.10.1") | ||
paperclip("io.papermc:paperclip:3.0.3") | ||
} | ||
|
||
allprojects { | ||
apply(plugin = "java") | ||
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" | ||
|
||
subprojects { | ||
apply(plugin = "java-library") | ||
apply(plugin = "maven-publish") | ||
|
||
java { | ||
toolchain { | ||
languageVersion.set(JavaLanguageVersion.of(21)) | ||
languageVersion = JavaLanguageVersion.of(21) | ||
} | ||
} | ||
|
||
/*publishing { | ||
repositories { | ||
maven { | ||
name = "githubPackage" | ||
url = uri("https://maven.pkg.github.com/Edenor-Minecraft/Foldenor") | ||
credentials { | ||
username = System.getenv("GITHUB_USERNAME") | ||
password = System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
publications.register<MavenPublication>("gpr") { | ||
from(components["java"]) | ||
} | ||
} | ||
}*/ | ||
} | ||
repositories { | ||
mavenCentral() | ||
maven(paperMavenPublicUrl) | ||
} | ||
|
||
subprojects { | ||
tasks.withType<AbstractArchiveTask>().configureEach { | ||
isPreserveFileTimestamps = false | ||
isReproducibleFileOrder = true | ||
} | ||
tasks.withType<JavaCompile> { | ||
options.encoding = Charsets.UTF_8.name() | ||
options.release.set(21) | ||
options.release = 21 | ||
options.isFork = true | ||
} | ||
tasks.withType<Javadoc> { | ||
options.encoding = Charsets.UTF_8.name() | ||
} | ||
tasks.withType<ProcessResources> { | ||
filteringCharset = Charsets.UTF_8.name() | ||
} | ||
tasks.withType<Test> { | ||
testLogging { | ||
showStackTraces = true | ||
exceptionFormat = TestExceptionFormat.FULL | ||
events(TestLogEvent.STANDARD_OUT) | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven(paperMavenPublicUrl) | ||
extensions.configure<PublishingExtension> { | ||
repositories { | ||
/* | ||
maven("https://repo.papermc.io/repository/maven-snapshots/") { | ||
name = "paperSnapshots" | ||
credentials(PasswordCredentials::class) | ||
} | ||
*/ | ||
} | ||
} | ||
} | ||
|
||
paperweight { | ||
serverProject.set(project(":foldenor-server")) | ||
|
||
remapRepo.set(paperMavenPublicUrl) | ||
decompileRepo.set(paperMavenPublicUrl) | ||
|
||
useStandardUpstream("Folia") { | ||
url.set(github("PaperMC", "Folia")) | ||
ref.set(providers.gradleProperty("foliaRef")) | ||
|
||
withStandardPatcher { | ||
apiSourceDirPath.set("folia-api") | ||
serverSourceDirPath.set("folia-server") | ||
|
||
apiPatchDir.set(layout.projectDirectory.dir("patches/api")) | ||
apiOutputDir.set(layout.projectDirectory.dir("Foldenor-api")) | ||
tasks.withType<RebuildGitPatches> { | ||
filterPatches.set(false) | ||
} | ||
|
||
serverPatchDir.set(layout.projectDirectory.dir("patches/server")) | ||
serverOutputDir.set(layout.projectDirectory.dir("Foldenor-server")) | ||
} | ||
tasks.register("printMinecraftVersion") { | ||
doLast { | ||
println(providers.gradleProperty("mcVersion").get().trim()) | ||
} | ||
} | ||
|
||
patchTasks.register("generatedApi") { | ||
isBareDirectory = true | ||
upstreamDirPath = "paper-api-generator/generated" | ||
patchDir = layout.projectDirectory.dir("patches/generatedApi") | ||
outputDir = layout.projectDirectory.dir("paper-api-generator/generated") | ||
} | ||
tasks.register("printPaperVersion") { | ||
doLast { | ||
println(project.version) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- a/folia-api/build.gradle.kts | ||
+++ b/folia-api/build.gradle.kts | ||
@@ -104,17 +_,21 @@ | ||
java { | ||
srcDir(generatedApiPath) | ||
srcDir(file("../paper-api/src/main/java")) | ||
+ srcDir(file("../folia-api/src/main/java")) | ||
} | ||
resources { | ||
srcDir(file("../paper-api/src/main/resources")) | ||
+ srcDir(file("../folia-api/src/main/resources")) | ||
} | ||
} | ||
test { | ||
java { | ||
srcDir(file("../paper-api/src/test/java")) | ||
+ srcDir(file("../folia-api/src/test/java")) | ||
} | ||
resources { | ||
srcDir(file("../paper-api/src/test/resources")) | ||
+ srcDir(file("../folia-api/src/test/resources")) | ||
} | ||
} | ||
} |
Oops, something went wrong.