quilt-loom icon indicating copy to clipboard operation
quilt-loom copied to clipboard

`loom.splitEnvironmentSourceSets()` breaks inheritance for non-client & non-main classpaths

Open Ampflower opened this issue 2 years ago • 0 comments

Expected:

For testRuntimeClasspath and testCompileClasspath to correctly inherit runtimeClasspath and compileClasspath respectively when loom.splitEnvironmentSourceSets() is called.

Actual:

testRuntimeClasspath and testCompileClasspath fail to inherit the parent classpaths, only getting the modRuntimeClasspathMapped and modCompileClasspathMapped configuration. testAnnotationProcessor is the only configuration that correctly inherits from annotationProcessor.

Steps to Reproduce:

  1. Call loom.splitEnvironmentSourceSets() in your standard build.gradle for modding.
  2. Run ./gradlew dependencies

Problems this causes:

  • The inability to call Minecraft's dependencies and Minecraft itself within the test source sets.
  • mod* taking priority on any dependencies that Minecraft normally declares.
    • This was seen via the Quilt Loader 0.18.1 betas on QFAPI, which seems to be able to correctly resolve GSON despite it not being present in testmodCompileClasspath on Quilt Loader 0.17.10?
  • Manually defined configurations also can fail to inherit from the main classpaths, even when explicitly called.

Ampflower avatar Jan 22 '23 20:01 Ampflower