The-Fireplace-Minecraft-Mods / Annotated-DI

Dependency Injection for Minecraft mods
Apache License 2.0
1 stars 4 forks source link

JIJ or relocate dependencies, shading javax.inject causes ResolutionException in Forge #11

Closed Rubydesic closed 1 year ago

Rubydesic commented 1 year ago

This Mod Version

unknown

Other Mod Name

Valkyrien Skies 2

Other Mod Version

2.1.0-beta1

What mod loader(s) are you seeing the problem on?

Forge

Mod Loader Version

1.18.2

Problem Description

See: https://github.com/ValkyrienSkies/Valkyrien-Skies-2/issues/249. Your mod shades javax.inject rather than using include, which causes a crash on Forge which expects each package to only appear in one mod jar at a time.

You should use include("javax.inject:javax.inject:1") in your build.gradle and do the same for your other libraries and their transitive dependencies, or use shadowJar to relocate those packages so they don't conflict with other mods.

Steps To Reproduce

No response

Crash Report or Error Logs

No response

Additional Information

No response

The-Fireplace commented 1 year ago

At the time of developing the initial Forge support, Forge didn't support JiJ. Now it seems it does, so I'll have to see about switching over to use it.

IkariDevGIT commented 1 year ago

when will this be fixed for 1.18?

Waterpicker commented 1 year ago

Resolved as of version 4.0.4