helpcrunch / android-sdk-demo

Public demo for HelpCrunch Android SDK
Apache License 2.0
9 stars 1 forks source link

Not expose -flattenpackagehierarchy 'com.helpcrunch.library' to clients #75

Closed nostra13 closed 1 year ago

nostra13 commented 1 year ago

Returning to ignored issue from https://github.com/helpcrunch/android-sdk-demo/issues/49

I proposed to use -flattenpackagehierarchy to organize obfuscated classes from you lib (https://github.com/helpcrunch/android-sdk-demo/issues/33) but I found out that this instruction is exposed to all consumers. As a result all my classes are obfuscated and moved to com.helpcrunch.library package. My mapping file looks like:

android.support.v4.app.INotificationSideChannel -> com.helpcrunch.library.mu1:
...
androidx.camera.camera2.internal.SynchronizedCaptureSession$StateCallback -> com.helpcrunch.library.rm4$a:
...
my.app.package.ui.login.LoginPhoneView$$State -> com.helpcrunch.library.fa2:
...

It's very confusing to investigate crash reports. I want all Help-Crunch classes stay in com.helpcrunch.library.** package but all my classes stay out of it.

So please use -flattenpackagehierarchy for preparing your AAR library but not include -flattenpackagehierarchy 'com.helpcrunch.library' into proguard.txt inside AAR.

I guess it can be done by separated file for consumers:

defaultConfig {
    consumerProguardFiles 'proguard.txt'
}
TalbotGooday commented 1 year ago

Fixed in v3.3.2