Gradle configurations are named groups of dependencies and artifacts.
These configurations add dependencies to the compile or runtime classpaths. All of them are available in all Fabric Loom and Architectury Loom projects (as of 1.1).
Configuration | In your projects | In others' projects | Added by | ||
---|---|---|---|---|---|
Compile | Runtime | Compile | Runtime | ||
implementation | ✔ | ✔ | ❌ | ✔ | Java plugin |
api | ✔ | ✔ | ✔ | ✔ | Java Library plugin |
compileOnly | ✔ | ❌ | Not published | Java plugin | |
compileOnlyApi | ✔ | ❌ | ✔ | ❌ | Java Library plugin |
localRuntime | ❌ | ✔ | Not published | Loom | |
runtimeOnly | ❌ | ✔ | ❌ | ✔ | Java plugin |
All of these configurations have mod*
variants such as modImplementation
to use when depending on a mod. The dependency will get remapped to the project mappings and added to the correct mod classpaths.
Others won't see the configurations marked with “Not published” when they depend on your project.
include
: Bundles a mod or a library within your mod.forgeRuntimeLibrary
(added by Architectury Loom in Forge mode):namedElements
project(path: ':common', configuration: 'namedElements')
.development(Fabric|Forge|Quilt|NeoForge)
@ExpectPlatform
etc.)transformProduction(Fabric|Forge|Quilt|NeoForge)
shadow
(added by the Shadow plugin)all
jar created by the shadowJar
task.