Skip to content

Extract Dependencies Properly #139

@wko27

Description

@wko27

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions