DiscordSRV includes ancient jetbrains annotations in jar
rymiel opened this issue ยท 2 comments
Expected behavior
I can depend on DiscordSRV as a gradle dependency and use a modern version of jetbrains annotations that supports TYPE_USE annotations.
Actual behavior
Since 1.26.1, jetbrains annotations in getting included in the released jar, but it's a newer version, so it's fine.
Since 1.27.0, an ancient Java 5 version is included, which lacks TYPE_USE. This breaks usages like this:
public void f(byte @NotNull [] message) {}
This snippet won't compile if DiscordSRV is included as a dependency in my gradle project.
Steps to reproduce
Open up the jar file of 1.27.0 and note the existence of the org/jetbrains/annotations folders. Use javap on any class (like "NotNull.class") and note that the major version is 49, corresponding to java 5. Also note the lack of TYPE_USE in the bytecode.
Server software and version
not relevant
Checks
- I am not using an outdated version of DiscordSRV.
- I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.
- I didn't actually check any of these things
Anything else
There is no reason to include annotations in the release jar, they don't do anything after compilation.
Also, your issue tracker is not built for handling build or dependency errors.
forgot to leave a comment; this should be fixed in the latest snapshot builds. Issue will be automatically closed once a release build is published.