CurseMaven icon indicating copy to clipboard operation
CurseMaven copied to clipboard

Instructions for Gradle 6.2+ doesn't work with ForgeGradle

Open AterAnimAvis opened this issue 11 months ago • 3 comments

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).

AterAnimAvis avatar Mar 04 '24 16:03 AterAnimAvis

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?

Wyn-Price avatar Apr 09 '24 14:04 Wyn-Price

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.

AterAnimAvis avatar Apr 09 '24 15:04 AterAnimAvis

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"
        }
    }
}

Matyrobbrt avatar Apr 20 '24 18:04 Matyrobbrt