Annotated DI (Forge)

Annotated DI (Forge)

145k Downloads

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

Rubydesic opened this issue ยท 3 comments

commented

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: ValkyrienSkies/Valkyrien-Skies-2#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

commented

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.

commented

when will this be fixed for 1.18?

commented

Resolved as of version 4.0.4