SpaiR / imgui-java

JNI based binding for Dear ImGui
MIT License
598 stars 90 forks source link

Dependency tree issue #127

Closed phraktle closed 1 year ago

phraktle commented 2 years ago

When including the io.github.spair:imgui-java-app:1.86.4 dependency in a project, io.github.spair:imgui-java-binding:1.86.4 is also included as a transitive dependencies. However, the contents of that jar are also incorporated into the shadow jar in imgui-java-app, leading to these classes being present in multiple jar files.

Also, since the shadow jar does not include the source references to the bundled dependencies, IDEs such as Eclipse do not show argument names / javadocs when working with the API (unless one manually orders dependencies so the imgui-java-binding is listed before imgui-java-app.

Suggested solution is to have a maven/gradle dependency without shadowing.

Dependency tree:

+--- io.github.spair:imgui-java-app:1.86.4
|    +--- org.lwjgl:lwjgl-bom:3.3.1
|    |    +--- org.lwjgl:lwjgl:3.3.1 (c)
|    |    +--- org.lwjgl:lwjgl-glfw:3.3.1 (c)
|    |    \--- org.lwjgl:lwjgl-opengl:3.3.1 (c)
|    +--- org.lwjgl:lwjgl -> 3.3.1
|    +--- org.lwjgl:lwjgl-glfw -> 3.3.1
|    |    \--- org.lwjgl:lwjgl:3.3.1
|    +--- org.lwjgl:lwjgl-opengl -> 3.3.1
|    |    \--- org.lwjgl:lwjgl:3.3.1
|    +--- io.github.spair:imgui-java-binding:1.86.4
|    \--- io.github.spair:imgui-java-lwjgl3:1.86.4
|         +--- org.lwjgl:lwjgl-bom:3.3.1 (*)
|         +--- org.lwjgl:lwjgl -> 3.3.1
|         +--- org.lwjgl:lwjgl-glfw -> 3.3.1 (*)
|         +--- org.lwjgl:lwjgl-opengl -> 3.3.1 (*)
|         \--- io.github.spair:imgui-java-binding:1.86.4
phraktle commented 2 years ago

It sounds like #75 is the same issue.

phraktle commented 1 year ago

Thanks! Is there a maven release that has this yet?

SpaiR commented 1 year ago

@phraktle Yes, 1.86.5 version available in Maven and already accessible in Maven/Gradle dependencies. Maven Central requires time to update search indexes though.

I'll post the GitHub release a little bit later.