Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Duplicate Dependency in latest library version #94

Open
Funkatronics opened this issue Jan 26, 2023 · 1 comment
Open

[Bug] Duplicate Dependency in latest library version #94

Funkatronics opened this issue Jan 26, 2023 · 1 comment
Assignees

Comments

@Funkatronics
Copy link
Contributor

Funkatronics commented Jan 26, 2023

Describe the bug
adding a gradle dependency for com.github.metaplex-foundation:metaplex-android:1.3.2 produces a dependency resolution error due both the kborsh-android and kborsh-jvm dependencies being pulled in

To Reproduce

  • create an android app and add a dependency on com.github.metaplex-foundation:metaplex-android:1.3.2
  • try to build the app
  • see the error:
Duplicate class com.metaplex.base64.Base64Encoder found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.base64.Base64Encoder$DefaultImpls found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.base64.Base64Factory found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.buffer.ByteBuffer found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.buffer.ByteBuffer$Companion found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.buffer.ByteBuffer$DefaultImpls found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.buffer.ByteBufferKt found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.buffer.ByteOrder found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.buffer.JvmByteBuffer found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.buffer.JvmByteBuffer$WhenMappings found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.kborsh.Borsh found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.kborsh.Borsh$Default found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.kborsh.BorshDecoder found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)
Duplicate class com.metaplex.kborsh.BorshEncoder found in modules kborsh-android-0.1.0b1-runtime (com.github.metaplex-foundation.kborsh:kborsh-android:0.1.0b1) and kborsh-jvm-0.1.0b1 (com.github.metaplex-foundation.kborsh:kborsh-jvm:0.1.0b1)

Expected behavior
The app should build when using the metaplex depdency

SDK Version & Context

  • Version com.github.metaplex-foundation:metaplex-android:1.3.2
  • Additional context

Additional context

  • downgrading to `metaplex-android:1.3.0b3' removes the issue
  • this issue can be fixed by manually resolving the dependency like so:
implementation("com.github.metaplex-foundation:metaplex-android:1.3.2") {
     exclude("com.github.metaplex-foundation.kborsh", "kborsh-jvm")
}
@Funkatronics Funkatronics self-assigned this Jan 26, 2023
@Funkatronics
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant