Sponge: Dependency as asset

Created on 27 Sep 2017  路  5Comments  路  Source: SpongePowered/Sponge

We need some way to store dependencies in plugins.
May be 'lib' directory, like in WAR?

Most helpful comment

@XakepSDK That's why you should relocate (e.g. move their classes into a subpackage of your plugin) the dependencies you shade into your plugins. That way they have different class names and won't conflict with each other.

All 5 comments

The Gradle shadow plugin and the Maven shade plugin are the recommended ways of doing this, and don鈥檛 need any special support.

The best way to make a dependency trash from your plugin jar.
upd: Plugins are not isolated from each other, some plugin can provide lib-a:1.0.0 and another plugin can provide lib-a:0.9.8. Need a way to handle this too.

@XakepSDK That's why you should relocate (e.g. move their classes into a subpackage of your plugin) the dependencies you shade into your plugins. That way they have different class names and won't conflict with each other.

Closing as SpongeAPI isn't going to reinvent the wheel that modern toolchains already do much better than we ever would.

I should also point out that if running on Forge the requested functionality is already fully supported via the ContainedDeps manifest entry.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Eufranio picture Eufranio  路  4Comments

Grinch picture Grinch  路  4Comments

gabizou picture gabizou  路  5Comments

XakepSDK picture XakepSDK  路  5Comments

TBlueF picture TBlueF  路  5Comments