bloomreach / bloomreach/discovery-android-sdk
Transitive dependencies need to be declared in consuming project
- Dominant language
- Kotlin
- Stars
- 1
- Forks
- 1
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
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](https://documentation.bloomreach.com/discovery/docs/android-application-pixel-integration).
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the crash using the Android app setup described in the issue and inspect RestClient.kt at line 54, PixelValidator.kt at line 56, and the SDK's build.gradle dependency configuration. Determine how the .aar is packaged and verify the result by sending an event without manually declaring Jackson; done means the transitive dependency is available to consuming projects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- build-system, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100