Skip to content

Repository management

srnyx edited this page Jun 20, 2023 · 1 revision

There are a number of built-in repositories that you can use so you don't have to memorize URLs or Google them all the time. You can access them via Repository, each with a doc with its URL. Unfortunately, due to how it works, mavenLocal() could not be integrated as a Repository.

Usage

repositories {
    // You can continue adding as many as you want
    mavenQuick(Repository.MAVEN_CENTRAL, Repository.SPIGOT)

    // An alias of mavenQuick(...), may conflict with the default maven(...) method
    maven(Repository.JITPACK, Repository.SONATYPE_SNAPSHOTS_OLD)

    // This will add ALL repositories in Repository excluding ESSENTIALS_RELEASES and ESSENTIALS_SNAPSHOTS
    mavenAll(Repository.ESSENTIALS_RELEASES, Repository.ESSENTIALS_SNAPSHOTS)
}

// An alias of repositories.mavenQuick(...) except it doesn't need to be in the repositories block
repository(Repository.PROTOCOL_LIB, Repository.CODE_MC)

// Similar to repository(...) except uses plain URLs instead of Repository
repository("https://repo.triumphteam.dev/releases", "https://nexus.scarsz.me/content/groups/public")

// An alias of repositories.mavenAll(...) except it doesn't need to be in the repositories block
repositoryAll(Repository.ENGINE_HUB, Repository.REDEMPT)