-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
73 lines (59 loc) · 2.16 KB
/
build.gradle.kts
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
plugins {
id("dev.architectury.loom")
id("architectury-plugin")
}
val minecraft = stonecutter.current.version
val apiCommon: Project = requireNotNull(stonecutter.node.sibling("api")) {
"No common api project for $project"
}
version = "${mod.version}+$minecraft"
group = "${mod.group}.common"
base {
archivesName.set("${mod.id}-common")
}
architectury.common(stonecutter.tree.branches.mapNotNull {
if (stonecutter.current.project !in it) null
else if (stonecutter.current.project.startsWith("api")) null
else it.prop("loom.platform")
})
val commonBundle: Configuration by configurations.creating {
isCanBeConsumed = false
isCanBeResolved = true
}
val shadowBundle: Configuration by configurations.creating {
isCanBeConsumed = false
isCanBeResolved = true
}
configurations {
compileClasspath.get().extendsFrom(commonBundle)
runtimeClasspath.get().extendsFrom(commonBundle)
}
dependencies {
minecraft("com.mojang:minecraft:$minecraft")
mappings("net.fabricmc:yarn:$minecraft+build.${mod.dep("yarn_build")}:v2")
modImplementation("net.fabricmc:fabric-loader:${mod.dep("fabric_loader")}")
modImplementation(name="libbamboo", group="mod.crend", version="${mod.dep("libbamboo")}-fabric")
modCompileOnly(name="autohud", group="mod.crend", version="${mod.dep("autohud")}-fabric")
modImplementation("dev.isxander:yet-another-config-lib:${mod.dep("yacl")}-fabric")
commonBundle(project(apiCommon.path, "namedElements")) { isTransitive = false }
shadowBundle(project(apiCommon.path, "transformProductionFabric")) { isTransitive = false }
}
loom {
accessWidenerPath = rootProject.file("src/main/resources/dynamiccrosshair.accesswidener")
decompilers {
get("vineflower").apply { // Adds names to lambdas - useful for mixins
options.put("mark-corresponding-synthetics", "1")
}
}
}
java {
withSourcesJar()
val java = if (stonecutter.eval(minecraft, ">=1.20.5"))
JavaVersion.VERSION_21 else JavaVersion.VERSION_17
targetCompatibility = java
sourceCompatibility = java
}
tasks.build {
group = "versioned"
description = "Must run through 'chiseledBuild'"
}