Skip to content

Commit

Permalink
fix: shading with newer shadow plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
confuser committed Jan 5, 2025
1 parent 7214f56 commit 0ac361a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
18 changes: 11 additions & 7 deletions bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ tasks.named<ShadowJar>("shadowJar") {
dependencies {
include(dependency(":BanManagerCommon"))
include(dependency(":BanManagerLibs"))
relocate("org.bstats", "me.confuser.banmanager.common.bstats") {
include(dependency("org.bstats:"))
}
relocate("org.slf4j", "me.confuser.banmanager.common.slf4j") {
include(dependency("org.slf4j:"))
}

include(dependency("org.bstats:.*:.*"))
include(dependency("org.slf4j:.*:.*"))

relocate("org.bstats", "me.confuser.banmanager.common.bstats")
relocate("org.slf4j", "me.confuser.banmanager.common.slf4j")
}

exclude("GradleStart**")
Expand All @@ -132,8 +132,12 @@ tasks.named<ShadowJar>("shadowJar") {
exclude("org/intellij/**")
exclude("org/jetbrains/**")
exclude("bungeecord.yml")
exclude("velocity.yml")

minimize()
minimize {
exclude(dependency("org.bstats:.*:.*"))
exclude(dependency("org.slf4j:.*:.*"))
}
}

tasks.named("assemble").configure {
Expand Down
11 changes: 7 additions & 4 deletions bungee/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ tasks.named<ShadowJar>("shadowJar") {
dependencies {
include(dependency(":BanManagerCommon"))
include(dependency(":BanManagerLibs"))
relocate("org.bstats", "me.confuser.banmanager.common.bstats") {
include(dependency("org.bstats:"))
}
include(dependency("org.bstats:.*:.*"))

relocate("org.bstats", "me.confuser.banmanager.common.bstats")
}
exclude("GradleStart**")
exclude(".cache");
Expand All @@ -105,8 +105,11 @@ tasks.named<ShadowJar>("shadowJar") {
exclude("META-INF/maven/**")
exclude("org/intellij/**")
exclude("org/jetbrains/**")
exclude("velocity.yml")

minimize()
minimize {
exclude(dependency("org.bstats:.*:.*"))
}
}

tasks.named("assemble").configure {
Expand Down
11 changes: 7 additions & 4 deletions sponge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ tasks.named<ShadowJar>("shadowJar") {
dependencies {
include(dependency(":BanManagerCommon"))
include(dependency(":BanManagerLibs"))
relocate("org.bstats", "me.confuser.banmanager.common.bstats") {
include(dependency("org.bstats:"))
}
include(dependency("org.bstats:.*:.*"))

relocate("org.bstats", "me.confuser.banmanager.common.bstats")
}

exclude("GradleStart**")
Expand All @@ -168,8 +168,11 @@ tasks.named<ShadowJar>("shadowJar") {
exclude("**/module-info.class")
exclude("*.yml")
exclude("assets/banmanager/bungeecord.yml")
exclude("assets/banmanager/velocity.yml")

minimize()
minimize {
exclude(dependency("org.bstats:.*:.*"))
}
}

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

0 comments on commit 0ac361a

Please sign in to comment.