Skip to content

Latest commit

 

History

History
107 lines (89 loc) · 2.96 KB

File metadata and controls

107 lines (89 loc) · 2.96 KB

Iridium Sticker
[![](https://teamvoided.org/iridium-sticker.png)](https://github.com/TeamVoided/iridium)
Iridium Usage

settings.gradle.kts

pluginManagement {
    repositories {
        //other repos
        maven("https://maven.teamvoided.org/releases")
    }
}

root build.gradle.kts

Configuration of Iridium is no longer allowed in the gradle build script do to its buggy nature

plugins {
    id("org.teamvoided.iridium") version "3.0.0" 
    //default plugin will automatically use root project for jarInJar and add the mod-build-script plugin
    //maven publishing id("iridium.project.publish-script")
}

module build.gradle.kts

plugins {
    id("iridium.mod.build-script")
    //[upload mod to modrinth] id("iridium.mod.upload-script")
    //[maven publishing] id("iridium.project.publish-script")
}

jar-in-jar script no longer required

to test all client/server with all defined modules use the "runTestClient/Server" tasks respectively

The Iridium Config Spec

Iridium will try to load its config from the following files in that order

All files located in gradle/iridium directory

  • iridium.toml
  • iridium.json5
  • iridium.yml
  • iridium.json
i didn't tell you this but if Iridium fails to find a config file it will autogenerate a toml one

The Actual Spec

projectTitle: String
modId: String
githubRepo: String
discordServerInviteId: String
authors: List<String>
majorMinecraftVersion: String
minecraftVersion: String
mappings: Mappings object (details below)
fabricLoaderVersion: String
fabricApiVersion: String
fabricLangKotlinVersion: String
license: String
modules: List<String>

The Mappings Object Spec

type: MappingsType (any of "MOJANG", "YARN", "PARCHMENT", "QUILT", "MOJPARCH", "MOJYARN"
version: String? (Irrelevant for MappingsType.MOJANG, leave either null or blank)

Mod Build Script

The Mod Build Script plugin will auto generate a mod json for you

As of iridium version 1.2.0 a closure/configuration action is used to define its properties

To set the description/version you still use the default project.description/version properties

Here's an example

plugins {
    kotlin("jvm") version "1.9.0"
    kotlin("plugin.serialization") version "1.9.0"
    id("iridium.mod.build-script")
}

modSettings {
    modId("example-mod")
    modName("Example Mod")
    // other properties
    // you can later reference these values with modSettings.value()
    // example modSettings.modId()
}

group = project.properties["maven_group"] as String
version = project.properties["mod_version"] as String
description = "Example Mod Description"