bazaarvoice / bv-android-sdk

Bazaarvoice Android SDK for Developers
Other
16 stars 8 forks source link

Proguard rules #39

Open ema987 opened 5 years ago

ema987 commented 5 years ago

Hello,

I want to file an issue regarding the use of Proguard with the Android mobile sdk. I wasn't able to find any info related to Proguard on your documentation, neither inside any proguard-rules file in this repository.

Are there any information regarding its setup?

Currently I have to exclude the whole SDK from being processed by Proguard to have it working in a release APK, otherwise most of the parsing were failing due to obfuscation made by Proguard.

-keep class com.bazaarvoice.bvandroidsdk.** { *; }

Any hint will be appreciated. Thank you

SDK version: 8.2.2 SDK components: Conversations

chris-pound-bazaarvoice commented 5 years ago

Hello thanks for opening an issue,

I've opened an internal ticket to have our documentation updated with steps to support proguard with the sdk.

chris-pound-bazaarvoice commented 5 years ago

Seems obfuscation is giving some issues that I'll have to dig into. In the meantime I was able to build with:

-keepnames class com.bazaarvoice.bvandroidsdk.** {*;}

https://github.com/bazaarvoice/bv-android-sdk-conversations-example/blob/master/app/proguard-rules.pro

ema987 commented 5 years ago

Hello Chris, thank you for your support.

Yes I confirm it works with the rule you wrote, same as mine, which excludes the whole sdk from Proguard. I was wondering if it's possible to restrict it and avoid obfuscation only on needed classes, to optimize the final APK.

It's not urgent but it would be nice to have.

Thank you!