As you might know, SuppressFBWarnings
annotations are retained in the class files, but aren't needed on runtime, so FindBugs doesn't become a runtime dependency of your project. Unfortunately, those reatined annotations cause compilation warnings like this for Gradle users who use the project as dependency:
warning: Cannot find annotation method 'value()' in type
'SuppressFBWarnings': class file for
edu.umd.cs.findbugs.annotations.SuppressFBWarnings not found
Note that Maven users don't get any warnings (with the default javac configuration). But of course I can't ignore Gradle users.
So it seems I have to remove those annotations from the release builds somehow. But I can't find any existing solution, which is strange. How do others deal with this problem?
SuppressFBWarnings
, while the project itself wasn't dependent on FindBugs? – BurressSuppressFBWarnings
and other popular annotations are concerned). – Madlin