architectury / architectury-plugin

A simple gradle plugin to enable developing multiplatform mods.
MIT License
56 stars 19 forks source link

Add `Fabric-Loom-Remap` to the Common manifest #34

Open MichaelHillcox opened 1 year ago

MichaelHillcox commented 1 year ago

When attempting to use an Arch project inside a Non-Arch-Loom, specifically where the common project uses loom instead of Arch loom or VanillaGradle libs that do not have Fabric-Loom-Remap defined in the jar manifest will cause loom to not properly remap the dependency.

I'll be honest, this is information from @Modmuss50 and I don't fully understand the problem but adding this to the manifest fixes the issue. This is less a bug in Arch loom and more of a feature request for better cross build tools compatability.

Example of what needs to be added to the manifest.

jar {
    manifest {
        attributes 'Fabric-Loom-Remap': true
    }
}
Juuxel commented 1 year ago

I think this belongs in Arch Plugin, Loom doesn't have any concept of "common" projects.

shedaniel commented 1 year ago

I can make Architectury Plugin add the attribute or just tell everyone to add the attribute themselves (plus do it in architectury api and etc)

MichaelHillcox commented 1 year ago

Ideally an on by default option would be best as, from my knowledge, it won't affect any other toolchain but does provide good support for using normal loom to back a multi-project workspace.

If it was added to the templates, it would likely be enough, no sure really.

Juuxel commented 1 year ago

IMO it fits the plugin better than the templates - the template buildscripts are already pretty long.