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

Transitive dependencies need to be declared in consuming project #24

Open
RSM-CZE opened this issue Jul 15, 2024 · 0 comments
Open

Transitive dependencies need to be declared in consuming project #24

RSM-CZE opened this issue Jul 15, 2024 · 0 comments

Comments

@RSM-CZE
Copy link

RSM-CZE commented Jul 15, 2024

Without using a dependency manager, consuming projects must manually declare any transitive dependencies as they are not packaged into the .aar file. This can be inconvenient.

Reproduction Steps

  1. In an app project that does not use Jackson as serialization library.
  2. Add the Pixel dependency as described in the documentation.
  3. Try to send any event.

You will encounter a crash in RestClient::validatePixel at line 54 (val mapper = ObjectMapper()) with the following exception:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/fasterxml/jackson/databind/ObjectMapper;
at com.bloomreach.discovery.pixel.network.RestClient.validatePixel(RestClient.kt:54)
at com.bloomreach.discovery.pixel.validator.PixelValidator$validatePixel$1.invokeSuspend(PixelValidator.kt:56)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
...

Inconvenient Fix
To resolve this issue, add the Jackson dependency explicitly in the app's build.gradle file. However, with this approach, any changes to the dependencies of discovery-android-sdk after updates will need to be manually added by the consumer.

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