Skip to content

Compilation error with ProGuard enabled due to FindBugs annotation SuppressFBWarnings #1011

@Whathecode

Description

@Whathecode

Describe the bug
Using ProGuard 7.2.0-beta2 and ObjectBox 3.0.1, I get the following ProGuard warning during compilation:

Warning: io.objectbox.ideasonly.ModelModifier$PropertyModifier: can't find referenced class edu.umd.cs.findbugs.annotations.SuppressFBWarnings

Seemingly the SuppressFBWarnings class on ModelModifier.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:

-dontwarn io.objectbox.ideasonly.ModelModifier$PropertyModifier

Basic info (please complete the following information):

  • ObjectBox version: 3.0.1
  • Reproducibility: always

Expected behavior
For this to work out-of-the-box. Perhaps by including the dontwarn rule in the packaged objectbox-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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions