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] kborsh:0.1.0b1 produces dependency resolution error #2

Open
Funkatronics opened this issue Jan 27, 2023 · 0 comments
Open

[Bug] kborsh:0.1.0b1 produces dependency resolution error #2

Funkatronics opened this issue Jan 27, 2023 · 0 comments
Assignees

Comments

@Funkatronics
Copy link
Contributor

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

To Reproduce

  • create an android library and add a dependency on com.github.metaplex-foundation:kborsh:0.1.0b1
  • try to import the library into another 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

  • Platform: Android/JVM
  • Version com.github.metaplex-foundation:kborsh:0.1.0b1 / com.github.metaplex-foundation:metaplex-android:1.3.2

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:kborsh:0.1.0b1'){
    exclude group: 'com.github.metaplex-foundation.kborsh', module:'kborsh-jvm'
}
@Funkatronics Funkatronics self-assigned this Jan 27, 2023
@Funkatronics Funkatronics changed the title [Bug] A Brief Description of the Issue [Bug] kborsh:0.1.0b1 produces dependency resolution error Aug 16, 2023
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