mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-25 12:35:23 +01:00
Update to paperweight 1.1.11
This commit is contained in:
parent
a435d924c1
commit
5288d83ece
32
.github/workflows/build.yml
vendored
Normal file
32
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: Patch and Build
|
||||||
|
on: [ push, pull_request ]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
# Only run on PRs if the source branch is on someone else's repo
|
||||||
|
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Git Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Validate Gradle wrapper
|
||||||
|
uses: gradle/wrapper-validation-action@v1
|
||||||
|
- name: Cache Gradle
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/gradle.properties') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-gradle-
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v2.3.0
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '16'
|
||||||
|
- name: Configure Git User Details
|
||||||
|
run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions"
|
||||||
|
- name: Apply Patches
|
||||||
|
run: ./gradlew applyPatches --stacktrace
|
||||||
|
- name: Build
|
||||||
|
run: ./gradlew build --stacktrace
|
@ -1,41 +1,47 @@
|
|||||||
|
import io.papermc.paperweight.util.constants.*
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
|
`maven-publish`
|
||||||
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
|
id("com.github.johnrengelman.shadow") version "7.0.0" apply false
|
||||||
id("io.papermc.paperweight.patcher") version "1.1.5"
|
id("io.papermc.paperweight.patcher") version "1.1.11"
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven("https://papermc.io/repo/repository/maven-public/") {
|
maven("https://papermc.io/repo/repository/maven-public/") {
|
||||||
content {
|
content { onlyForConfigurations(PAPERCLIP_CONFIG) }
|
||||||
onlyForConfigurations("paperclip")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
maven("https://maven.quiltmc.org/repository/release/") {
|
|
||||||
content {
|
|
||||||
onlyForConfigurations("remapper")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
remapper("org.quiltmc:tiny-remapper:0.4.1")
|
remapper("org.quiltmc:tiny-remapper:0.4.3")
|
||||||
|
decompiler("net.minecraftforge:forgeflower:1.5.498.12")
|
||||||
paperclip("io.papermc:paperclip:2.0.1")
|
paperclip("io.papermc:paperclip:2.0.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
allprojects {
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
|
apply(plugin = "maven-publish")
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
toolchain {
|
||||||
languageVersion.set(JavaLanguageVersion.of(16))
|
languageVersion.set(JavaLanguageVersion.of(16))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.withType<JavaCompile>().configureEach {
|
subprojects {
|
||||||
options.encoding = "UTF-8"
|
tasks.withType<JavaCompile> {
|
||||||
|
options.encoding = Charsets.UTF_8.name()
|
||||||
options.release.set(16)
|
options.release.set(16)
|
||||||
}
|
}
|
||||||
|
tasks.withType<Javadoc> {
|
||||||
|
options.encoding = Charsets.UTF_8.name()
|
||||||
|
}
|
||||||
|
tasks.withType<ProcessResources> {
|
||||||
|
filteringCharset = Charsets.UTF_8.name()
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -51,6 +57,9 @@ subprojects {
|
|||||||
paperweight {
|
paperweight {
|
||||||
serverProject.set(project(":ForkTest-Server"))
|
serverProject.set(project(":ForkTest-Server"))
|
||||||
|
|
||||||
|
remapRepo.set("https://maven.quiltmc.org/repository/release/")
|
||||||
|
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
||||||
|
|
||||||
usePaperUpstream(providers.gradleProperty("paperRef")) {
|
usePaperUpstream(providers.gradleProperty("paperRef")) {
|
||||||
withPaperPatcher {
|
withPaperPatcher {
|
||||||
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
||||||
@ -61,3 +70,50 @@ paperweight {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Everything below here is optional if you don't care about publishing API or dev bundles to your repository
|
||||||
|
//
|
||||||
|
|
||||||
|
tasks.generateDevelopmentBundle {
|
||||||
|
apiCoordinates.set("com.example.paperfork:forktest-api")
|
||||||
|
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
|
||||||
|
libraryRepositories.set(
|
||||||
|
listOf(
|
||||||
|
"https://libraries.minecraft.net/",
|
||||||
|
"https://maven.quiltmc.org/repository/release/",
|
||||||
|
"https://repo.aikar.co/content/groups/aikar",
|
||||||
|
"https://ci.emc.gs/nexus/content/groups/aikar/",
|
||||||
|
"https://papermc.io/repo/repository/maven-public/", // for paper-mojangapi
|
||||||
|
// "https://my.repo/" // This should be a repo hosting your API (in this example, 'com.example.paperfork:forktest-api')
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
// Publishing API:
|
||||||
|
// ./gradlew :ForkTest-API:publish[ToMavenLocal]
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "myRepoSnapshots"
|
||||||
|
url = uri("https://my.repo/")
|
||||||
|
// See Gradle docs for how to provide credentials to PasswordCredentials
|
||||||
|
// https://docs.gradle.org/current/samples/sample_publishing_credentials.html
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
group=com.example.paperfork
|
group=com.example.paperfork
|
||||||
version = 1.17-R0.1-SNAPSHOT
|
version=1.17.1-R0.1-SNAPSHOT
|
||||||
|
|
||||||
mcVersion = 1.17
|
mcVersion=1.17.1
|
||||||
packageVersion = 1_17_R1
|
paperRef=61a09c51023c53997c31ef24849a99262f7ddaf0
|
||||||
paperRef = ea0336dff57f6c3cab42d5e94ae7a82718578dde
|
|
||||||
|
|
||||||
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.vfs.watch=false
|
org.gradle.vfs.watch=false
|
||||||
|
@ -5,21 +5,30 @@ Subject: [PATCH] Build changes
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index f111042223f0d7974785c37245bb60b75388163e..043e5f4a0914fab856f98d39262a7c28c327460f 100644
|
index 1876481a830228fd15fcd2a4be5f2c28bd7e51fe..872b45c4ea41372c8cfb435cec46b643291a2fa5 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -19,8 +19,8 @@ repositories {
|
@@ -28,8 +28,8 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
- implementation(project(":Paper-API"))
|
- implementation(project(":Paper-API"))
|
||||||
- implementation(project(":Paper-MojangAPI"))
|
- implementation(project(":Paper-MojangAPI"))
|
||||||
+ implementation(project(":ForkTest-API")) // ForkTest
|
+ implementation(project(":ForkTest-API")) // ForkTest
|
||||||
+ implementation("com.destroystokyo.paper:paper-mojangapi:1.16.5-R0.1-SNAPSHOT") // ForkTest
|
+ implementation("io.papermc.paper:paper-mojangapi:1.17.1-R0.1-SNAPSHOT") // ForkTest
|
||||||
// Paper start
|
// Paper start
|
||||||
implementation("org.jline:jline-terminal-jansi:3.12.1")
|
implementation("org.jline:jline-terminal-jansi:3.12.1")
|
||||||
implementation("net.minecrell:terminalconsoleappender:1.2.0")
|
implementation("net.minecrell:terminalconsoleappender:1.2.0")
|
||||||
@@ -119,7 +119,7 @@ tasks.test {
|
@@ -80,7 +80,7 @@ tasks.jar {
|
||||||
|
attributes(
|
||||||
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||||
|
"Implementation-Title" to "CraftBukkit",
|
||||||
|
- "Implementation-Version" to "git-Paper-$implementationVersion",
|
||||||
|
+ "Implementation-Version" to "git-ForkTest-$implementationVersion", // ForkTest
|
||||||
|
"Implementation-Vendor" to date, // Paper
|
||||||
|
"Specification-Title" to "Bukkit",
|
||||||
|
"Specification-Version" to project.version,
|
||||||
|
@@ -205,7 +205,7 @@ tasks.test {
|
||||||
fun TaskContainer.registerRunTask(
|
fun TaskContainer.registerRunTask(
|
||||||
name: String, block: JavaExec.() -> Unit
|
name: String, block: JavaExec.() -> Unit
|
||||||
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
||||||
@ -29,10 +38,10 @@ index f111042223f0d7974785c37245bb60b75388163e..043e5f4a0914fab856f98d39262a7c28
|
|||||||
workingDir = rootProject.layout.projectDirectory.dir(
|
workingDir = rootProject.layout.projectDirectory.dir(
|
||||||
providers.gradleProperty("runWorkDir").forUseAtConfigurationTime().orElse("run")
|
providers.gradleProperty("runWorkDir").forUseAtConfigurationTime().orElse("run")
|
||||||
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 c6747f49ae8ddc9fc1bad82ab480f85d0883da5d..804eb17da12b816438a4d4c39fc330c4869cea1d 100644
|
index 3dded5c491ace6b073a7bc3178976bd70f0b9393..72d637ffc00b536357af02a52defe996dceda3b9 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
|
||||||
@@ -1649,7 +1649,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1651,7 +1651,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
public String getServerModName() {
|
public String getServerModName() {
|
||||||
@ -40,12 +49,12 @@ index c6747f49ae8ddc9fc1bad82ab480f85d0883da5d..804eb17da12b816438a4d4c39fc330c4
|
|||||||
+ return "ForkTest"; //ForkTest - ForkTest > //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
+ return "ForkTest"; //ForkTest - ForkTest > //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||||
}
|
}
|
||||||
|
|
||||||
public SystemReport fillSystemReport(SystemReport systemreport) {
|
public SystemReport fillSystemReport(SystemReport details) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 8a98bd1018afd934696fedbed24e271ab6b75f51..84c456ef6a375d84ab52e11a58a4e6fe602733c0 100644
|
index 6d7f16fede01c19f638e1dcdae8b07b79cd86dc0..5b8132b32234536b89601813bdba17410803428a 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -230,7 +230,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -240,7 +240,7 @@ import javax.annotation.Nullable; // Paper
|
||||||
import javax.annotation.Nonnull; // Paper
|
import javax.annotation.Nonnull; // Paper
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
@ -54,3 +63,16 @@ index 8a98bd1018afd934696fedbed24e271ab6b75f51..84c456ef6a375d84ab52e11a58a4e6fe
|
|||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||||
private final Logger logger = Logger.getLogger("Minecraft");
|
private final Logger logger = Logger.getLogger("Minecraft");
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||||
|
index 774556a62eb240da42e84db4502e2ed43495be17..21f39bd0c33ef2635249298e6a247afba8b05742 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||||
|
@@ -11,7 +11,7 @@ public final class Versioning {
|
||||||
|
public static String getBukkitVersion() {
|
||||||
|
String result = "Unknown-Version";
|
||||||
|
|
||||||
|
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/io.papermc.paper/paper-api/pom.properties");
|
||||||
|
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.example.paperfork/forktest-api/pom.properties"); // ForkTest
|
||||||
|
Properties properties = new Properties();
|
||||||
|
|
||||||
|
if (stream != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user