modrinth/docs

Modrinth maven recommends using an `exclusiveContent` repository; this currently is not supported by forgegradle

lukebemish opened this issue · 3 comments

Describe the bug

The page on the modrinth maven (https://docs.modrinth.com/docs/tutorials/maven/) currently recommends using gradle's exclusiveContent filter for adding the repository; it should be noted on that page that this does not work with forgegradle (MinecraftForge/ForgeGradle#925).

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

To add more information: this is apparently possible with forgegradle but requires a bit of other stuff to be added to the block

What other stuff needs to be added?

According to someone on the linked issue, you need to add fg.repository to the exclusive repositories block. So:

repositories {
    exclusiveContent {
        forRepository {
            maven {
                name = "Modrinth"
                url = "https://api.modrinth.com/maven"
            }
        }
        forRepositories(fg.repository) // this is the new bit
        filter {
            includeGroup "maven.modrinth"
        }
    }
}

I haven't actually tested this though