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

Extract Dependencies Properly #139

Open
wko27 opened this issue Nov 22, 2023 · 0 comments
Open

Extract Dependencies Properly #139

wko27 opened this issue Nov 22, 2023 · 0 comments

Comments

@wko27
Copy link

wko27 commented Nov 22, 2023

Hello!

We're observing that the com.smartcar.sdk:java-sdk:3.10.0 includes copies of both Gson and Apache Commons internally.

This is an issue because are including the classes from those libraries with the default package/namespace, i.e. com.google.gson.* and org.apache.commons.*. This means that any code that uses your library and wants to use a DIFFERENT version of those libraries will have collisions.

The most common solutions to this are either to:

  1. repackage those libraries, so instead they are referenced as e.g.com.smartcar.repackaged.internal.google.gson.*
  2. declare those libraries as an implementation dependency instead of an api dependency in your build.gradle properly

For more reading on option 2, please see https://docs.gradle.org/current/userguide/java_library_plugin.html.

Please let me know if you'd like a pull request with one of the two options!

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

No branches or pull requests

1 participant