simbiose / Encryption

Encryption is a simple way to encrypt and decrypt strings on Android and Java project.
MIT License
354 stars 79 forks source link

Proguard settings #16

Closed tarunmahe closed 6 years ago

tarunmahe commented 7 years ago

Please mention the proguard settings to be used with this library.

With minifyEnabled I am getting this exception

java.lang.IncompatibleClassChangeError: Expected 'byte[] third.part.android.util.c.a' to be a instance field rather than a static field (declaration of 'third.part.android.util.c' appears in /base.apk) `at third.part.android.util.c.(Unknown Source)

                                                   at third.part.android.util.Base64.d(Unknown Source)

                                                   at third.part.android.util.Base64.c(Unknown Source)

                                                   at third.part.android.util.Base64.encodeToString(Unknown Source)

                                                   at se.simbio.encryption.Encryption.b(Unknown Source)

                                                   at se.simbio.encryption.Encryption.decrypt(Unknown Source)`
ademar111190 commented 7 years ago

Can you add more details? maybe a sample project with the problem or at least the build gradle and proguard rules currently in use, because actually I tried to replicate the problem but it seems to work perfectly with proguard.

I added the follow configuration to android sample and it works as expected:

buildTypes {
    all {
        shrinkResources true
        minifyEnabled true
        proguardFile getDefaultProguardFile("proguard-android.txt")
        proguardFile "proguard-rules.pro"
    }
}
ademar111190 commented 6 years ago

Closing the issue, all tests I did with proguard the library works as expected.