configcat / android-sdk

ConfigCat SDK for Android. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
https://configcat.com/docs/sdk-reference/android
MIT License
13 stars 3 forks source link

With R8 (proguard) enabled, all flags are returning default values. #17

Closed valeriyo closed 2 years ago

valeriyo commented 2 years ago

Describe the bug

Feature flags work in debug build, but in release (with "isMinifyEnabled = true") - all flags return default values.

valeriyo commented 2 years ago

I added a "keep all" rule in proguard-rules.pro:

-keep class com.configcat.** { *; }
-dontwarn org.slf4j.**

and release works now, however, this effectively disabled R8 for your library.

Please provide more specific rule(s) in the README.

z4kn4fein commented 2 years ago

Hi @valeriyo, thank your for reporting! I'm going to create a consumer proguard file with the required rules and include it in the project.

z4kn4fein commented 2 years ago

Hi @valeriyo, we released v7.1.0 that contains the consumer proguard rules, could you please check that it works on your end as expected? Thanks!

valeriyo commented 2 years ago

Appears to work for me, although my current usage is very basic (e.g. no percentage rollout stuff). Thanks!