mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 21:33:49 -07:00
few fixes to make it actually run
This commit is contained in:
@@ -22,7 +22,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +0,0 @@
|
||||
+import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
|
||||
+import java.time.Instant
|
||||
+import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
|
||||
+import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer
|
||||
+import org.gradle.api.file.FileTreeElement
|
||||
+import shadow.org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.PLUGIN_CACHE_FILE
|
||||
+import java.util.Date
|
||||
+import java.text.SimpleDateFormat
|
||||
+
|
||||
+plugins {
|
||||
+ java
|
||||
@@ -62,7 +67,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ attributes(mapOf(
|
||||
+ "Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
+ "Implementation-Title" to "CraftBukkit",
|
||||
+ "Implementation-Vendor" to Instant.now().epochSecond,
|
||||
+ "Implementation-Vendor" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").format(Date()), // Paper
|
||||
+ "Specification-Title" to "Bukkit",
|
||||
+ "Specification-Version" to project.version,
|
||||
+ "Specification-Vendor" to "Bukkit Team"
|
||||
@@ -88,8 +93,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ transform(AppendingTransformer::class.java) {
|
||||
+ resource = "META-INF/services/java.sql.Driver"
|
||||
+ }
|
||||
+ transform(ModifiedLog4j2PluginsCacheFileTransformer::class.java)
|
||||
+}
|
||||
+
|
||||
+tasks.test {
|
||||
+ exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
|
||||
+}
|
||||
+
|
||||
+class ModifiedLog4j2PluginsCacheFileTransformer : Transformer by Log4j2PluginsCacheFileTransformer() {
|
||||
+ override fun canTransformResource(element: FileTreeElement): Boolean {
|
||||
+ return PLUGIN_CACHE_FILE == element.name || element.name == "Log4j2Plugins.dat"
|
||||
+ }
|
||||
+}
|
||||
|
Reference in New Issue
Block a user