* Add test for #801
* Add test for #572
* Rewrite mod configuration remapping internals to fix bugs
Fixes#801. Fixes#572.
- Instead of individual mod configs getting remapped, Loom now remaps
"collector configs": `mod[Compile/Runtime]Classpath[source set name]`
(eg `modRuntimeClasspathMain` -> `modRuntimeClasspathMainRemapped`)
- This lets us use Gradle's `org.gradle.usage` attributes to select
whether it's a compile-time or runtime dependency
- Note: Remap configurations sourcing from `api` are partially left
intact due to their special logic in the `namedElements` configuration.
- Setting the proper usages fixes#801.
- No dependency files are added to the real target configurations
(like `api` and `implementation`) anymore.
- This fixes#572, since `runtimeClasspath` and `compileClasspath` don't
leak transitive dependencies unlike `implementation` etc.
* Fix checkstyle
* Fix split env dependency consumers
* Only use collector configs for remapped deps and let the inputs stay intact
This way the code has less duplication.
* Improve log messages
* Update year
* Add some comments
* Fix compilation
* Use LinkedHashMap for reliable iteration order through remapped configs
* Use ImmutableMap.of instead of Map.of for reliable ordering
* ModConfigurationRemapper: Move namedElements handling out of forEach
* Add regression test for a crash where loader is resolved after other mods
* Fix the aforementioned bug
* Rename InstallerDataTest -> DependencyOrderTest
* Add TODO about refresh dependencies
The code currently processes the same deps multiple times when
--refresh-dependencies/-Dloom.refresh=true/a cache invalidation
is applied.
Co-authored-by: modmuss50 <modmuss50@gmail.com>
* Add gradle 8 tests
Reuse gradle home between tests
Misc perf and mem optimisations
* Fix build warning.
* Added multi mc version test
* Use server launcher in ServerRunner
Co-authored-by: Luna <62033805+Luna5ama@users.noreply.github.com>
This allows for none mod jars to opt-into remapping, as well as mods or mod loaders to opt-out.
Setting "Fabric-Loom-Remap" to true/false in the jar's manifest.
* Fix Download to work with symlinks
- Create SymlinkWalker
* isPathSymbolic for whether any part of the path is symbolic, existing or not.
* getRealPath for obtaining absolute, real path.
- Change Download to use SymlinkWalker
- Add in a new test for testing with symlinks
* Refactor
Switch to using Guava method for creating directories
* Fix import
* Alter test and fix arguments
* Forgot a def
* Fix method argument
* Change argument to child file
* Bump