okta / okta-devices-kotlin

okta-devices-kotlin
https://github.com/okta/okta-devices-kotlin
Apache License 2.0
5 stars 3 forks source link

Duplicate class a.a found in modules jetified-devices-core-0.0.1-runtime (com.okta.devices:devices-core:0.0.1) #41

Closed pkrawczykObj closed 1 year ago

pkrawczykObj commented 1 year ago

Describe the bug?

Cannot build a project after adding implementation("com.okta.devices:devices-push:0.0.1") dependency to the project.

It seems that this library uses proguard to obfuscate classes and it creates the same class name as another library used in my project, full error: Caused by: java.lang.RuntimeException: Duplicate class a.a found in modules jetified-devices-core-0.0.1-runtime (com.okta.devices:devices-core:0.0.1) and jetified-mobilesdk-v1.1.12-runtime (com.liveramp:mobilesdk:v1.1.12)

I found fixes for similar issues in other libraries:

Please use flattenpackagehierarchy in your ProGuard rules to move obfuscated classes in some unique package to prevent aforementioned conflicts with other libraries.

More details: https://github.com/helpcrunch/android-sdk-demo/issues/33 https://github.com/Adyen/adyen-3ds2-android/issues/14

What is expected to happen?

Project builds after adding this library.

What is the actual behavior?

Project cannot be built.

Reproduction Steps?

Try to build this library with com.liveramp:mobilesdk:v1.1.12 in your dependencies.

Additional Information?

Please check my proposed fix in "Describe bug" section.

SDK Version and Artifact(s) used.

0.0.1

Build Information

gradle:7.2.0

FeiChen-okta commented 1 year ago

@pkrawczykObj Will spin out a new release in the next few days. we'll keep the package names when obfuscating.

FeiChen-okta commented 1 year ago

should be fixed in 0.0.2 release

pkrawczykObj commented 1 year ago

Thank you it works now.