Skip to content

How to specify a runtime dependency like org.tukaani:xz #4319

Discussion options

You must be logged in to vote

When you are running your mod in development, your dependencies will be available at runtime, but these dependencies are not available at runtime in production. To solve this, you can use a technique known as shadowing. Loom provides the include configuration which you can use like you are currently using modImplementation (in addition to modImplementation).

You probably should use implementation rather than modImplementation for that dependency since it doesn't need to be remapped. In general, only mod dependencies need modImplementation, and Java libraries used outside of the Minecraft/Fabric ecosystem can use implementation.

In total, your buildscript would look something like:

depende…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@IAmREGE
Comment options

@haykam821
Comment options

@sakura-ryoko
Comment options

Answer selected by IAmREGE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
3 participants