DSL Reference
Settings plugin
Plugin ID: dev.prism.settings
Applied in settings.gradle.kts. Registers subprojects and configures repository access.
prism {
sharedCommon() // optional: root-level common/ project shared across all versions
version(minecraftVersion: String) {
// Multi-loader: common() + multiple loaders
common() // required for multi-loader
fabric()
forge()
neoforge()
legacyForge() // 1.7.10-1.12.2 via RetroFuturaGradle
// Single-loader: just one loader, no common()
// neoforge() // single-loader mode, no common/loader split
}
}
Project plugin
Plugin ID: dev.prism
Applied in the root build.gradle.kts. Configures all subprojects.
prism
prism {
metadata { ... }
version(minecraftVersion: String) { ... }
publishing { ... }
curseMaven() // add CurseMaven repository
modrinthMaven() // add Modrinth Maven repository
maven(name: String, url: String) // add custom Maven repository
}
metadata
metadata {
modId: String // required
name: String
description: String
license: String
version: String // defaults to project.version
group: String // defaults to project.group
author(name: String) // repeatable
credit(name: String) // repeatable
}
version
version("1.21.1") {
javaVersion: Int? // auto-detected from MC version
neoFormVersion: String? // auto-resolved from Maven
parchmentMinecraftVersion: String? // requires parchmentMappingsVersion
parchmentMappingsVersion: String?
kotlin() // enable Kotlin (default 2.1.20)
kotlin(version: String) // enable Kotlin with specific version
minecraftVersions("1.21", "1.21.1") // version range for publishing
common { // shared dependencies
implementation(dep: String)
compileOnly(dep: String)
runtimeOnly(dep: String)
annotationProcessor(dep: String)
}
fabric { ... }
forge { ... }
neoforge { ... }
}
fabric
fabric {
loaderVersion: String // required
apiVersion: String? // set via fabricApi()
fabricApi(version: String) // shorthand for apiVersion
yarn(version: String) // use Yarn mappings instead of Mojang
datagen() // enable Fabric API datagen run
dependencies {
implementation(dep: String)
modImplementation(dep: String) // remapped by Loom
compileOnly(dep: String)
modCompileOnly(dep: String) // remapped by Loom
runtimeOnly(dep: String)
modRuntimeOnly(dep: String) // remapped by Loom
jarJar(dep: String) // maps to Loom include
annotationProcessor(dep: String)
}
runs {
client("myClient") { // custom client run
username = "Dev" // optional
}
server("myServer") { } // custom server run
run("custom") { // fully custom run
client() // or server()
username = "TestPlayer"
jvmArg("-Xmx4G")
programArg("--demo")
systemProperty("key", "value")
runDir = "runs/custom" // optional, auto-generated if not set
}
}
}
forge
forge {
loaderVersion: String // required
loaderVersionRange: String? // for template expansion
dependencies {
implementation(dep: String)
compileOnly(dep: String)
runtimeOnly(dep: String)
jarJar(dep: String) // maps to MDG Legacy jarJar
}
runs {
client("second") { username = "Player2" }
server("testServer") { }
}
}
neoforge
neoforge {
loaderVersion: String // required
loaderVersionRange: String? // for template expansion
dependencies {
implementation(dep: String)
compileOnly(dep: String)
runtimeOnly(dep: String)
jarJar(dep: String) // maps to MDG jarJar
}
runs {
client("second") { username = "Player2" }
server("testServer") { }
}
}
legacyForge
legacyForge {
mcVersion: String // e.g. "1.12.2", "1.7.10"
forgeVersion: String // e.g. "14.23.5.2847"
mappingChannel: String // default "stable"
mappingVersion: String // default "39"
username: String // default "Developer"
useModernJavaSyntax: Boolean // default false (Java 8)
accessTransformer(path: String) // add AT file
mixin() // enable MixinTweaker
dependencies { ... }
runs { ... }
publishingDependencies { ... }
}
publishing
publishing {
changelog: String?
changelogFile: String? // path relative to root project
type: ReleaseType // STABLE, BETA, ALPHA
displayName: String? // defaults to JAR filename
curseforge {
accessToken: Provider<String>
projectId: String
}
modrinth {
accessToken: Provider<String>
projectId: String
}
dependencies { // publishing deps (global level)
requires(slug: String)
optional(slug: String)
incompatible(slug: String)
embeds(slug: String)
}
// Maven publishing
publishCommonJar: Boolean // also publish common JARs (for library mods)
mavenLocal() // publish to ~/.m2
githubPackages(owner, repo) // GitHub Packages (auto-credentials)
maven { // custom Maven repo
name: String
url: String
credentials(user, pass) // inline credentials
credentialsFromEnv(userEnv, passEnv) // from environment variables
}
}
Publishing uses minecraftVersions() from the version block if set, otherwise the exact Minecraft version.