MegavexNetwork / scoreboard-library

Powerful packet-level scoreboard library for Paper/Spigot servers
https://megavex.net
MIT License
122 stars 13 forks source link

Scoreboard-library implementation is not shaded #39

Closed Jakush closed 3 months ago

Jakush commented 3 months ago

Hey, I have this error: Caused by: java.lang.IllegalStateException: scoreboard-library implementation is not shaded into the classpath

Though it should be normally shaded or? This is my build.gradle and yes I have shadowJar there

implementation("net.megavex:scoreboard-library-api:2.1.8")
runtimeOnly("net.megavex:scoreboard-library-implementation:2.1.8")
runtimeOnly("net.megavex:scoreboard-library-modern:2.1.8")
vytskalt commented 3 months ago

do you have any custom shadowJar configuration? if so, please send it here

Jakush commented 3 months ago

I don't have

vytskalt commented 3 months ago

open the plugin .jar as a zip file and check if net/megavex/scoreboardlibrary/implementation exists

Jakush commented 3 months ago

Only api folder is there

vytskalt commented 3 months ago

that looks like some sort of bug in ShadowJar, you can try changing runtimeOnly to implementation or switch to this fork of ShadowJar which is more up to date

Jakush commented 3 months ago

Oh my god :D It was just because I had minimize() there which shaded only first implementation, sorry

vytskalt commented 3 months ago

you can still use minimize(), just need to exclude all scoreboard-library related dependencies

Jakush commented 3 months ago

Thats even better, thanks!

Jakush commented 3 months ago

I might be dumb, but this does not exclude it :D

shadowJar {
    minimize() {
        exclude("net.megavex:scoreboard-library-api:2.1.8")
        exclude("net.megavex:scoreboard-library-implementation:2.1.8")
        exclude("net.megavex:scoreboard-library-modern:2.1.8")
    }
}
vytskalt commented 3 months ago

also add exclude("net.megavex:scoreboard-library-commons") and exclude("net.megavex:scoreboard-library-packet-adapter-base")

Jakush commented 3 months ago

Still nothing though

vytskalt commented 3 months ago

try removing the :2.1.8 suffix

Jakush commented 3 months ago

Same result

vytskalt commented 3 months ago

change exclude("X") to exclude(dependency("X")) like in the docs https://imperceptiblethoughts.com/shadow/configuration/minimizing/

Jakush commented 3 months ago

Yeah it works now, thanks very much again!