How to specify a runtime dependency like org.tukaani:xz
#4319
-
DescriptionIn my dependencies {
// ...
modImplementation("org.tukaani:xz:1.10")
// ...
} The mod can run finely through |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
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 You probably should use In total, your buildscript would look something like: dependencies {
// ...
implementation("org.tukaani:xz:1.10")
include("org.tukaani:xz:1.10")
// ...
} The Fabric Loom wiki page provides a few other examples of |
Beta Was this translation helpful? Give feedback.
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 usingmodImplementation
(in addition tomodImplementation
).You probably should use
implementation
rather thanmodImplementation
for that dependency since it doesn't need to be remapped. In general, only mod dependencies needmodImplementation
, and Java libraries used outside of the Minecraft/Fabric ecosystem can useimplementation
.In total, your buildscript would look something like:
depende…