Paper/patches/server/0001-Setup-Gradle-project.patch

765 lines
30 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kyle Wood <kyle@denwav.dev>
2021-06-11 14:02:28 +02:00
Date: Thu, 10 Dec 2020 20:54:19 -0800
Subject: [PATCH] Setup Gradle project
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 14:02:28 +02:00
diff --git a/.gitignore b/.gitignore
index 3df8c60ab5cd1454660980883f80668d535b742b..37c3a00659ce21623be07317f4f6a45bf990d799 100644
2021-06-11 14:02:28 +02:00
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+.gradle/
+build/
+
# Eclipse stuff
/.classpath
/.project
@@ -38,3 +41,7 @@ dependency-reduced-pom.xml
/src/main/resources/achievement
/src/main/resources/lang
+
+# vs code
+/.vscode
+/.factorypath
2021-06-11 14:02:28 +02:00
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
2023-03-14 19:36:39 +01:00
index 0000000000000000000000000000000000000000..e090175d2fbe8eba664500feafc29c0567bb0c87
2021-06-11 14:02:28 +02:00
--- /dev/null
+++ b/build.gradle.kts
2023-02-28 01:30:33 +01:00
@@ -0,0 +1,137 @@
2021-10-11 23:31:53 +02:00
+import io.papermc.paperweight.util.*
2021-06-11 14:02:28 +02:00
+
+plugins {
+ java
+ `maven-publish`
2021-06-11 14:02:28 +02:00
+ id("com.github.johnrengelman.shadow")
+}
+
+dependencies {
+ implementation(project(":paper-api"))
2021-06-11 14:02:28 +02:00
+ implementation("jline:jline:2.12.1")
2022-12-07 17:46:46 +01:00
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") {
2021-06-11 14:02:28 +02:00
+ exclude(group = "org.apache.logging.log4j", module = "log4j-api")
+ }
+ implementation("org.ow2.asm:asm:9.4")
2022-06-07 18:52:56 +02:00
+ implementation("commons-lang:commons-lang:2.6")
2023-03-14 19:36:39 +01:00
+ runtimeOnly("org.xerial:sqlite-jdbc:3.41.0.0")
2023-03-14 18:11:24 +01:00
+ runtimeOnly("com.mysql:mysql-connector-j:8.0.32")
2021-06-11 14:02:28 +02:00
+
+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5")
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
2021-06-11 14:02:28 +02:00
+
+ testImplementation("junit:junit:4.13.2")
2021-06-11 14:02:28 +02:00
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
+}
+
2023-03-14 18:11:24 +01:00
+val craftbukkitPackageVersion = "1_19_R3" // Paper
2021-06-11 14:02:28 +02:00
+tasks.jar {
2021-06-17 01:23:02 +02:00
+ archiveClassifier.set("dev")
+
2021-06-11 14:02:28 +02:00
+ manifest {
+ val git = Git(rootProject.layout.projectDirectory.path)
2021-06-27 06:51:03 +02:00
+ val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
+ val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
+ val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
2021-06-17 01:23:02 +02:00
+ attributes(
2021-06-11 14:02:28 +02:00
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
+ "Implementation-Title" to "CraftBukkit",
+ "Implementation-Version" to "git-Paper-$implementationVersion",
+ "Implementation-Vendor" to date, // Paper
2021-06-11 14:02:28 +02:00
+ "Specification-Title" to "Bukkit",
+ "Specification-Version" to project.version,
2021-06-17 01:23:02 +02:00
+ "Specification-Vendor" to "Bukkit Team",
+ )
+ for (tld in setOf("net", "com", "org")) {
+ attributes("$tld/bukkit", "Sealed" to true)
2021-06-11 14:02:28 +02:00
+ }
+ }
+}
+
2021-06-17 01:23:02 +02:00
+publishing {
+ publications.create<MavenPublication>("maven") {
2021-06-17 01:23:02 +02:00
+ artifact(tasks.shadowJar)
+ }
+}
+
2021-08-18 00:11:04 +02:00
+relocation {
2021-08-22 19:22:57 +02:00
+ // Order matters here - e.g. craftbukkit proper must be relocated before any of the libs are relocated into the cb package
+ relocate("org.bukkit.craftbukkit" to "org.bukkit.craftbukkit.v$craftbukkitPackageVersion") {
2021-08-22 19:22:57 +02:00
+ exclude("org.bukkit.craftbukkit.Main*")
+ }
2021-08-18 00:11:04 +02:00
+}
+
+tasks.shadowJar {
2021-11-24 22:27:16 +01:00
+ configurations = listOf(project.configurations.vanillaServer.get())
2021-08-18 00:11:04 +02:00
+ archiveClassifier.set("mojang-mapped")
+
+ for (relocation in relocation.relocations.get()) {
+ relocate(relocation.fromPackage, relocation.toPackage) {
+ for (exclude in relocation.excludes) {
+ exclude(exclude)
+ }
+ }
2021-06-11 14:02:28 +02:00
+ }
+}
+
+tasks.test {
+ exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
+}
2021-06-12 02:22:53 +02:00
+
+fun TaskContainer.registerRunTask(
2021-11-24 02:09:12 +01:00
+ name: String,
+ block: JavaExec.() -> Unit
+): TaskProvider<JavaExec> = register<JavaExec>(name) {
+ group = "paper"
2021-11-24 22:27:16 +01:00
+ mainClass.set("org.bukkit.craftbukkit.Main")
+ standardInput = System.`in`
2021-11-24 02:09:12 +01:00
+ workingDir = rootProject.layout.projectDirectory
2022-02-21 21:44:17 +01:00
+ .dir(providers.gradleProperty("paper.runWorkDir").getOrElse("run"))
2021-11-24 02:09:12 +01:00
+ .asFile
+ javaLauncher.set(project.javaToolchains.defaultJavaLauncher(project))
2021-07-09 12:04:33 +02:00
+
+ if (rootProject.childProjects["test-plugin"] != null) {
+ val testPluginJar = rootProject.project(":test-plugin").tasks.jar.flatMap { it.archiveFile }
+ inputs.file(testPluginJar)
2021-11-24 02:09:12 +01:00
+ args("-add-plugin=${testPluginJar.get().asFile.absolutePath}")
2021-07-09 12:04:33 +02:00
+ }
+
+ args("--nogui")
+ systemProperty("net.kyori.adventure.text.warnWhenLegacyFormattingDetected", true)
2021-11-24 02:09:12 +01:00
+ if (providers.gradleProperty("paper.runDisableWatchdog").getOrElse("false") == "true") {
+ systemProperty("disable.watchdog", true)
+ }
2021-11-24 02:09:12 +01:00
+
2022-02-21 21:44:17 +01:00
+ val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2")
2023-02-28 01:30:33 +01:00
+ minHeapSize = "${memoryGb}G"
+ maxHeapSize = "${memoryGb}G"
2021-11-24 02:09:12 +01:00
+
+ doFirst {
+ workingDir.mkdirs()
+ }
2021-11-24 02:09:12 +01:00
+
+ block(this)
+}
+
2021-11-24 22:27:16 +01:00
+val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatMap { it.elements }
+ .zip(configurations.vanillaServer.map { it.singleFile.absolutePath }) { runtime, vanilla ->
+ runtime.filterNot { it.asFile.absolutePath == vanilla }
+ }
+
+tasks.registerRunTask("runShadow") {
+ description = "Spin up a test server from the shadowJar archiveFile"
+ classpath(tasks.shadowJar.flatMap { it.archiveFile })
2021-11-24 22:27:16 +01:00
+ classpath(runtimeClasspathWithoutVanillaServer)
+}
+
+tasks.registerRunTask("runReobf") {
+ description = "Spin up a test server from the reobfJar output jar"
+ classpath(tasks.reobfJar.flatMap { it.outputJar })
2021-11-24 22:27:16 +01:00
+ classpath(runtimeClasspathWithoutVanillaServer)
+}
+
+tasks.registerRunTask("runDev") {
2021-11-24 22:27:16 +01:00
+ description = "Spin up a non-relocated Mojang-mapped test server"
+ classpath(sourceSets.main.map { it.runtimeClasspath })
2021-06-12 02:22:53 +02:00
+}
2021-06-17 03:43:30 +02:00
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 67ae7c25ee4e007e1fdfb3ac37687e1bd8ab58ca..0000000000000000000000000000000000000000
2021-06-17 03:43:30 +02:00
--- a/pom.xml
+++ /dev/null
@@ -1,587 +0,0 @@
2021-06-17 03:43:30 +02:00
-<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</artifactId>
- <packaging>jar</packaging>
2023-03-14 18:11:24 +01:00
- <version>1.19.4-R0.1-SNAPSHOT</version>
2021-06-17 03:43:30 +02:00
- <name>Spigot</name>
- <url>https://www.spigotmc.org/</url>
-
2021-11-23 09:57:41 +01:00
- <parent>
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot-parent</artifactId>
- <version>dev-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
-
2021-06-17 03:43:30 +02:00
- <properties>
- <skipTests>true</skipTests>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <api.version>unknown</api.version>
- <bt.name>git</bt.name>
2023-03-14 18:11:24 +01:00
- <minecraft_version>1_19_R3</minecraft_version>
2022-06-07 18:52:56 +02:00
- <maven.compiler.source>17</maven.compiler.source>
- <maven.compiler.target>17</maven.compiler.target>
2021-06-17 03:43:30 +02:00
- </properties>
-
2021-11-23 09:57:41 +01:00
- <repositories>
- <repository>
- <id>minecraft-libraries</id>
- <name>Minecraft Libraries</name>
- <url>https://libraries.minecraft.net/</url>
- </repository>
- </repositories>
2021-06-17 03:43:30 +02:00
-
- <dependencies>
- <dependency>
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.spigotmc</groupId>
- <artifactId>minecraft-server</artifactId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>jline</groupId>
- <artifactId>jline</artifactId>
- <version>2.12.1</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-iostreams</artifactId>
2022-12-07 17:46:46 +01:00
- <version>2.19.0</version>
2021-06-17 03:43:30 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm</artifactId>
- <version>9.4</version>
2021-06-17 03:43:30 +02:00
- <scope>compile</scope>
- </dependency>
2021-11-23 09:57:41 +01:00
- <!-- Mojang depends -->
- <dependency>
- <groupId>com.github.oshi</groupId>
- <artifactId>oshi-core</artifactId>
2022-12-07 17:46:46 +01:00
- <version>6.2.2</version>
2021-11-23 09:57:41 +01:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.mojang</groupId>
- <artifactId>authlib</artifactId>
2023-03-14 18:11:24 +01:00
- <version>3.17.30</version>
2021-11-23 09:57:41 +01:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.mojang</groupId>
- <artifactId>brigadier</artifactId>
- <version>1.0.18</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>com.mojang</groupId>
- <artifactId>datafixerupper</artifactId>
2023-03-14 18:11:24 +01:00
- <version>6.0.6</version>
2021-11-23 09:57:41 +01:00
- <scope>compile</scope>
- </dependency>
- <dependency>
2022-03-01 06:43:03 +01:00
- <groupId>com.mojang</groupId>
- <artifactId>logging</artifactId>
2022-12-07 17:46:46 +01:00
- <version>1.1.1</version>
2022-03-01 06:43:03 +01:00
- <scope>compile</scope>
- </dependency>
- <dependency>
2021-11-23 09:57:41 +01:00
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.11.0</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
2022-06-07 18:52:56 +02:00
- <artifactId>netty-buffer</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2022-06-07 18:52:56 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-codec</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2022-06-07 18:52:56 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-common</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2022-06-07 18:52:56 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-handler</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2022-06-07 18:52:56 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-resolver</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2022-06-07 18:52:56 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-transport</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2022-06-07 18:52:56 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-transport-classes-epoll</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2022-06-07 18:52:56 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-transport-native-epoll</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2022-06-07 18:52:56 +02:00
- <classifier>linux-x86_64</classifier>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-transport-native-epoll</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2022-06-07 18:52:56 +02:00
- <classifier>linux-aarch_64</classifier>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-transport-native-unix-common</artifactId>
2022-12-07 17:46:46 +01:00
- <version>4.1.82.Final</version>
2021-11-23 09:57:41 +01:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>it.unimi.dsi</groupId>
- <artifactId>fastutil</artifactId>
2022-12-07 17:46:46 +01:00
- <version>8.5.9</version>
2021-11-23 09:57:41 +01:00
- <scope>compile</scope>
- </dependency>
- <dependency>
2022-06-07 18:52:56 +02:00
- <groupId>net.java.dev.jna</groupId>
- <artifactId>jna</artifactId>
2022-12-07 17:46:46 +01:00
- <version>5.12.1</version>
2022-06-07 18:52:56 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>net.java.dev.jna</groupId>
- <artifactId>jna-platform</artifactId>
2022-12-07 17:46:46 +01:00
- <version>5.12.1</version>
2022-06-07 18:52:56 +02:00
- <scope>compile</scope>
- </dependency>
- <dependency>
2021-11-23 09:57:41 +01:00
- <groupId>net.sf.jopt-simple</groupId>
- <artifactId>jopt-simple</artifactId>
- <version>5.0.4</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.12.0</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
2022-12-07 17:46:46 +01:00
- <version>2.19.0</version>
2021-11-23 09:57:41 +01:00
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
2022-12-07 17:46:46 +01:00
- <artifactId>log4j-slf4j2-impl</artifactId>
- <version>2.19.0</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
2021-11-23 09:57:41 +01:00
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
2022-12-07 17:46:46 +01:00
- <version>2.0.1</version>
2021-11-23 09:57:41 +01:00
- <scope>compile</scope>
- </dependency>
2021-06-17 03:43:30 +02:00
- <!-- deprecated API depend -->
- <dependency>
2022-06-07 18:52:56 +02:00
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.6</version>
- <scope>compile</scope>
- </dependency>
- <!-- deprecated API depend -->
- <dependency>
2021-06-17 03:43:30 +02:00
- <groupId>com.googlecode.json-simple</groupId>
- <artifactId>json-simple</artifactId>
- <version>1.1.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.xerial</groupId>
- <artifactId>sqlite-jdbc</artifactId>
2023-03-14 18:11:24 +01:00
- <version>3.41.0.0</version>
2021-06-17 03:43:30 +02:00
- <scope>runtime</scope>
- </dependency>
- <dependency>
2023-03-14 18:11:24 +01:00
- <groupId>com.mysql</groupId>
- <artifactId>mysql-connector-j</artifactId>
- <version>8.0.32</version>
2021-06-17 03:43:30 +02:00
- <scope>runtime</scope>
- </dependency>
- <!-- add these back in as they are not exposed by the API -->
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-resolver-provider</artifactId>
2022-06-07 18:52:56 +02:00
- <version>3.8.5</version>
2021-06-17 03:43:30 +02:00
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.resolver</groupId>
- <artifactId>maven-resolver-connector-basic</artifactId>
- <version>1.7.3</version>
2021-06-17 03:43:30 +02:00
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.resolver</groupId>
- <artifactId>maven-resolver-transport-http</artifactId>
- <version>1.7.3</version>
2021-06-17 03:43:30 +02:00
- <scope>runtime</scope>
- </dependency>
- <!-- annotations -->
- <dependency>
- <groupId>org.jetbrains</groupId>
- <artifactId>annotations-java5</artifactId>
- <version>23.0.0</version>
- <scope>provided</scope>
- </dependency>
2021-06-17 03:43:30 +02:00
- <!-- testing -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.13.2</version>
2021-06-17 03:43:30 +02:00
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- <version>1.3</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <!-- This builds a completely 'ready to start' jar with all dependencies inside -->
- <build>
- <plugins>
- <plugin>
- <groupId>net.md-5</groupId>
- <artifactId>scriptus</artifactId>
- <version>0.4.1</version>
- <executions>
- <execution>
- <id>ex-spigot</id>
- <configuration>
- <format>${bt.name}-Spigot-%s</format>
- <scmDirectory>../</scmDirectory>
- <descriptionProperty>spigot.desc</descriptionProperty>
- </configuration>
- <phase>initialize</phase>
- <goals>
- <goal>describe</goal>
- </goals>
- </execution>
- <execution>
- <id>ex-craftbukkit</id>
- <configuration>
- <format>-%s</format>
- <scmDirectory>../../CraftBukkit</scmDirectory>
- <descriptionProperty>craftbukkit.desc</descriptionProperty>
- </configuration>
- <phase>initialize</phase>
- <goals>
- <goal>describe</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
2022-06-07 18:52:56 +02:00
- <version>3.2.0</version>
2021-06-17 03:43:30 +02:00
- <executions>
- <execution>
- <phase>initialize</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.3.0</version>
2021-06-17 03:43:30 +02:00
- <configuration>
- <archive>
- <manifest>
- <addDefaultEntries>false</addDefaultEntries>
- </manifest>
- <manifestEntries>
- <Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
- <Implementation-Title>CraftBukkit</Implementation-Title>
- <Implementation-Version>${spigot.desc}${craftbukkit.desc}</Implementation-Version>
- <Implementation-Vendor>${project.build.outputTimestamp}</Implementation-Vendor>
- <Specification-Title>Bukkit</Specification-Title>
- <Specification-Version>${api.version}</Specification-Version>
- <Specification-Vendor>Bukkit Team</Specification-Vendor>
- <Multi-Release>true</Multi-Release>
- </manifestEntries>
- <manifestSections>
- <manifestSection>
- <name>net/bukkit/</name>
- <manifestEntries>
- <Sealed>true</Sealed>
- </manifestEntries>
- </manifestSection>
- <manifestSection>
- <name>com/bukkit/</name>
- <manifestEntries>
- <Sealed>true</Sealed>
- </manifestEntries>
- </manifestSection>
- <manifestSection>
- <name>org/bukkit/</name>
- <manifestEntries>
- <Sealed>true</Sealed>
- </manifestEntries>
- </manifestSection>
- </manifestSections>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>3.4.1</version>
2021-06-17 03:43:30 +02:00
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <createSourcesJar>${shadeSourcesJar}</createSourcesJar>
2021-11-23 09:57:41 +01:00
- <artifactSet>
- <includes>
- <include>org.spigotmc:minecraft-server</include>
- </includes>
- </artifactSet>
2021-06-17 03:43:30 +02:00
- <relocations>
- <relocation>
- <pattern>org.bukkit.craftbukkit</pattern>
- <shadedPattern>org.bukkit.craftbukkit.v${minecraft_version}</shadedPattern>
- <excludes>
2021-11-23 09:57:41 +01:00
- <exclude>org.bukkit.craftbukkit.bootstrap.*</exclude>
2021-06-17 03:43:30 +02:00
- <exclude>org.bukkit.craftbukkit.Main*</exclude>
- </excludes>
- </relocation>
- </relocations>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>net.md-5</groupId>
- <artifactId>specialsource-maven-plugin</artifactId>
2022-06-07 18:52:56 +02:00
- <version>1.2.4</version>
2021-06-17 03:43:30 +02:00
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>remap</goal>
- </goals>
2021-11-23 09:57:41 +01:00
- <id>remap-members</id>
2021-06-17 03:43:30 +02:00
- <configuration>
2021-11-23 09:57:41 +01:00
- <logFile>${project.build.directory}/server.txt</logFile>
- <srgIn>org.spigotmc:minecraft-server:${project.version}:csrg:maps-spigot-members</srgIn>
2021-06-17 03:43:30 +02:00
- <reverse>true</reverse>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
2021-11-23 09:57:41 +01:00
- <groupId>net.nicoulaj.maven.plugins</groupId>
- <artifactId>checksum-maven-plugin</artifactId>
- <version>1.11</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>artifacts</goal>
- <goal>dependencies</goal>
- </goals>
- <configuration>
- <algorithms>
- <algorithm>SHA-256</algorithm>
- </algorithms>
- <quiet>true</quiet>
2021-11-23 09:57:41 +01:00
- <scopes>
- <scope>compile</scope>
- <scope>runtime</scope>
- </scopes>
- <shasumSummary>true</shasumSummary>
- <transitive>true</transitive>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>3.5.0</version>
2021-11-23 09:57:41 +01:00
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <archive>
- <manifest>
- <addDefaultEntries>false</addDefaultEntries>
- </manifest>
- <manifestEntries>
- <Main-Class>org.bukkit.craftbukkit.bootstrap.Main</Main-Class>
- </manifestEntries>
- </archive>
- <attach>false</attach>
2021-11-23 09:57:41 +01:00
- <descriptors>
- <descriptor>${project.basedir}/src/assembly/bootstrap.xml</descriptor>
- </descriptors>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
2021-06-17 03:43:30 +02:00
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.11.0</version>
2021-06-17 03:43:30 +02:00
- <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>
2021-06-17 03:43:30 +02:00
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-compiler-eclipse</artifactId>
- <version>2.13.0</version>
2021-06-17 03:43:30 +02:00
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>3.0.0</version>
2021-06-17 03:43:30 +02:00
- <configuration>
- <workingDirectory>${basedir}/target/test-server</workingDirectory>
- <excludes>
- <exclude>org/bukkit/craftbukkit/inventory/ItemStack*Test.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>shadeSourcesJar</id>
- <properties>
- <shadeSourcesJar>true</shadeSourcesJar>
- <shadeSourcesContent>true</shadeSourcesContent>
- </properties>
- </profile>
- <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.2.1</version>
2021-06-17 03:43:30 +02:00
- <executions>
- <execution>
- <phase>test-compile</phase>
2021-06-17 03:43:30 +02:00
- <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-23 09:57:41 +01:00
- <version>8.45.1</version>
2021-06-17 03:43:30 +02:00
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>remapped</id>
- <build>
- <plugins>
- <plugin>
- <groupId>net.md-5</groupId>
- <artifactId>specialsource-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>verify</phase>
2021-06-17 03:43:30 +02:00
- <goals>
- <goal>remap</goal>
- </goals>
- <id>remap-obf</id>
- <configuration>
- <srgIn>org.spigotmc:minecraft-server:${project.version}:csrg:maps-spigot</srgIn>
- <reverse>true</reverse>
- <remappedArtifactAttached>true</remappedArtifactAttached>
- <remappedClassifierName>remapped-obf</remappedClassifierName>
- </configuration>
- </execution>
- <execution>
- <phase>verify</phase>
2021-06-17 03:43:30 +02:00
- <goals>
- <goal>remap</goal>
- </goals>
- <id>remap-mojang</id>
- <configuration>
- <inputFile>${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar</inputFile>
- <srgIn>org.spigotmc:minecraft-server:${project.version}:txt:maps-mojang</srgIn>
- <remappedArtifactAttached>true</remappedArtifactAttached>
- <remappedClassifierName>remapped-mojang</remappedClassifierName>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>