-
Notifications
You must be signed in to change notification settings - Fork 308
Compilation error with ProGuard enabled due to FindBugs annotation SuppressFBWarnings
#1011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks. Your title says compilation error, but the message indicates it is only a warning. Are you sure that warning is the cause of the error? Or does the app actually compile? Anyhow, yes, we should probably add a dontwarn rule for the SpotBugs annotations. |
@Whathecode Just to make clear, this warning only happens with a separate ProGuard plugin (7.2.0-beta2)? I failed to repro with Android Gradle Plugin 7.1.0-beta1. As the affected class isn't used anywhere this might be a ProGuard regression... |
Next update will add this rule:
@Whathecode Can you verify if this one also works? |
I can check, but I doubt it. Afaik the |
On top of that, As expected (stated in the previous message), the rule you suggest does not resolve the warning. |
You are right, mixed up syntax.
does not work as well? I vaguely remember adding a rule for a referenced class worked as well. |
Just checked, and that indeed works! Interesting. That is not clearly documented in the ProGuard documentation. Wouldn't it still be better to then use the following more specific rule?
|
Thanks for verifying! Next update will (actually) add the more specific rule:
|
This is included in the |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Using ProGuard 7.2.0-beta2 and ObjectBox 3.0.1, I get the following ProGuard warning during compilation:
Seemingly the
SuppressFBWarnings
class onModelModifier.PropertyModifier
can't be found. Since this seems part of a static analysis for FindBugs, I can simply disable the warning using the following proguard rules:Basic info (please complete the following information):
Expected behavior
For this to work out-of-the-box. Perhaps by including the
dontwarn
rule in the packagedobjectbox-java.pro
.Additional context
I am currently upgrading from ProGuard which is integrated as part of the Android Gradle Plugin 7.1.0-beta1 to the separate Proguard Gradle Plugin in order to see whether the latest version resolves a potential obfuscation bug I am running into. Therefore, I have currently enabled ProGuard on my debug build. Not certain whether this impacts ObjectBox, but figured this might be relevant to mention. Regardless, I just also tested in release, and the same warning shows up.
The text was updated successfully, but these errors were encountered: