Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
3b9db2b194
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: bb4e97c6 Add support for Java 23 bc6874dd Bump asm to 9.7.1 50e8a00b PR-1064: Add specific getTopInventory methods for InventoryView derivatives 758b0a0f SPIGOT-7911: Fix Location#isWorldLoaded() for re-loaded worlds 133a64a7 Improve Registry#getOrThrow messages be0f5957 PR-1058: Add tests for Minecraft registry <-> Bukkit fields d1b31df2 PR-1062: Clarify BeaconView documentation 3fab4384 PR-1060: Cache Material to BlockType and ItemType conversion 967a7301 SPIGOT-7906: Increase YAML nesting limit to 100 6ecf033d SPIGOT-7899: Smithing recipes don't require inputs CraftBukkit Changes: 0a7bd6c81 PR-1493: Improve reroute performance and add some tests 54941524c Add support for Java 23 f4d957fff SPIGOT-7915: Fix World#getKeepSpawnInMemory() using Spawn Radius rather than Spawn Chunk Radius ded183674 Fix HIDE_ENCHANTS flag in items without enchantments 308785a0a Bump asm to 9.7.1 and re-add ClassReader to ClassWriter 72ce823cd PR-1487: Add specific getTopInventory methods for InventoryView derivatives 11a5e840c SPIGOT-7907, PR-1484: Improve merchant recipe item matching behavior to more closely align with older versions 45b66f7e4 SPIGOT-7909: Always set HIDE_ENCHANTS flag to item if flag is set 963459791 Increase outdated build delay fc5b2d75f SPIGOT-7910: Fix launching breeze wind charge from API and improve dispenser launch API c7d6428f2 SPIGOT-7856, PR-1483: End platform not dropping items after replacing blocks 2a5572b52 SPIGOT-7780, PR-1482: Cannot edit chunks during unload event 527041ab5 SPIGOT-7902, PR-1477: Fix CraftMetaPotion#hasCustomEffects() does not check if customEffects (List) is empty 5529a1769 Implement base methods for tags 30fbdbaaf Improve Registry#getOrThrow messages 6b71a7322 PR-1475: Add tests for Minecraft registry <-> Bukkit fields 5f24c255c SPIGOT-7908: Mark junit-platform-suite-engine as test scope e4c92ef65 PR-1473: Change tests to use suites, to run tests in different environments and feature flags d25e1e722 PR-1481: Fix BeaconView#set[X]Effect(null) d69a05362 PR-1480: Fix PerMaterialTest#isEdible test running for legacy materials bb3284a89 PR-1479: Use custom #isBlock method in legacy init instead of the one in Material, since it relies on legacy being init 98c57cbbe SPIGOT-7904: Fix NPE for PlayerItemBreakEvent f35bae9ec Fix missing hasJukeboxPlayable 8a6f8b6d8 SPIGOT-7881: CTRL+Pick Block saves position data into item 7913b3be7 SPIGOT-7899: Smithing recipes don't require inputs
784 Zeilen
31 KiB
Diff
784 Zeilen
31 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Kyle Wood <kyle@denwav.dev>
|
|
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.
|
|
|
|
diff --git a/.gitignore b/.gitignore
|
|
index 37dab9e868dbfb019c271a547d975a48ad1cb571..3811c0d849a3eb028ed1a6b7a2d4747f7f570448 100644
|
|
--- a/.gitignore
|
|
+++ b/.gitignore
|
|
@@ -1,3 +1,6 @@
|
|
+.gradle/
|
|
+build/
|
|
+
|
|
# Eclipse stuff
|
|
/.classpath
|
|
/.project
|
|
@@ -39,3 +42,7 @@ dependency-reduced-pom.xml
|
|
|
|
/src/main/resources/achievement
|
|
/src/main/resources/lang
|
|
+
|
|
+# vs code
|
|
+/.vscode
|
|
+/.factorypath
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..82b298d454dee6a6d996aa7822dd745e70a8da74
|
|
--- /dev/null
|
|
+++ b/build.gradle.kts
|
|
@@ -0,0 +1,131 @@
|
|
+import io.papermc.paperweight.util.*
|
|
+
|
|
+plugins {
|
|
+ java
|
|
+ `maven-publish`
|
|
+}
|
|
+
|
|
+dependencies {
|
|
+ implementation(project(":paper-api"))
|
|
+ implementation("jline:jline:2.12.1")
|
|
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") {
|
|
+ exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
|
+ }
|
|
+ implementation("org.ow2.asm:asm-commons:9.7.1")
|
|
+ implementation("commons-lang:commons-lang:2.6")
|
|
+ runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
|
|
+ runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
|
|
+
|
|
+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
|
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
|
|
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
|
+
|
|
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
|
+ testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0")
|
|
+ testImplementation("org.hamcrest:hamcrest:2.2")
|
|
+ testImplementation("org.mockito:mockito-core:5.14.1")
|
|
+ testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
|
+}
|
|
+
|
|
+paperweight {
|
|
+ craftBukkitPackageVersion.set("v1_21_R1") // also needs to be updated in MappingEnvironment
|
|
+}
|
|
+
|
|
+tasks.jar {
|
|
+ archiveClassifier.set("dev")
|
|
+
|
|
+ manifest {
|
|
+ val git = Git(rootProject.layout.projectDirectory.path)
|
|
+ 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
|
|
+ attributes(
|
|
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
+ "Implementation-Title" to "CraftBukkit",
|
|
+ "Implementation-Version" to "git-Paper-$implementationVersion",
|
|
+ "Implementation-Vendor" to date, // Paper
|
|
+ "Specification-Title" to "Bukkit",
|
|
+ "Specification-Version" to project.version,
|
|
+ "Specification-Vendor" to "Bukkit Team",
|
|
+ )
|
|
+ for (tld in setOf("net", "com", "org")) {
|
|
+ attributes("$tld/bukkit", "Sealed" to true)
|
|
+ }
|
|
+ }
|
|
+}
|
|
+
|
|
+publishing {
|
|
+ publications.create<MavenPublication>("maven") {
|
|
+ }
|
|
+}
|
|
+
|
|
+tasks.test {
|
|
+ include("**/**TestSuite.class")
|
|
+ workingDir = temporaryDir
|
|
+ useJUnitPlatform {
|
|
+ forkEvery = 1
|
|
+ excludeTags("Slow")
|
|
+ }
|
|
+}
|
|
+
|
|
+fun TaskContainer.registerRunTask(
|
|
+ name: String,
|
|
+ block: JavaExec.() -> Unit
|
|
+): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
|
+ group = "paper"
|
|
+ mainClass.set("org.bukkit.craftbukkit.Main")
|
|
+ standardInput = System.`in`
|
|
+ workingDir = rootProject.layout.projectDirectory
|
|
+ .dir(providers.gradleProperty("paper.runWorkDir").getOrElse("run"))
|
|
+ .asFile
|
|
+ javaLauncher.set(project.javaToolchains.launcherFor {
|
|
+ languageVersion.set(JavaLanguageVersion.of(21))
|
|
+ vendor.set(JvmVendorSpec.JETBRAINS)
|
|
+ })
|
|
+ jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods")
|
|
+
|
|
+ if (rootProject.childProjects["test-plugin"] != null) {
|
|
+ val testPluginJar = rootProject.project(":test-plugin").tasks.jar.flatMap { it.archiveFile }
|
|
+ inputs.file(testPluginJar)
|
|
+ args("-add-plugin=${testPluginJar.get().asFile.absolutePath}")
|
|
+ }
|
|
+
|
|
+ args("--nogui")
|
|
+ systemProperty("net.kyori.adventure.text.warnWhenLegacyFormattingDetected", true)
|
|
+ if (providers.gradleProperty("paper.runDisableWatchdog").getOrElse("false") == "true") {
|
|
+ systemProperty("disable.watchdog", true)
|
|
+ }
|
|
+ systemProperty("io.papermc.paper.suppress.sout.nags", true)
|
|
+
|
|
+ val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2")
|
|
+ minHeapSize = "${memoryGb}G"
|
|
+ maxHeapSize = "${memoryGb}G"
|
|
+
|
|
+ doFirst {
|
|
+ workingDir.mkdirs()
|
|
+ }
|
|
+
|
|
+ block(this)
|
|
+}
|
|
+
|
|
+val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatMap { it.elements }
|
|
+ .zip(configurations.vanillaServer.map { it.singleFile.absolutePath }) { runtime, vanilla ->
|
|
+ runtime.filterNot { it.asFile.absolutePath == vanilla }
|
|
+ }
|
|
+
|
|
+tasks.registerRunTask("runServerJar") {
|
|
+ description = "Spin up a test server from the serverJar archiveFile"
|
|
+ classpath(tasks.serverJar.flatMap { it.archiveFile })
|
|
+ classpath(runtimeClasspathWithoutVanillaServer)
|
|
+}
|
|
+
|
|
+tasks.registerRunTask("runReobf") {
|
|
+ description = "Spin up a test server from the reobfJar output jar"
|
|
+ classpath(tasks.reobfJar.flatMap { it.outputJar })
|
|
+ classpath(runtimeClasspathWithoutVanillaServer)
|
|
+}
|
|
+
|
|
+tasks.registerRunTask("runDev") {
|
|
+ description = "Spin up a non-relocated Mojang-mapped test server"
|
|
+ classpath(sourceSets.main.map { it.runtimeClasspath })
|
|
+}
|
|
diff --git a/pom.xml b/pom.xml
|
|
deleted file mode 100644
|
|
index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..0000000000000000000000000000000000000000
|
|
--- a/pom.xml
|
|
+++ /dev/null
|
|
@@ -1,612 +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</artifactId>
|
|
- <packaging>jar</packaging>
|
|
- <version>1.21.1-R0.1-SNAPSHOT</version>
|
|
- <name>Spigot</name>
|
|
- <url>https://www.spigotmc.org/</url>
|
|
-
|
|
- <parent>
|
|
- <groupId>org.spigotmc</groupId>
|
|
- <artifactId>spigot-parent</artifactId>
|
|
- <version>dev-SNAPSHOT</version>
|
|
- <relativePath>../pom.xml</relativePath>
|
|
- </parent>
|
|
-
|
|
- <properties>
|
|
- <skipTests>true</skipTests>
|
|
- <groups>AllFeatures,Bundle,Legacy,Normal,VanillaFeature</groups>
|
|
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
- <api.version>unknown</api.version>
|
|
- <bt.name>git</bt.name>
|
|
- <minecraft_version>1_21_R1</minecraft_version>
|
|
- <maven.compiler.release>21</maven.compiler.release>
|
|
- </properties>
|
|
-
|
|
- <repositories>
|
|
- <repository>
|
|
- <id>minecraft-libraries</id>
|
|
- <name>Minecraft Libraries</name>
|
|
- <url>https://libraries.minecraft.net/</url>
|
|
- </repository>
|
|
- </repositories>
|
|
-
|
|
- <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>
|
|
- <version>2.22.1</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.ow2.asm</groupId>
|
|
- <artifactId>asm-commons</artifactId>
|
|
- <version>9.7.1</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <!-- Mojang depends -->
|
|
- <dependency>
|
|
- <groupId>com.github.oshi</groupId>
|
|
- <artifactId>oshi-core</artifactId>
|
|
- <version>6.4.10</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>com.mojang</groupId>
|
|
- <artifactId>authlib</artifactId>
|
|
- <version>6.0.54</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>com.mojang</groupId>
|
|
- <artifactId>brigadier</artifactId>
|
|
- <version>1.2.9</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>com.mojang</groupId>
|
|
- <artifactId>datafixerupper</artifactId>
|
|
- <version>8.0.16</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>com.mojang</groupId>
|
|
- <artifactId>logging</artifactId>
|
|
- <version>1.2.7</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>commons-io</groupId>
|
|
- <artifactId>commons-io</artifactId>
|
|
- <version>2.15.1</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-buffer</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-codec</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-common</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-handler</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-resolver</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-transport</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-transport-classes-epoll</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-transport-native-epoll</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <classifier>linux-x86_64</classifier>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-transport-native-epoll</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <classifier>linux-aarch_64</classifier>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>io.netty</groupId>
|
|
- <artifactId>netty-transport-native-unix-common</artifactId>
|
|
- <version>4.1.97.Final</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>it.unimi.dsi</groupId>
|
|
- <artifactId>fastutil</artifactId>
|
|
- <version>8.5.12</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>net.java.dev.jna</groupId>
|
|
- <artifactId>jna</artifactId>
|
|
- <version>5.14.0</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>net.java.dev.jna</groupId>
|
|
- <artifactId>jna-platform</artifactId>
|
|
- <version>5.14.0</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <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.14.0</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.apache.logging.log4j</groupId>
|
|
- <artifactId>log4j-core</artifactId>
|
|
- <version>2.22.1</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.apache.logging.log4j</groupId>
|
|
- <artifactId>log4j-slf4j2-impl</artifactId>
|
|
- <version>2.22.1</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.slf4j</groupId>
|
|
- <artifactId>slf4j-api</artifactId>
|
|
- <version>2.0.9</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.lz4</groupId>
|
|
- <artifactId>lz4-java</artifactId>
|
|
- <version>1.8.0</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <!-- deprecated API depend -->
|
|
- <dependency>
|
|
- <groupId>commons-lang</groupId>
|
|
- <artifactId>commons-lang</artifactId>
|
|
- <version>2.6</version>
|
|
- <scope>compile</scope>
|
|
- </dependency>
|
|
- <!-- deprecated API depend -->
|
|
- <dependency>
|
|
- <groupId>com.googlecode.json-simple</groupId>
|
|
- <artifactId>json-simple</artifactId>
|
|
- <version>1.1.1</version>
|
|
- <scope>runtime</scope>
|
|
- <exclusions>
|
|
- <exclusion>
|
|
- <groupId>junit</groupId>
|
|
- <artifactId>junit</artifactId>
|
|
- </exclusion>
|
|
- </exclusions>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.xerial</groupId>
|
|
- <artifactId>sqlite-jdbc</artifactId>
|
|
- <version>3.46.0.0</version>
|
|
- <scope>runtime</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>com.mysql</groupId>
|
|
- <artifactId>mysql-connector-j</artifactId>
|
|
- <version>8.4.0</version>
|
|
- <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>
|
|
- <version>3.9.6</version>
|
|
- <scope>runtime</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.apache.maven.resolver</groupId>
|
|
- <artifactId>maven-resolver-connector-basic</artifactId>
|
|
- <version>1.9.18</version>
|
|
- <scope>runtime</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.apache.maven.resolver</groupId>
|
|
- <artifactId>maven-resolver-transport-http</artifactId>
|
|
- <version>1.9.18</version>
|
|
- <scope>runtime</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.junit.platform</groupId>
|
|
- <artifactId>junit-platform-suite-engine</artifactId>
|
|
- <version>1.10.0</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.14.1</version>
|
|
- <scope>test</scope>
|
|
- </dependency>
|
|
- <dependency>
|
|
- <groupId>org.ow2.asm</groupId>
|
|
- <artifactId>asm-tree</artifactId>
|
|
- <version>9.7.1</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.5.0</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>
|
|
- <version>3.2.0</version>
|
|
- <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.4.1</version>
|
|
- <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.5.3</version>
|
|
- <executions>
|
|
- <execution>
|
|
- <phase>package</phase>
|
|
- <goals>
|
|
- <goal>shade</goal>
|
|
- </goals>
|
|
- <configuration>
|
|
- <createSourcesJar>${shadeSourcesJar}</createSourcesJar>
|
|
- <artifactSet>
|
|
- <includes>
|
|
- <include>org.spigotmc:minecraft-server</include>
|
|
- </includes>
|
|
- </artifactSet>
|
|
- <relocations>
|
|
- <relocation>
|
|
- <pattern>org.bukkit.craftbukkit</pattern>
|
|
- <shadedPattern>org.bukkit.craftbukkit.v${minecraft_version}</shadedPattern>
|
|
- <excludes>
|
|
- <exclude>org.bukkit.craftbukkit.bootstrap.*</exclude>
|
|
- <exclude>org.bukkit.craftbukkit.Main*</exclude>
|
|
- </excludes>
|
|
- </relocation>
|
|
- </relocations>
|
|
- </configuration>
|
|
- </execution>
|
|
- </executions>
|
|
- </plugin>
|
|
- <plugin>
|
|
- <groupId>net.md-5</groupId>
|
|
- <artifactId>specialsource-maven-plugin</artifactId>
|
|
- <version>2.0.3</version>
|
|
- <executions>
|
|
- <execution>
|
|
- <phase>package</phase>
|
|
- <goals>
|
|
- <goal>remap</goal>
|
|
- </goals>
|
|
- <id>remap-members</id>
|
|
- <configuration>
|
|
- <useProjectDependencies>false</useProjectDependencies>
|
|
- <logFile>${project.build.directory}/server.txt</logFile>
|
|
- <srgIn>org.spigotmc:minecraft-server:${project.version}:csrg:maps-spigot-members</srgIn>
|
|
- <reverse>true</reverse>
|
|
- </configuration>
|
|
- </execution>
|
|
- </executions>
|
|
- </plugin>
|
|
- <plugin>
|
|
- <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>
|
|
- <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.7.1</version>
|
|
- <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>
|
|
- <descriptors>
|
|
- <descriptor>${project.basedir}/src/assembly/bootstrap.xml</descriptor>
|
|
- </descriptors>
|
|
- </configuration>
|
|
- </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-surefire-plugin</artifactId>
|
|
- <version>3.2.5</version>
|
|
- <configuration>
|
|
- <workingDirectory>${basedir}/target/test-server</workingDirectory>
|
|
- <reuseForks>false</reuseForks>
|
|
- <includes>
|
|
- <include>**/*TestSuite.java</include>
|
|
- </includes>
|
|
- </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.3.1</version>
|
|
- <executions>
|
|
- <execution>
|
|
- <phase>test-compile</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>
|
|
- </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>
|
|
- <goals>
|
|
- <goal>remap</goal>
|
|
- </goals>
|
|
- <id>remap-obf</id>
|
|
- <configuration>
|
|
- <useProjectDependencies>false</useProjectDependencies>
|
|
- <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>
|
|
- <goals>
|
|
- <goal>remap</goal>
|
|
- </goals>
|
|
- <id>remap-mojang</id>
|
|
- <configuration>
|
|
- <useProjectDependencies>false</useProjectDependencies>
|
|
- <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>
|