2021-06-11 12:02:28 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2021-07-20 02:07:53 +00:00
|
|
|
From: Kyle Wood <kyle@denwav.dev>
|
2021-06-11 12:02:28 +00:00
|
|
|
Date: Thu, 10 Dec 2020 20:50:33 -0800
|
|
|
|
Subject: [PATCH] Convert project to Gradle
|
|
|
|
|
2021-06-17 17:11:00 +00:00
|
|
|
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.
|
2021-06-11 12:02:28 +00:00
|
|
|
|
|
|
|
diff --git a/.gitignore b/.gitignore
|
2021-08-07 00:27:45 +00:00
|
|
|
index e431e3435737e28394d81b56568a08b3c3148b9b..b23bde3b5e881f146539a307d0a59f2177b6a036 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/.gitignore
|
|
|
|
+++ b/.gitignore
|
|
|
|
@@ -1,3 +1,5 @@
|
|
|
|
+.gradle/
|
|
|
|
+
|
|
|
|
# Eclipse stuff
|
|
|
|
/.classpath
|
|
|
|
/.project
|
2021-08-07 00:27:45 +00:00
|
|
|
@@ -30,3 +32,7 @@
|
|
|
|
*.ipr
|
|
|
|
*.iws
|
|
|
|
.idea/
|
|
|
|
+
|
|
|
|
+# vs code
|
|
|
|
+/.vscode
|
|
|
|
+/.factorypath
|
2021-06-11 12:02:28 +00:00
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
|
|
new file mode 100644
|
2021-11-22 05:21:37 +00:00
|
|
|
index 0000000000000000000000000000000000000000..2ffdda3764d92227264dd4a1ef9bf473db88c3a8
|
2021-06-11 12:02:28 +00:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/build.gradle.kts
|
2021-10-27 02:45:45 +00:00
|
|
|
@@ -0,0 +1,68 @@
|
2021-06-13 01:28:41 +00:00
|
|
|
+import java.util.Locale
|
|
|
|
+
|
2021-06-11 12:02:28 +00:00
|
|
|
+plugins {
|
|
|
|
+ `java-library`
|
2021-06-15 01:50:13 +00:00
|
|
|
+ `maven-publish`
|
2021-06-11 12:02:28 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
+java {
|
|
|
|
+ withSourcesJar()
|
|
|
|
+ withJavadocJar()
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+dependencies {
|
|
|
|
+ // api dependencies are listed transitively to API consumers
|
|
|
|
+ api("commons-lang:commons-lang:2.6")
|
2021-11-22 05:21:37 +00:00
|
|
|
+ api("com.google.guava:guava:31.0.1-jre")
|
|
|
|
+ api("com.google.code.gson:gson:2.8.8")
|
2021-06-11 12:02:28 +00:00
|
|
|
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
2021-06-18 14:34:30 +00:00
|
|
|
+ api("org.yaml:snakeyaml:1.28")
|
2021-06-11 12:02:28 +00:00
|
|
|
+
|
|
|
|
+ compileOnly("org.apache.maven:maven-resolver-provider:3.8.1")
|
|
|
|
+ compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.0")
|
|
|
|
+ compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.0")
|
|
|
|
+
|
|
|
|
+ val annotations = "org.jetbrains:annotations-java5:21.0.1"
|
|
|
|
+ compileOnly(annotations)
|
|
|
|
+ testCompileOnly(annotations)
|
|
|
|
+
|
|
|
|
+ testImplementation("junit:junit:4.13.1")
|
|
|
|
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
|
2021-08-13 17:08:34 +00:00
|
|
|
+ testImplementation("org.ow2.asm:asm-tree:9.2")
|
2021-06-11 12:02:28 +00:00
|
|
|
+}
|
|
|
|
+
|
2021-06-15 01:50:13 +00:00
|
|
|
+configure<PublishingExtension> {
|
|
|
|
+ publications.create<MavenPublication>("maven") {
|
2021-06-16 23:23:02 +00:00
|
|
|
+ artifactId = project.name.toLowerCase(Locale.ENGLISH)
|
2021-06-15 01:50:13 +00:00
|
|
|
+ from(components["java"])
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
2021-06-13 01:28:41 +00:00
|
|
|
+val generateApiVersioningFile by tasks.registering {
|
2021-10-27 02:45:45 +00:00
|
|
|
+ inputs.property("version", project.version)
|
2021-06-13 01:28:41 +00:00
|
|
|
+ val pomProps = layout.buildDirectory.file("pom.properties")
|
|
|
|
+ outputs.file(pomProps)
|
|
|
|
+ doLast {
|
|
|
|
+ pomProps.get().asFile.writeText("version=${project.version}")
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
2021-06-11 12:02:28 +00:00
|
|
|
+tasks.jar {
|
2021-06-13 01:28:41 +00:00
|
|
|
+ from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
|
|
|
|
+ into("META-INF/maven/${project.group}/${project.name.toLowerCase(Locale.ENGLISH)}")
|
|
|
|
+ }
|
2021-06-11 12:02:28 +00:00
|
|
|
+ manifest {
|
2021-10-27 02:45:45 +00:00
|
|
|
+ attributes(
|
2021-06-11 12:02:28 +00:00
|
|
|
+ "Automatic-Module-Name" to "org.bukkit"
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
2021-10-27 02:45:45 +00:00
|
|
|
+tasks.withType<Javadoc> {
|
2021-06-11 12:02:28 +00:00
|
|
|
+ (options as StandardJavadocDocletOptions).links(
|
2021-11-22 05:21:37 +00:00
|
|
|
+ "https://guava.dev/releases/31.0.1-jre/api/docs/",
|
2021-07-07 06:52:40 +00:00
|
|
|
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.28/",
|
|
|
|
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/21.0.1/",
|
2021-07-06 03:25:23 +00:00
|
|
|
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
2021-06-11 12:02:28 +00:00
|
|
|
+ )
|
|
|
|
+}
|
2021-06-17 17:11:00 +00:00
|
|
|
diff --git a/pom.xml b/pom.xml
|
|
|
|
deleted file mode 100644
|
2021-11-24 22:26:32 +00:00
|
|
|
index c8947e43bcd83c51d79ebe5a110445bf1e5388b2..0000000000000000000000000000000000000000
|
2021-06-17 17:11:00 +00:00
|
|
|
--- a/pom.xml
|
|
|
|
+++ /dev/null
|
|
|
|
@@ -1,262 +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>
|
2021-11-24 22:26:32 +00:00
|
|
|
- <version>1.18-pre8-R0.1-SNAPSHOT</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- <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>
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>commons-lang</groupId>
|
|
|
|
- <artifactId>commons-lang</artifactId>
|
|
|
|
- <version>2.6</version>
|
|
|
|
- <scope>compile</scope>
|
|
|
|
- </dependency>
|
|
|
|
- <!-- bundled with Minecraft, should be kept in sync -->
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>com.google.guava</groupId>
|
|
|
|
- <artifactId>guava</artifactId>
|
2021-11-22 05:21:37 +00:00
|
|
|
- <version>31.0.1-jre</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- <scope>compile</scope>
|
|
|
|
- </dependency>
|
|
|
|
- <!-- bundled with Minecraft, should be kept in sync -->
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>com.google.code.gson</groupId>
|
|
|
|
- <artifactId>gson</artifactId>
|
2021-11-22 05:21:37 +00:00
|
|
|
- <version>2.8.8</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- <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>1.28</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.1</version>
|
|
|
|
- <scope>provided</scope>
|
|
|
|
- </dependency>
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>org.apache.maven.resolver</groupId>
|
|
|
|
- <artifactId>maven-resolver-connector-basic</artifactId>
|
|
|
|
- <version>1.7.0</version>
|
|
|
|
- <scope>provided</scope>
|
|
|
|
- </dependency>
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>org.apache.maven.resolver</groupId>
|
|
|
|
- <artifactId>maven-resolver-transport-http</artifactId>
|
|
|
|
- <version>1.7.0</version>
|
|
|
|
- <scope>provided</scope>
|
|
|
|
- </dependency>
|
|
|
|
- <!-- annotations -->
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>org.jetbrains</groupId>
|
|
|
|
- <artifactId>annotations-java5</artifactId>
|
|
|
|
- <version>21.0.1</version>
|
|
|
|
- <scope>provided</scope>
|
|
|
|
- </dependency>
|
|
|
|
- <!-- testing -->
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>junit</groupId>
|
|
|
|
- <artifactId>junit</artifactId>
|
|
|
|
- <version>4.13.1</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>
|
2021-08-13 17:08:34 +00:00
|
|
|
- <version>9.2</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- <scope>test</scope>
|
|
|
|
- </dependency>
|
|
|
|
- </dependencies>
|
|
|
|
-
|
|
|
|
- <build>
|
|
|
|
- <plugins>
|
|
|
|
- <plugin>
|
|
|
|
- <groupId>net.md-5</groupId>
|
|
|
|
- <artifactId>scriptus</artifactId>
|
|
|
|
- <version>0.4.1</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.8.1</version>
|
|
|
|
- <configuration>
|
|
|
|
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
|
|
|
|
- <compilerId>eclipse</compilerId>
|
|
|
|
- </configuration>
|
|
|
|
- <dependencies>
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>org.codehaus.plexus</groupId>
|
|
|
|
- <artifactId>plexus-compiler-eclipse</artifactId>
|
|
|
|
- <version>2.8.8</version>
|
|
|
|
- </dependency>
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>org.eclipse.jdt</groupId>
|
|
|
|
- <artifactId>ecj</artifactId>
|
2021-11-22 05:21:37 +00:00
|
|
|
- <version>3.27.0</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- </dependency>
|
|
|
|
- </dependencies>
|
|
|
|
- </plugin>
|
|
|
|
- <plugin>
|
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
- <artifactId>maven-jar-plugin</artifactId>
|
|
|
|
- <version>3.2.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>
|
2021-07-07 06:52:40 +00:00
|
|
|
- <version>3.2.4</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- <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>
|
|
|
|
- </configuration>
|
|
|
|
- </plugin>
|
|
|
|
- <plugin>
|
|
|
|
- <groupId>org.apache.maven.plugins</groupId>
|
|
|
|
- <artifactId>maven-javadoc-plugin</artifactId>
|
2021-11-22 05:21:37 +00:00
|
|
|
- <version>3.3.1</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- <configuration>
|
|
|
|
- <links>
|
2021-11-22 05:21:37 +00:00
|
|
|
- <link>https://guava.dev/releases/31.0.1-jre/api/docs/</link>
|
2021-07-07 06:52:40 +00:00
|
|
|
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.28/</link>
|
|
|
|
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/21.0.1/</link>
|
2021-06-17 17:11:00 +00:00
|
|
|
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
|
|
|
|
- </links>
|
|
|
|
- </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>
|
2021-07-07 06:52:40 +00:00
|
|
|
- <version>3.1.2</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- <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>
|
2021-11-22 05:21:37 +00:00
|
|
|
- <version>8.45.1</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- </dependency>
|
|
|
|
- </dependencies>
|
|
|
|
- </plugin>
|
|
|
|
- <plugin>
|
|
|
|
- <groupId>org.codehaus.mojo</groupId>
|
|
|
|
- <artifactId>animal-sniffer-maven-plugin</artifactId>
|
2021-07-07 06:52:40 +00:00
|
|
|
- <version>1.20</version>
|
2021-06-17 17:11:00 +00:00
|
|
|
- <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>
|