2024-04-23 20:44:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
|
|
|
Date: Thu, 18 Apr 2024 13:39:18 -0700
|
|
|
|
Subject: [PATCH] build: replace use of shadow plugin
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
2024-04-23 22:41:25 +02:00
|
|
|
index 3b9eb1fdc0685aec10b13a8e0e6b3afa4d953250..d9dc7a131d92efea9f37220227e1964e673cd024 100644
|
2024-04-23 20:44:28 +02:00
|
|
|
--- a/build.gradle.kts
|
|
|
|
+++ b/build.gradle.kts
|
|
|
|
@@ -4,7 +4,6 @@ import xyz.jpenilla.runpaper.task.RunServer
|
|
|
|
plugins {
|
|
|
|
java
|
|
|
|
`maven-publish`
|
|
|
|
- id("com.github.johnrengelman.shadow")
|
|
|
|
id("xyz.jpenilla.run-paper") version "2.2.3" apply false
|
|
|
|
}
|
|
|
|
|
2024-04-23 22:41:25 +02:00
|
|
|
@@ -99,14 +98,22 @@ publishing {
|
2024-04-23 20:44:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-tasks.shadowJar {
|
2024-04-23 22:41:25 +02:00
|
|
|
- configurations = listOf(project.configurations.vanillaServer.get(), alsoShade) // Paper
|
2024-04-23 20:44:28 +02:00
|
|
|
+tasks.serverJar {
|
|
|
|
+ from(alsoShade.elements.map {
|
|
|
|
+ it.map { f ->
|
|
|
|
+ if (f.asFile.isFile) {
|
|
|
|
+ zipTree(f.asFile)
|
|
|
|
+ } else {
|
|
|
|
+ f.asFile
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
}
|
|
|
|
|
|
|
|
// Paper start
|
|
|
|
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
|
|
|
|
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
|
|
|
|
- jarToScan.set(tasks.shadowJar.flatMap { it.archiveFile })
|
|
|
|
+ jarToScan.set(tasks.serverJar.flatMap { it.archiveFile })
|
|
|
|
classpath.from(configurations.compileClasspath)
|
|
|
|
}
|
|
|
|
tasks.check {
|