Dependency Conflict: Incompatible Bouncy Castle Artifacts (bcprov-jdk15on:1.65 vs. bcprov-jdk15to18:1.77) Causing Duplicate Classes Issue #2019
Labels
support request
Community assistance requested
I am sharing the scenario below which is causing an issue after adding an SDK dependency:
I am facing a duplicate classes issue for Bouncy Castle (snapshot of the issue given below):
Duplicate Classes Found in:
Duplicate Classes:
On running the
./gradlew app:dependencies
command, I found that Bouncy Castle is included by two different SDKs :(by the new SDK which I am adding, and a SDK which already exists in our project)
bcprov-jdk15on:1.65
→ included by that one SDK which already exists in our project.bcprov-jdk15to18:1.77
→ included by the SDK which I newly adding.Shared dependencies are common, and Gradle usually resolves them by selecting the latest version. However, in this case, the issue likely arises due to **incompatible Bouncy Castle artifacts rather than just a version conflict**.
bcprov-jdk15on:1.65
andbcprov-jdk15to18:1.77
are different artifacts, not just different versions.Some libraries expect
bcprov-jdk15on
, while others expectbcprov-jdk15to18
.If Gradle picks
bcprov-jdk15to18:1.77
, but another library relies on classes that only exist in bcprov-jdk15on, we will get missing class/unresolved reference errors.We need Bouncy Castle’s team support to understand the best way to resolve this dependency issue.
The text was updated successfully, but these errors were encountered: