Android Studio issues a warning when we include this library in our app:
The consumer keep rules at sdk-5.1.0/proguard.txt (from com.exponea.sdk:sdk:5.1.0) contains a global option which should not be specified in library consumer rules: -ignorewarnings
Libraries often include consumer keep rules to instruct R8 how to optimize the library, especially if the library uses reflection. These keep rules typically indicate to R8 of which classes, methods and fields shouldn't be fully optimized so e.g. reflection continues to work.
Global keep rules can be used by an application to disable significant optimization features, debug R8 behavior, suppress warnings, etc. However, these global options should not be included in library consumer rules -- those distributed with a library.
Starting in Android Gradle Plugin version 9.0, all such rules are not supported in library builds, and ignored by application builds if included in a library. Libraries should not rely on these global options in consumer rules to function, and should remove them.
If you see a flagged library, first try to update to a newer version that doesn't have the embedded global rule. If an updated version without these global options is not available, contact the library vendor to ask about their plans to remove global options, and thus support better R8 configuration.
As an application developer using Android Gradle Plugin 9.0, verify that Android Gradle Plugin removing these global options isn't causing issues in your application. If they are, you can add them temporarily to a local keep rule file.
Issue id: GlobalOptionInConsumerRules
Android Studio issues a warning when we include this library in our app: