MegavexNetwork/scoreboard-library

Scoreboard-library implementation is not shaded

Closed this issue · 15 comments

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")

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

I don't have

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

Only api folder is there

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

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

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

Thats even better, thanks!

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")
    }
}

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

Still nothing though

try removing the :2.1.8 suffix

Same result

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

Yeah it works now, thanks very much again!