-
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.
- Loading branch information
1 parent
f85ce2c
commit 5f7573b
Showing
21 changed files
with
276 additions
and
171 deletions.
There are no files selected for viewing
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,12 @@ | ||
* 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 | ||
|
||
# Binary files should be left untouched | ||
*.jar binary | ||
|
||
*.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,53 +1,16 @@ | ||
.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 | ||
/cheetah-server/build.gradle.kts | ||
/cheetah-server/src/minecraft | ||
/paper-server | ||
/cheetah-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/ | ||
|
||
cheetah-server | ||
cheetah-api | ||
paper-api-generator | ||
|
||
!gradle/wrapper/gradle-wrapper.jar |
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
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,3 @@ | ||
# This file is auto generated, any changes may be overridden! | ||
# See CONTRIBUTING.md on how to add access transformers. | ||
public net.minecraft.data.registries.TradeRebalanceRegistries BUILDER |
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,121 +1,91 @@ | ||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat | ||
import org.gradle.api.tasks.testing.logging.TestLogEvent | ||
|
||
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.8" | ||
} | ||
|
||
val paperMavenPublicUrl = "https://papermc.io/repo/repository/maven-public/" | ||
paperweight { | ||
upstreams.paper { | ||
ref = "54debf494f467a71c561cf8765c4f21725c99dd8" | ||
|
||
repositories { | ||
mavenCentral() | ||
maven(paperMavenPublicUrl) { | ||
content { onlyForConfigurations(configurations.paperclip.name) } | ||
} | ||
maven { | ||
name = "gommeRepo" | ||
url = uri("https://repo.gomme.dev/repository/public/") | ||
// credentials(PasswordCredentials::class) | ||
patchFile { | ||
path = "paper-server/build.gradle.kts" | ||
outputFile = file("cheetah-server/build.gradle.kts") | ||
patchFile = file("cheetah-server/build.gradle.kts.patch") | ||
} | ||
patchFile { | ||
path = "paper-api/build.gradle.kts" | ||
outputFile = file("cheetah-api/build.gradle.kts") | ||
patchFile = file("cheetah-api/build.gradle.kts.patch") | ||
} | ||
patchDir("paperApi") { | ||
upstreamPath = "paper-api" | ||
excludes = setOf("build.gradle.kts") | ||
patchesDir = file("cheetah-api/paper-patches") | ||
outputDir = file("paper-api") | ||
} | ||
patchDir("paperApiGenerator") { | ||
upstreamPath = "paper-api-generator" | ||
patchesDir = file("cheetah-api-generator/paper-patches") | ||
outputDir = file("paper-api-generator") | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
remapper("net.fabricmc:tiny-remapper:0.10.3:fat") | ||
decompiler("org.vineflower:vineflower:1.10.1") | ||
paperclip("io.papermc:paperclip:3.0.3") | ||
} | ||
val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" | ||
|
||
allprojects { | ||
apply(plugin = "java") | ||
subprojects { | ||
apply(plugin = "java-library") | ||
apply(plugin = "maven-publish") | ||
|
||
java { | ||
extensions.configure<JavaPluginExtension> { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(21) | ||
} | ||
} | ||
} | ||
|
||
subprojects { | ||
repositories { | ||
mavenCentral() | ||
maven(paperMavenPublicUrl) | ||
} | ||
|
||
dependencies { | ||
// "testRuntimeOnly"("org.junit.platform:junit-platform-launcher") | ||
} | ||
|
||
tasks.withType<AbstractArchiveTask>().configureEach { | ||
isPreserveFileTimestamps = false | ||
isReproducibleFileOrder = true | ||
} | ||
tasks.withType<JavaCompile> { | ||
options.encoding = Charsets.UTF_8.name() | ||
options.release = 21 | ||
options.isFork = true | ||
} | ||
tasks.withType<Javadoc> { | ||
options.encoding = Charsets.UTF_8.name() | ||
} | ||
tasks.withType<ProcessResources> { | ||
filteringCharset = Charsets.UTF_8.name() | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven(paperMavenPublicUrl) | ||
} | ||
} | ||
|
||
paperweight { | ||
serverProject = project(":cheetah-server") | ||
|
||
remapRepo = paperMavenPublicUrl | ||
decompileRepo = paperMavenPublicUrl | ||
|
||
usePaperUpstream(providers.gradleProperty("paperRef")) { | ||
withPaperPatcher { | ||
apiPatchDir = layout.projectDirectory.dir("patches/api") | ||
apiOutputDir = layout.projectDirectory.dir("cheetah-api") | ||
|
||
serverPatchDir = layout.projectDirectory.dir("patches/server") | ||
serverOutputDir = layout.projectDirectory.dir("cheetah-server") | ||
} | ||
|
||
patchTasks.register("generatedApi") { | ||
isBareDirectory = true | ||
upstreamDirPath = "paper-api-generator/generated" | ||
patchDir = layout.projectDirectory.dir("patches/generated-api") | ||
outputDir = layout.projectDirectory.dir("paper-api-generator/generated") | ||
tasks.withType<Test> { | ||
testLogging { | ||
showStackTraces = true | ||
exceptionFormat = TestExceptionFormat.FULL | ||
events(TestLogEvent.STANDARD_OUT) | ||
} | ||
} | ||
} | ||
|
||
// | ||
// Everything below here is optional if you don't care about publishing API or dev bundles to your repository | ||
// | ||
|
||
tasks.generateDevelopmentBundle { | ||
apiCoordinates = "net.gommehd.cheetah:cheetah-api" | ||
libraryRepositories.set( | ||
listOf( | ||
"https://repo.maven.apache.org/maven2/", | ||
paperMavenPublicUrl, | ||
"https://repo.gomme.dev/repository/snapshots/", // This should be a repo hosting your API (in this example, 'com.example.paperfork:forktest-api') | ||
) | ||
) | ||
} | ||
|
||
allprojects { | ||
// Publishing API: | ||
// ./gradlew :cheetah-api:publish[ToMavenLocal] | ||
publishing { | ||
extensions.configure<PublishingExtension> { | ||
repositories { | ||
maven { | ||
name = "gommeRepo" | ||
url = uri("https://repo.gomme.dev/repository/snapshots/") | ||
// See Gradle docs for how to provide credentials to PasswordCredentials | ||
// https://docs.gradle.org/current/samples/sample_publishing_credentials.html | ||
/* | ||
maven("https://repo.papermc.io/repository/maven-snapshots/") { | ||
name = "paperSnapshots" | ||
credentials(PasswordCredentials::class) | ||
} | ||
} | ||
} | ||
} | ||
|
||
publishing { | ||
// Publishing dev bundle: | ||
// ./gradlew publishDevBundlePublicationTo(MavenLocal|MyRepoSnapshotsRepository) -PpublishDevBundle | ||
if (project.hasProperty("publishDevBundle")) { | ||
publications.create<MavenPublication>("devBundle") { | ||
artifact(tasks.generateDevelopmentBundle) { | ||
artifactId = "dev-bundle" | ||
} | ||
*/ | ||
} | ||
} | ||
} |
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,44 @@ | ||
--- a/paper-api/build.gradle.kts | ||
+++ b/paper-api/build.gradle.kts | ||
@@ -105,6 +_,18 @@ | ||
main { | ||
java { | ||
srcDir(generatedApiPath) | ||
+ srcDir(file("../paper-api/src/main/java")) | ||
+ } | ||
+ resources { | ||
+ srcDir(file("../paper-api/src/main/resources")) | ||
+ } | ||
+ } | ||
+ test { | ||
+ java { | ||
+ srcDir(file("../paper-api/src/test/java")) | ||
+ } | ||
+ resources { | ||
+ srcDir(file("../paper-api/src/test/resources")) | ||
} | ||
} | ||
} | ||
@@ -174,7 +_,7 @@ | ||
|
||
tasks.withType<Javadoc> { | ||
val options = options as StandardJavadocDocletOptions | ||
- options.overview = "src/main/javadoc/overview.html" | ||
+ options.overview = "../paper-api/src/main/javadoc/overview.html" | ||
options.use() | ||
options.isDocFilesSubDirs = true | ||
options.links( | ||
@@ -212,11 +_,11 @@ | ||
} | ||
|
||
// workaround for https://github.com/gradle/gradle/issues/4046 | ||
- inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset") | ||
+ inputs.dir("../paper-api/src/main/javadoc").withPropertyName("javadoc-sourceset") | ||
val fsOps = services.fileSystemOperations | ||
doLast { | ||
fsOps.copy { | ||
- from("src/main/javadoc") { | ||
+ from("../paper-api/src/main/javadoc") { | ||
include("**/doc-files/**") | ||
} | ||
into("build/docs/javadoc") |
11 changes: 11 additions & 0 deletions
11
...er-patches/files/src/main/java/io/papermc/paper/advancement/AdvancementDisplay.java.patch
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,11 @@ | ||
--- a/src/main/java/io/papermc/paper/advancement/AdvancementDisplay.java | ||
+++ b/src/main/java/io/papermc/paper/advancement/AdvancementDisplay.java | ||
@@ -27,7 +_,7 @@ | ||
* | ||
* @return the frame type | ||
*/ | ||
- Frame frame(); | ||
+ Frame frame(); // patch | ||
|
||
/** | ||
* Gets the advancement title. |
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,2 @@ | ||
public class ForkFile { | ||
} |
Oops, something went wrong.