3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-20 09:50:06 +01:00

Fix shading of folia adapters

Dieser Commit ist enthalten in:
Phillip Glanz 2023-04-02 21:36:16 +02:00 committet von Phillipp Glanz
Ursprung af92230706
Commit 7030213db3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden

Datei anzeigen

@ -60,7 +60,15 @@ val adapters = configurations.create("adapters") {
) )
} }
} }
val foliaAdapters = configurations.create("foliaAdapters") {
description = "Adapters to include in the JAR"
isCanBeConsumed = false
isCanBeResolved = true
shouldResolveConsistentlyWith(configurations["runtimeClasspath"])
attributes {
attribute(Obfuscation.OBFUSCATION_ATTRIBUTE, objects.named(Obfuscation.OBFUSCATED))
}
}
dependencies { dependencies {
// Modules // Modules
api(projects.worldeditCore) api(projects.worldeditCore)
@ -70,7 +78,7 @@ dependencies {
"adapters"(project(it.path)) "adapters"(project(it.path))
} }
project.project(":worldedit-bukkit:folia-adapters").subprojects.forEach { project.project(":worldedit-bukkit:folia-adapters").subprojects.forEach {
"adapters"(project(it.path)) "foliaAdapters"(project(it.path))
} }
// Minecraft expectations // Minecraft expectations
@ -154,6 +162,14 @@ tasks.named<ShadowJar>("shadowJar") {
} }
} }
}) })
from(Callable {
foliaAdapters.resolve()
.map { f ->
zipTree(f).matching {
exclude("META-INF/")
}
}
})
archiveFileName.set("${rootProject.name}-Bukkit-${project.version}.${archiveExtension.getOrElse("jar")}") archiveFileName.set("${rootProject.name}-Bukkit-${project.version}.${archiveExtension.getOrElse("jar")}")
dependencies { dependencies {
// In tandem with not bundling log4j, we shouldn't relocate base package here. // In tandem with not bundling log4j, we shouldn't relocate base package here.