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

`Configuration 'minecraft' must only have 1 dependency` error across source sets

Open SilverAndro opened this issue 1 year ago • 1 comments

The hard cap on one minecraft dependency seems to apply across source sets, unlike other dependency systems for gradle.

This causes issues when, in my case, attempting to setup a kotlin multiplatform project, which manages dependencies per-target with source sets, as you can only have 1 target depend on minecraft.

I'd love to see this restriction lifted somehow, as it seems to be arbitrarily limiting for no obvious reason? It would also allow things like writing tests that verify compatibility with different versions of the game from the main compile target, such as a code change not breaking on 1.19.1 while compiling against 1.19.2 (as well as just generally being a more gradle-esc design).

One concern would be what the "main" minecraft version becomes for things such as run configurations, but I believe this could be solved with some kind of:

  • Configuration flag to opt in to this system and manually choose a main version
  • Configuration to specify a "main" source set

SilverAndro avatar Sep 05 '22 03:09 SilverAndro

Actually thinking about this more, this could also help with cross-version compat in general

The project im hoping to build specifically is a small shim api over chat + text so that I can rely on it and have my mod work on 1.18.2-1.19.2, if this restriction was released, I could see projects like architectuary picking it up, and devs having to spend less time on updating and have more free time for actually developing

SilverAndro avatar Sep 05 '22 03:09 SilverAndro