-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstonecutter.gradle.kts
More file actions
35 lines (28 loc) · 1.05 KB
/
Copy pathstonecutter.gradle.kts
File metadata and controls
35 lines (28 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
plugins {
id("dev.kikugie.stonecutter")
}
stonecutter active "26.3.x-fabric"
// See https://stonecutter.kikugie.dev/wiki/config/params
stonecutter parameters {
val (version, loader) = current.project.split('-', limit = 2)
// Makes version- and loader-specific properties apply from `stoncutter.properties.toml`
properties {
tags(version, loader)
}
// Adds constants to Stonecutter comments (i.e. for `//? if fabric {...`)
constants {
match(loader, "fabric", "neoforge")
}
swaps["mod_version"] = "\"${properties.get<String>("mod.version")}\";"
swaps["minecraft"] = "\"${node.metadata.version}\";"
constants["release"] = properties.get<String>("mod.id") != "template"
dependencies["fapi"] = properties.getOrNull<String>("deps.fabric_api") ?: "0"
replacements {
string(current.parsed >= "1.21.11") {
replace("ResourceLocation", "Identifier")
}
string(current.parsed >= "26.1") {
replace("classTweaker v2 named", "classTweaker v2 official")
}
}
}