documentation:fabric_loom
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
documentation:fabric_loom [2022/08/29 11:58] – Add docs for createRemapConfigurations modmuss50 | documentation:fabric_loom [2023/04/24 11:33] – Add split sources requirements. modmuss50 | ||
---|---|---|---|
Line 11: | Line 11: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
Line 30: | Line 31: | ||
The following snippet from a build.gradle file shows how you can enable this for your mod. As your mod will now be split across two sourcesets, you will need to use the new DSL to define your mods sourcesets. This enables Fabric Loader to group your mods classpath together. This is also useful for some other complex multi-project setups. | The following snippet from a build.gradle file shows how you can enable this for your mod. As your mod will now be split across two sourcesets, you will need to use the new DSL to define your mods sourcesets. This enables Fabric Loader to group your mods classpath together. This is also useful for some other complex multi-project setups. | ||
+ | |||
+ | Minecraft 1.18 (1.19 recommended), | ||
< | < | ||
Line 43: | Line 46: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ==== Multi project Optimisation ==== | ||
+ | |||
+ | If your Gradle project has many subprojects that use the same Minecraft version such as Fabric-API, starting with Loom 1.1 you can now opt-in to advanced optimistations. Adding < | ||
==== Options ==== | ==== Options ==== | ||
Line 77: | Line 84: | ||
// Add a program arg | // Add a program arg | ||
programArg " | programArg " | ||
+ | // Add an environment variable | ||
+ | environmentVariable(" | ||
// The environment (or side) to run, usually client or server. | // The environment (or side) to run, usually client or server. | ||
environment = " | environment = " | ||
Line 105: | Line 114: | ||
source = sourceSets.test | source = sourceSets.test | ||
} | } | ||
+ | |||
+ | // Example of removing the built-in server configuration | ||
+ | remove server | ||
} | } | ||
Line 228: | Line 240: | ||
==== Resolving issues ==== | ==== Resolving issues ==== | ||
- | Loom and/or gradle can sometimes fail due to corrupted cache files. Running '' | + | Loom and/or gradle can sometimes fail due to corrupted cache files. Running '' |
==== Development environment setup ==== | ==== Development environment setup ==== | ||
Line 278: | Line 290: | ||
The client run configuration is configured with '' | The client run configuration is configured with '' | ||
+ | |||
documentation/fabric_loom.txt · Last modified: 2023/12/22 14:39 by modmuss50