modrinth / docs

[Archived] Former repo of the Modrinth documentation
https://docs.modrinth.com
Creative Commons Zero v1.0 Universal
32 stars 46 forks source link

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

Closed lukebemish closed 1 year ago

lukebemish commented 1 year ago

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

lukebemish commented 1 year ago

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

triphora commented 1 year ago

What other stuff needs to be added?

lukebemish commented 1 year ago

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