Patch Dependency in Android Project

So my Android project has a bunch of dependencies and one of them contains an annotation that has a retention of RetentionPolicy.SOURCE. What I need is however a retention of RetentionPolicy.CLASS.

I was hoping I can somehow patch the dependency without forking the whole project. It would probably be enough to exclude the one class file and add a modified version to my source code. Any tips on this?