mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
2641c02193
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: 69fa4695 Add some missing deprecation annotations f850da2e Update Maven plugins/versions 8d8400db Use regular compiler seeing as ECJ doesn't support Java 21 JRE c29e1688 Revert "BUILDTOOLS-676: Downgrade Maven compiler version" 07bce714 SPIGOT-7355: More field renames and fixes 6a8ea764 Fix bad merge in penultimate commit 50a7920c Fix imports in previous commit 83640dd1 PR-995: Add required feature to MinecraftExperimental for easy lookups fc1f96cf BUILDTOOLS-676: Downgrade Maven compiler version CraftBukkit Changes: 90f1059ba Fix item placement 661afb43c SPIGOT-7633: Clearer error message for missing particle data 807b465b3 SPIGOT-7634: Armadillo updates infrequently 590cf09a8 Fix unit tests always seeing Mojang server as unavailable 7c7ac5eb2 SPIGOT-7636: Fix clearing ItemMeta 4a72905cf SPIGOT-7635: Fix Player#transfer and cookie methods ebb50e136 Fix incorrect Vault implementation b33fed8b7 Update Maven plugins/versions 6f00f0608 SPIGOT-7632: Control middle clicking chest does not copy contents db821f405 Use regular compiler seeing as ECJ doesn't support Java 21 JRE 8a2976737 Revert "BUILDTOOLS-676: Downgrade Maven compiler version" 0297f87bb SPIGOT-7355: More field renames and fixes 2d03bdf6a SPIGOT-7629: Fix loading banner patterns e77951fac Fix equality of deserialized display names c66f3e4fd SPIGOT-7631: Fix deserialisation of BlockStateMeta 9c2c7be8d SPIGOT-7630: Fix crash saving unticked leashed entities 8c1e7c841 PR-1384: Disable certain PlayerProfile tests, if Mojang's services or internet are not available ced93d572 SPIGOT-7626: sendSignChange() has no effect c77362cae SPIGOT-7625: ItemStack with lore cannot be serialized in 1.20.5 ff2004387 SPIGOT-7620: Fix server crash when hoppers transfer items to double chests 8b4abeb03 BUILDTOOLS-676: Downgrade Maven compiler version
398 lines
14 KiB
Diff
398 lines
14 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 5dd700a956e915c00b25d91dea8d6f285ddab72b..97e78e27ee0eea2c8b24886eeb19164d552323fe 100644
|
|
--- a/.gitignore
|
|
+++ b/.gitignore
|
|
@@ -1,3 +1,5 @@
|
|
+.gradle/
|
|
+
|
|
# Eclipse stuff
|
|
/.classpath
|
|
/.project
|
|
@@ -32,3 +34,7 @@
|
|
*.ipr
|
|
*.iws
|
|
.idea/
|
|
+
|
|
+# vs code
|
|
+/.vscode
|
|
+/.factorypath
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c46b0b620e
|
|
--- /dev/null
|
|
+++ b/build.gradle.kts
|
|
@@ -0,0 +1,91 @@
|
|
+plugins {
|
|
+ `java-library`
|
|
+ `maven-publish`
|
|
+}
|
|
+
|
|
+java {
|
|
+ withSourcesJar()
|
|
+ withJavadocJar()
|
|
+}
|
|
+
|
|
+val annotationsVersion = "24.1.0"
|
|
+val bungeeCordChatVersion = "1.20-R0.2"
|
|
+
|
|
+dependencies {
|
|
+ // api dependencies are listed transitively to API consumers
|
|
+ api("com.google.guava:guava:32.1.2-jre")
|
|
+ api("com.google.code.gson:gson:2.10.1")
|
|
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion")
|
|
+ api("org.yaml:snakeyaml:2.2")
|
|
+ api("org.joml:joml:1.10.5")
|
|
+
|
|
+ compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
|
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
|
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
|
+
|
|
+ val annotations = "org.jetbrains:annotations-java5:$annotationsVersion"
|
|
+ compileOnly(annotations)
|
|
+ testCompileOnly(annotations)
|
|
+
|
|
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
|
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
|
+ testImplementation("org.hamcrest:hamcrest:2.2")
|
|
+ testImplementation("org.mockito:mockito-core:5.11.0")
|
|
+ testImplementation("org.ow2.asm:asm-tree:9.7")
|
|
+}
|
|
+
|
|
+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/32.1.2-jre/api/docs/",
|
|
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
|
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
|
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/",
|
|
+ )
|
|
+ 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")
|
|
+ }
|
|
+ }
|
|
+}
|
|
+
|
|
+tasks.test {
|
|
+ useJUnitPlatform()
|
|
+}
|
|
diff --git a/pom.xml b/pom.xml
|
|
deleted file mode 100644
|
|
index 278ecb12ecdb5e1fdf394a1c990a4d849e53e05e..0000000000000000000000000000000000000000
|
|
--- a/pom.xml
|
|
+++ /dev/null
|
|
@@ -1,267 +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.5-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.release>17</maven.compiler.release>
|
|
- <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>32.1.2-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.1</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.20-R0.2</version>
|
|
- <type>jar</type>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.yaml</groupId>
|
|
- <artifactId>snakeyaml</artifactId>
|
|
- <version>2.2</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <!-- not part of the API proper -->
|
|
- <dependency>
|
|
- <groupId>org.apache.maven</groupId>
|
|
- <artifactId>maven-resolver-provider</artifactId>
|
|
- <version>3.9.6</version>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.apache.maven.resolver</groupId>
|
|
- <artifactId>maven-resolver-connector-basic</artifactId>
|
|
- <version>1.9.18</version>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.apache.maven.resolver</groupId>
|
|
- <artifactId>maven-resolver-transport-http</artifactId>
|
|
- <version>1.9.18</version>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <!-- annotations -->
|
|
- <dependency>
|
|
- <groupId>org.jetbrains</groupId>
|
|
- <artifactId>annotations-java5</artifactId>
|
|
- <version>24.1.0</version>
|
|
- <scope>provided</scope>
|
|
- </dependency>
|
|
- <!-- testing -->
|
|
- <dependency>
|
|
- <groupId>org.junit.jupiter</groupId>
|
|
- <artifactId>junit-jupiter</artifactId>
|
|
- <version>5.10.2</version>
|
|
- <scope>test</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.hamcrest</groupId>
|
|
- <artifactId>hamcrest</artifactId>
|
|
- <version>2.2</version>
|
|
- <scope>test</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.mockito</groupId>
|
|
- <artifactId>mockito-core</artifactId>
|
|
- <version>5.11.0</version>
|
|
- <scope>test</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.ow2.asm</groupId>
|
|
- <artifactId>asm-tree</artifactId>
|
|
- <version>9.7</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.13.0</version>
|
|
- <configuration>
|
|
- <!-- default changed with version 3.11.0 -->
|
|
- <showWarnings>false</showWarnings>
|
|
- </configuration>
|
|
- </plugin>
|
|
- <plugin>
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
- <artifactId>maven-jar-plugin</artifactId>
|
|
- <version>3.4.1</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.3</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.6.3</version>
|
|
- <configuration>
|
|
- <links>
|
|
- <link>https://guava.dev/releases/32.1.2-jre/api/docs/</link>
|
|
- </links>
|
|
- <tags>
|
|
- <tag>
|
|
- <name>apiNote</name>
|
|
- <placement>a</placement>
|
|
- <head>API Note:</head>
|
|
- </tag>
|
|
- </tags>
|
|
- </configuration>
|
|
- </plugin>
|
|
- <plugin>
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
- <artifactId>maven-surefire-plugin</artifactId>
|
|
- <version>3.2.5</version>
|
|
- </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.1</version>
|
|
- <executions>
|
|
- <execution>
|
|
- <phase>process-classes</phase>
|
|
- <goals>
|
|
- <goal>check</goal>
|
|
- </goals>
|
|
- </execution>
|
|
- </executions>
|
|
- <configuration>
|
|
- <configLocation>checkstyle.xml</configLocation>
|
|
- <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>
|