Installation (for developers)  

There are several ways of getting Cardinal Components into your workspace, most involving just a few lines in your Gradle buildscript (build.gradle file). To minimize user inconvenience, it is also recommended to use the Jar-in-Jar mechanism provided by the Fabric toolchain to include Cardinal Components in your own builds, eliminating the need for manual install.

Unless specified otherwise, the following block must be added to your build.gradle after the relevant repositories block:

gradle.properties:

cca_version = <VERSION>

build.gradle:

dependencies {
    // Replace modImplementation with modApi if you expose components in your own API
    modImplementation "dev.onyxstudios.cardinal-components-api:<MODULE>:${project.cca_version}"
    // Includes Cardinal Components API as a Jar-in-Jar dependency (optional but recommended)
    include "dev.onyxstudios.cardinal-components-api:<MODULE>:${project.cca_version}"
}

gradle.properties:

cca_version = <VERSION>

build.gradle.kts:

dependencies {
    val ccaVersion = property("cca_version") as String
    // Replace modImplementation with modApi if you expose components in your own API
    modImplementation("dev.onyxstudios.cardinal-components-api:<MODULE>:$ccaVersion")
    // Includes Cardinal Components API as a Jar-in-Jar dependency (optional but recommended)
    include("dev.onyxstudios.cardinal-components-api:<MODULE>:$ccaVersion")
}

libs.versions.toml:

[versions]
cca = '<VERSION>'

[libraries]
cca-base = { module = "dev.onyxstudios.cardinal-components-api:cardinal-components-base", version.ref = "cca" }
cca-<MODULE> = { module = "dev.onyxstudios.cardinal-components-api:<MODULE>", version.ref = "cca" }

[bundles]
cca = [ "cca-base", "cca-<MODULE>" ]

build.gradle or build.gradle.kts:

dependencies {
    // Replace modImplementation with modApi if you expose components in your own API
    modImplementation(libs.bundles.cca)
    // Includes Cardinal Components API as a Jar-in-Jar dependency (optional but recommended)
    include(libs.bundles.cca)
}

Ladysnake Reposilite

The current recommended way of getting the latest releases of Cardinal Components API is to use the Ladysnake maven repository :

repositories {
    maven {
        name = "Ladysnake Mods"
        url = 'https://maven.ladysnake.org/releases'
    }
}

This maven repository contains binaries for every version since 3.0.0-21w06a.

Jitpack

Jitpack is a simple alternative to dedicated mavens, building GitHub repositories on demand. It can be used to get any version of Cardinal Components, including snapshots of development branches. Note however that it tends to slow down your builds, and that it often times out the first time it builds an artefact (just restart the build when that happens). Further use information can be found on the website itself.

repositories {
    maven {
        name = "Jitpack"
        url = "https://jitpack.io"
    }
}

Curseforge

CurseForge is mostly a platform for distributing mods to users. Although not recommended, it can be used as a maven repository by following the instructions on the website. A slightly better way to do it is using the CurseMaven Gradle plugin.

You are however encouraged to declare Cardinal Components API as an embedded library of your project, for documentation purposes and to make it simpler for users to report issues to the right repository.

Modrinth

Modrinth is also a platform for distributing mods to users, which can also be used as a maven repository by following the instructions on their website.

Same as with Curseforge, you are encouraged to declare Cardinal Components API as an “Embedded” dependency.

Historical mavens

These mavens may be referenced in older buildscripts, but cannot be used anymore.

Ladysnake artifactory

repositories {
    maven {
        name = "Ladysnake Mods"
        url = 'https://ladysnake.jfrog.io/artifactory/mods'
    }
}

This maven repository contained binaries for every version between 3.0.0-21w06a and 5.2.1. Due to JFrog Artifactory’s free tier shutting down, it is now unavailable.

Ladysnake bintray

repositories {
    maven {
        name = "Ladysnake Libs"
        url = 'https://dl.bintray.com/ladysnake/libs'
    }
}

This maven repository contained binaries for every version between 2.3.5 (MC 1.15) and 2.7.11 (MC 1.16). Due to bintray shutting down, it is now unavailable.

OnyxStudios Maven

The former official maven, that contains versions up to 2.3.0:

repositories {
    maven {
        name = "OnyxStudios"
        url = "https://maven.abusedmaster.xyz"
    }
}

CCA Dev Wiki