Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
2fa8efce9b
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 82af5dc6 SPIGOT-7396: Add PlayerSignOpenEvent 3f0281ca SPIGOT-7063, PR-763: Add DragonBattle#initiateRespawn with custom EnderCrystals f83c8df4 PR-873: Add PlayerRecipeBookClickEvent 14560d39 SPIGOT-7435: Add TeleportCause#EXIT_BED 2cc6db92 SPIGOT-7422, PR-887: Add API to set sherds on decorated pots 36022f02 PR-883: Add ItemFactory#getSpawnEgg 12eb5c46 PR-881: Update Scoreboard Javadocs, remove explicit exception throwing f6d8d44a PR-882: Add modern time API methods to ban API 21a7b710 Upgrade some Maven plugins to reduce warnings 11fd1225 PR-886: Deprecate the SmithingRecipe constructor as it now does nothing dbd1761d SPIGOT-7406: Improve documentation for getDragonBattle CraftBukkit Changes: d548daac2 SPIGOT-7446: BlockState#update not updating a spawner's type to null 70e0bc050 SPIGOT-7447: Fix --forceUpgrade 6752f1d63 SPIGOT-7396: Add PlayerSignOpenEvent 847b4cad5 SPIGOT-7063, PR-1071: Add DragonBattle#initiateRespawn with custom EnderCrystals c335a555f PR-1212: Add PlayerRecipeBookClickEvent 4be756ecb SPIGOT-7445: Fix opening smithing inventory db70bd6ed SPIGOT-7441: Fix issue placing certain items in creative/op f7fa6d993 SPIGOT-7435: Add TeleportCause#EXIT_BED b435e8e8d SPIGOT-7349: Player#setDisplayName not working when message/format unmodified a2fafdd1d PR-1232: Re-add fix for player rotation 7cf863de1 PR-1233: Remove some old MC bug fixes now fixed in vanilla 08ec344ad Fix ChunkGenerator#generateCaves never being called 5daeb502a SPIGOT-7422, PR-1228: Add API to set sherds on decorated pots 52faa6b32 PR-1224: Add ItemFactory#getSpawnEgg 01cae71b7 SPIGOT-7429: Fix LEFT_CLICK_AIR not working for passable entities and spectators a94277a18 PR-1223: Remove non-existent scoreboard display name/prefix/suffix limits 36b107660 PR-1225: Add modern time API methods to ban API 59ead25bc Upgrade some Maven plugins to reduce warnings 202fc5c4e Increase outdated build delay ce545de57 SPIGOT-7398: TextDisplay#setInterpolationDuration incorrectly updates the line width Spigot Changes: b41c46db Rebuild patches 3374045a SPIGOT-7431: Fix EntityMountEvent returning opposite entities 0ca4eb66 Rebuild patches
395 Zeilen
15 KiB
Diff
395 Zeilen
15 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Kyle Wood <kyle@denwav.dev>
|
|
Date: Thu, 10 Dec 2020 20:50:33 -0800
|
|
Subject: [PATCH] Convert project to Gradle
|
|
|
|
The pom.xml file is deleted in this patch so the patch will fail to
|
|
apply if there are changes made to it from upstream - thus notifying us
|
|
that changes were made.
|
|
|
|
diff --git a/.gitignore b/.gitignore
|
|
index 11038da2e071699d6561a331565db0c8d7850d0e..317acfec5894101294a55abff61819431e6a5e65 100644
|
|
--- a/.gitignore
|
|
+++ b/.gitignore
|
|
@@ -1,3 +1,5 @@
|
|
+.gradle/
|
|
+
|
|
# Eclipse stuff
|
|
/.classpath
|
|
/.project
|
|
@@ -31,3 +33,7 @@
|
|
*.ipr
|
|
*.iws
|
|
.idea/
|
|
+
|
|
+# vs code
|
|
+/.vscode
|
|
+/.factorypath
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..232cc8fafb1d7d9730cf2f58777e8977995ec28b
|
|
--- /dev/null
|
|
+++ b/build.gradle.kts
|
|
@@ -0,0 +1,85 @@
|
|
+plugins {
|
|
+ `java-library`
|
|
+ `maven-publish`
|
|
+}
|
|
+
|
|
+java {
|
|
+ withSourcesJar()
|
|
+ withJavadocJar()
|
|
+}
|
|
+
|
|
+val annotationsVersion = "24.0.1"
|
|
+
|
|
+dependencies {
|
|
+ // api dependencies are listed transitively to API consumers
|
|
+ api("com.google.guava:guava:31.1-jre")
|
|
+ api("com.google.code.gson:gson:2.10")
|
|
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
|
+ api("org.yaml:snakeyaml:2.0")
|
|
+ api("org.joml:joml:1.10.5")
|
|
+
|
|
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
|
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
|
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
|
+
|
|
+ val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
|
|
+ compileOnly(annotations)
|
|
+ testCompileOnly(annotations)
|
|
+
|
|
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
|
+ testImplementation("junit:junit:4.13.2")
|
|
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
|
|
+ testImplementation("org.ow2.asm:asm-tree:9.5")
|
|
+}
|
|
+
|
|
+configure<PublishingExtension> {
|
|
+ publications.create<MavenPublication>("maven") {
|
|
+ from(components["java"])
|
|
+ }
|
|
+}
|
|
+
|
|
+val generateApiVersioningFile by tasks.registering {
|
|
+ inputs.property("version", project.version)
|
|
+ val pomProps = layout.buildDirectory.file("pom.properties")
|
|
+ outputs.file(pomProps)
|
|
+ val projectVersion = project.version
|
|
+ doLast {
|
|
+ pomProps.get().asFile.writeText("version=$projectVersion")
|
|
+ }
|
|
+}
|
|
+
|
|
+tasks.jar {
|
|
+ from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
|
|
+ into("META-INF/maven/${project.group}/${project.name}")
|
|
+ }
|
|
+ manifest {
|
|
+ attributes(
|
|
+ "Automatic-Module-Name" to "org.bukkit"
|
|
+ )
|
|
+ }
|
|
+}
|
|
+
|
|
+tasks.withType<Javadoc> {
|
|
+ val options = options as StandardJavadocDocletOptions
|
|
+ options.overview = "src/main/javadoc/overview.html"
|
|
+ options.use()
|
|
+ options.isDocFilesSubDirs = true
|
|
+ options.links(
|
|
+ "https://guava.dev/releases/31.1-jre/api/docs/",
|
|
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
|
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
|
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
|
+ )
|
|
+ options.tags("apiNote:a:API Note:")
|
|
+
|
|
+ // workaround for https://github.com/gradle/gradle/issues/4046
|
|
+ inputs.dir("src/main/javadoc").withPropertyName("javadoc-sourceset")
|
|
+ doLast {
|
|
+ copy {
|
|
+ from("src/main/javadoc") {
|
|
+ include("**/doc-files/**")
|
|
+ }
|
|
+ into("build/docs/javadoc")
|
|
+ }
|
|
+ }
|
|
+}
|
|
diff --git a/pom.xml b/pom.xml
|
|
deleted file mode 100644
|
|
index c513b14a874045c14968c9f157621b3e18c3add1..0000000000000000000000000000000000000000
|
|
--- a/pom.xml
|
|
+++ /dev/null
|
|
@@ -1,270 +0,0 @@
|
|
-
|
|
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
- <modelVersion>4.0.0</modelVersion>
|
|
-
|
|
- <groupId>org.spigotmc</groupId>
|
|
- <artifactId>spigot-api</artifactId>
|
|
- <version>1.20.1-R0.1-SNAPSHOT</version>
|
|
- <packaging>jar</packaging>
|
|
-
|
|
- <name>Spigot-API</name>
|
|
- <url>https://www.spigotmc.org/</url>
|
|
- <description>An enhanced plugin API for Minecraft servers.</description>
|
|
-
|
|
- <properties>
|
|
- <skipTests>true</skipTests>
|
|
- <maven.compiler.source>1.8</maven.compiler.source>
|
|
- <maven.compiler.target>1.8</maven.compiler.target>
|
|
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
- </properties>
|
|
-
|
|
- <distributionManagement>
|
|
- <repository>
|
|
- <id>spigotmc-releases</id>
|
|
- <url>https://hub.spigotmc.org/nexus/content/repositories/releases/</url>
|
|
- </repository>
|
|
- <snapshotRepository>
|
|
- <id>spigotmc-snapshots</id>
|
|
- <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
|
- </snapshotRepository>
|
|
- </distributionManagement>
|
|
-
|
|
- <dependencies>
|
|
- <!-- bundled with Minecraft, should be kept in sync -->
|
|
- <dependency>
|
|
- <groupId>com.google.guava</groupId>
|
|
- <artifactId>guava</artifactId>
|
|
- <version>31.1-jre</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <!-- bundled with Minecraft, should be kept in sync -->
|
|
- <dependency>
|
|
- <groupId>com.google.code.gson</groupId>
|
|
- <artifactId>gson</artifactId>
|
|
- <version>2.10</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <!-- bundled with Minecraft, should be kept in sync -->
|
|
- <dependency>
|
|
- <groupId>org.joml</groupId>
|
|
- <artifactId>joml</artifactId>
|
|
- <version>1.10.5</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>net.md-5</groupId>
|
|
- <artifactId>bungeecord-chat</artifactId>
|
|
- <version>1.16-R0.4</version>
|
|
- <type>jar</type>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.yaml</groupId>
|
|
- <artifactId>snakeyaml</artifactId>
|
|
- <version>2.0</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <!-- not part of the API proper -->
|
|
- <dependency>
|
|
- <groupId>org.apache.maven</groupId>
|
|
- <artifactId>maven-resolver-provider</artifactId>
|
|
- <version>3.8.5</version>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.apache.maven.resolver</groupId>
|
|
- <artifactId>maven-resolver-connector-basic</artifactId>
|
|
- <version>1.7.3</version>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.apache.maven.resolver</groupId>
|
|
- <artifactId>maven-resolver-transport-http</artifactId>
|
|
- <version>1.7.3</version>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <!-- annotations -->
|
|
- <dependency>
|
|
- <groupId>org.jetbrains</groupId>
|
|
- <artifactId>annotations-java5</artifactId>
|
|
- <version>24.0.1</version>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <!-- testing -->
|
|
- <dependency>
|
|
- <groupId>junit</groupId>
|
|
- <artifactId>junit</artifactId>
|
|
- <version>4.13.2</version>
|
|
- <scope>test</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.hamcrest</groupId>
|
|
- <artifactId>hamcrest-library</artifactId>
|
|
- <version>1.3</version>
|
|
- <scope>test</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.ow2.asm</groupId>
|
|
- <artifactId>asm-tree</artifactId>
|
|
- <version>9.5</version>
|
|
- <scope>test</scope>
|
|
- </dependency>
|
|
- </dependencies>
|
|
-
|
|
- <build>
|
|
- <plugins>
|
|
- <plugin>
|
|
- <groupId>net.md-5</groupId>
|
|
- <artifactId>scriptus</artifactId>
|
|
- <version>0.5.0</version>
|
|
- <executions>
|
|
- <execution>
|
|
- <phase>initialize</phase>
|
|
- <goals>
|
|
- <goal>describe</goal>
|
|
- </goals>
|
|
- </execution>
|
|
- </executions>
|
|
- </plugin>
|
|
- <plugin>
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
- <artifactId>maven-compiler-plugin</artifactId>
|
|
- <version>3.11.0</version>
|
|
- <configuration>
|
|
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
|
|
- <compilerId>eclipse</compilerId>
|
|
- <!-- default changed with version 3.11.0 -->
|
|
- <showWarnings>false</showWarnings>
|
|
- </configuration>
|
|
- <dependencies>
|
|
- <dependency>
|
|
- <groupId>org.codehaus.plexus</groupId>
|
|
- <artifactId>plexus-compiler-eclipse</artifactId>
|
|
- <version>2.13.0</version>
|
|
- </dependency>
|
|
- </dependencies>
|
|
- </plugin>
|
|
- <plugin>
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
- <artifactId>maven-jar-plugin</artifactId>
|
|
- <version>3.3.0</version>
|
|
- <configuration>
|
|
- <archive>
|
|
- <manifest>
|
|
- <addDefaultEntries>false</addDefaultEntries>
|
|
- </manifest>
|
|
- <manifestEntries>
|
|
- <Automatic-Module-Name>org.bukkit</Automatic-Module-Name>
|
|
- </manifestEntries>
|
|
- </archive>
|
|
- </configuration>
|
|
- </plugin>
|
|
- <plugin>
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
- <artifactId>maven-shade-plugin</artifactId>
|
|
- <version>3.5.0</version>
|
|
- <executions>
|
|
- <execution>
|
|
- <phase>package</phase>
|
|
- <goals>
|
|
- <goal>shade</goal>
|
|
- </goals>
|
|
- </execution>
|
|
- </executions>
|
|
- <configuration>
|
|
- <filters>
|
|
- <filter>
|
|
- <artifact>*:*</artifact>
|
|
- <excludes>
|
|
- <exclude>META-INF/MANIFEST.MF</exclude>
|
|
- </excludes>
|
|
- </filter>
|
|
- </filters>
|
|
- <!-- when downloading via Maven we can pull depends individually -->
|
|
- <shadedArtifactAttached>true</shadedArtifactAttached>
|
|
- <!-- In 3.3.0 and later, shadedArtifactAttached causes dependant projects to use dependency reduced pom (bug?) -->
|
|
- <createDependencyReducedPom>false</createDependencyReducedPom>
|
|
- </configuration>
|
|
- </plugin>
|
|
- <plugin>
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
- <artifactId>maven-javadoc-plugin</artifactId>
|
|
- <version>3.5.0</version>
|
|
- <configuration>
|
|
- <links>
|
|
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
|
|
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/2.0/</link>
|
|
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/24.0.1/</link>
|
|
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
|
|
- </links>
|
|
- <tags>
|
|
- <tag>
|
|
- <name>apiNote</name>
|
|
- <placement>a</placement>
|
|
- <head>API Note:</head>
|
|
- </tag>
|
|
- </tags>
|
|
- </configuration>
|
|
- </plugin>
|
|
- </plugins>
|
|
- </build>
|
|
-
|
|
- <profiles>
|
|
- <profile>
|
|
- <id>development</id>
|
|
- <properties>
|
|
- <skipTests>false</skipTests>
|
|
- </properties>
|
|
- <build>
|
|
- <plugins>
|
|
- <plugin>
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
- <artifactId>maven-checkstyle-plugin</artifactId>
|
|
- <version>3.3.0</version>
|
|
- <executions>
|
|
- <execution>
|
|
- <phase>process-classes</phase>
|
|
- <goals>
|
|
- <goal>check</goal>
|
|
- </goals>
|
|
- </execution>
|
|
- </executions>
|
|
- <configuration>
|
|
- <configLocation>checkstyle.xml</configLocation>
|
|
- <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
|
|
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
|
|
- </configuration>
|
|
- <dependencies>
|
|
- <dependency>
|
|
- <groupId>com.puppycrawl.tools</groupId>
|
|
- <artifactId>checkstyle</artifactId>
|
|
- <version>8.45.1</version>
|
|
- </dependency>
|
|
- </dependencies>
|
|
- </plugin>
|
|
- <plugin>
|
|
- <groupId>org.codehaus.mojo</groupId>
|
|
- <artifactId>animal-sniffer-maven-plugin</artifactId>
|
|
- <version>1.23</version>
|
|
- <executions>
|
|
- <execution>
|
|
- <phase>process-classes</phase>
|
|
- <goals>
|
|
- <goal>check</goal>
|
|
- </goals>
|
|
- </execution>
|
|
- </executions>
|
|
- <configuration>
|
|
- <signature>
|
|
- <groupId>org.codehaus.mojo.signature</groupId>
|
|
- <artifactId>java18</artifactId>
|
|
- <version>1.0</version>
|
|
- </signature>
|
|
- </configuration>
|
|
- </plugin>
|
|
- </plugins>
|
|
- </build>
|
|
- </profile>
|
|
- </profiles>
|
|
-</project>
|