AlessioDP / libby

A runtime dependency management library for plugins running in Java-based Minecraft server platforms.
MIT License
76 stars 20 forks source link

Auto download dependency of dependency #18

Open MrAxeTv opened 11 months ago

MrAxeTv commented 11 months ago

Hi I am not sure is this right place for suggestion. But for example I encounter with small problem loading this lib https://mvnrepository.com/artifact/dev.triumphteam/triumph-gui Thing is that triumph-gui has dependencies which have there own dependencies so I needed to add another 9 dependencies to make it work image would it be possible to add option to read pom file if loaded lib has any dependencies and import them to automatically if they are available at maven central?

bivashy commented 11 months ago

This is possible to retrieve all transitive dependencies (dependency of dependency), and add into LibraryManager automatically.

For example you can use aether for that purpose. Here is code snippet: https://github.com/patching/aether-demo/blob/master/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/ResolveTransitiveDependencies.java

Maybe we can create another module for transitive dependency resolve?

MrAxeTv commented 11 months ago

I will check it out will see what I can do

Ghost-chu commented 6 months ago

I'm waiting for this too, it would be great if it could impl.

frengor commented 6 months ago

In the 2.0.0 beta available on the gradle branch there is the possibility to make Libby download transitive dependencies for a library using Library.Builder#resolveTransitiveDependencies(boolean).

Ghost-chu commented 6 months ago

In the 2.0.0 beta available on the gradle branch there is the possibility to make Libby download transitive dependencies for a library using Library.Builder#resolveTransitiveDependencies(boolean).

It works, thank you for mention it! 10/10