khalti-sdk-android
khalti-sdk-android copied to clipboard
Can't disable R8 in newer gradle version
We can't disable R8 in gradle version newer than 7.0. So, it is causing conflict with other dependencies because some of them also have obfuscated a.a(a.b / whatever) class which this library also has. The build logs is as ### follows:
Duplicate class a.a found in modules jetified-eSewaSdk-runtime (eSewaSdk.aar) and jetified-khalti-android-2.01.02-runtime (com.khalti:khalti-android:2.01.02)
Duplicate class b.a found in modules jetified-eSewaSdk-runtime (eSewaSdk.aar) and jetified-khalti-android-2.01.02-runtime (com.khalti:khalti-android:2.01.02)
Duplicate class b.b found in modules jetified-eSewaSdk-runtime (eSewaSdk.aar) and jetified-khalti-android-2.01.02-runtime (com.khalti:khalti-android:2.01.02)
Duplicate class b.c found in modules jetified-eSewaSdk-runtime (eSewaSdk.aar) and jetified-khalti-android-2.01.02-runtime (com.khalti:khalti-android:2.01.02)
Duplicate class c.a found in modules jetified-eSewaSdk-runtime (eSewaSdk.aar) and jetified-khalti-android-2.01.02-runtime (com.khalti:khalti-android:2.01.02)
Solution: as discussed here, please use flattenpackagehierarchy
in your ProGuard rules to move obfuscated classes in some unique package to prevent aforementioned conflicts with other libraries.