AnvilGUI icon indicating copy to clipboard operation
AnvilGUI copied to clipboard

Suggestion for "minimizeJar"

Open mfnalex opened this issue 3 years ago • 1 comments

Hi, nice library!

I noticed that you tell people to not use "minimizeJar" because it obviously doesn't detect classes used through reflection.

For my JeffLib library, I simply tell people to add a filter to the shade plugin, maybe you can also add this to your README if you like. I'd normally pull request it but I'm quite busy rn. Something like this will include the required classes even when using minimizeJar:

            <filter>
                <artifact>*:*</artifact>
                <excludeDefaults>false</excludeDefaults>
                <includes>
                    <include>com/jeff_media/jefflib/internal/nms/**</include>
                </includes>
            </filter>

Have a nice day!

mfnalex avatar Jul 30 '22 11:07 mfnalex

It also works when you're relocating classes btw

mfnalex avatar Jul 30 '22 11:07 mfnalex

+1

Current README can confuse some inexperienced developers.

Also, in Gradle you can use something like that:

shadowJar {
    minimize() {
        exclude(dependency('net.wesjd:anvilgui:.*'))
    }
}

ipiepiepie avatar Nov 11 '22 04:11 ipiepiepie