Wyn-Price / CurseMaven

A more robust alternative to the CurseForge maven.
https://www.cursemaven.com/
21 stars 4 forks source link

Instructions for Gradle 6.2+ doesn't work with ForgeGradle #28

Open AterAnimAvis opened 9 months ago

AterAnimAvis commented 9 months ago

The instructions for Gradle 6.2+ suggests using an exclusiveContent block, this however won't work with ForgeGradle as it prevents the DeobfuscatingRepo from providing the deobfuscated artifacts (which have the same group as the original).

Wyn-Price commented 7 months ago

Sorry for the delayed reply. Is there anything I should change it to? Or just put a note that it won't work for ForgeGradle?

AterAnimAvis commented 7 months ago

Just a note that it won't work for ForgeGradle (3-6, FG2 and below iirc change the group) and NeoGradle 6. NeoGradle 7 will work just fine with it since we no longer do obf/deobf.

fg.deobf transforms the dependency GAV from {group}:{artifact}:{version} to {group}:{artifact}:{version}_mapped_{mappings-channel}_{mappings-version}, the DeobfuscatingRepo then provides those dependencies dynamically, remapping the originals. The exclusiveContent block filter on the group that is currently recommended prevents that from happening, as anything under that group only checks the CurseMaven repo, preventing the DeobfuscatingRepo from providing those mapped dependencies.

Matyrobbrt commented 7 months ago

Alternatively, in FG/NG6 you can keep using the exclusiveContent, assuming you also declare a forRepositories fg.deobfuscatingRepo:

repositories {
    exclusiveContent {
        forRepository {
            maven {
                url "https://cursemaven.com"
            }
        }
        forRepositories fg.deobfuscatingRepo
        filter {
            includeGroup "curse.maven"
        }
    }
}