Skip to content

Installation (for developers)

Pyrofab edited this page Sep 22, 2023 · 10 revisions

Note: This wiki has been deprecated in favor of a new one on our website. This page will not be updated.

The current version of this page is located here: https://ladysnake.org/wiki/cardinal-components-api/dev-install

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:

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

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

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 official maven, that contains versions up to 2.3.0:

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

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.