Skip to content

Commit

Permalink
Merge pull request #2427 from EngineHub/ot/bugfix/just-depend-on-the-…
Browse files Browse the repository at this point in the history
…configuration-doofus

Adjust adapter shading
  • Loading branch information
octylFractal authored Oct 25, 2023
2 parents 397d735 + 0e94275 commit cd0f107
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions worldedit-bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,7 @@ tasks.named<Copy>("processResources") {
addJarManifest(WorldEditKind.Plugin, includeClasspath = true)

tasks.named<ShadowJar>("shadowJar") {
dependsOn(project.project(":worldedit-bukkit:adapters").subprojects.map { it.tasks.named("assemble") })
from(Callable {
adapters.resolve()
.map { f ->
zipTree(f).matching {
exclude("META-INF/")
}
}
})
configurations.add(adapters)
dependencies {
// In tandem with not bundling log4j, we shouldn't relocate base package here.
// relocate("org.apache.logging", "com.sk89q.worldedit.log4j")
Expand All @@ -100,11 +92,21 @@ tasks.named<ShadowJar>("shadowJar") {
include(dependency("it.unimi.dsi:fastutil"))
include(dependency("com.sk89q.lib:jlibnoise"))

exclude(dependency("$group:$name"))

relocate("org.bstats", "com.sk89q.worldedit.bstats")
relocate("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib")
relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.bukkit.fastutil")
relocate("net.royawesome.jlibnoise", "com.sk89q.worldedit.jlibnoise")
}
project.project(":worldedit-bukkit:adapters").subprojects.forEach {
dependencies {
include(dependency("${it.group}:${it.name}"))
}
minimize {
exclude(dependency("${it.group}:${it.name}"))
}
}
}

tasks.named("assemble").configure {
Expand Down

0 comments on commit cd0f107

Please sign in to comment.