generated from stonecutter-versioning/stonecutter-template-architectury
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
69 lines (57 loc) · 1.82 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
//common
plugins {
id("dev.architectury.loom")
id("architectury-plugin")
id("me.modmuss50.mod-publish-plugin") version "0.7.4"
}
val minecraft = stonecutter.current.version
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 it.prop("loom.platform")
})
dependencies {
minecraft("com.mojang:minecraft:$minecraft")
mappings(loom.officialMojangMappings())
modImplementation("net.fabricmc:fabric-loader:${mod.dep("fabric_loader")}")
"io.github.llamalad7:mixinextras-common:${mod.dep("mixin_extras")}".let {
annotationProcessor(it)
implementation(it)
}
}
loom {
accessWidenerPath = rootProject.file("src/main/resources/burnable_cobwebs.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'"
}
publishMods {
changelog = providers.fileContents(layout.projectDirectory.file("../../CHANGELOG.md")).asText.get()
type = STABLE
displayName = "${mod.version} for $minecraft"
github {
accessToken = providers.environmentVariable("GITHUB_TOKEN")
repository = "Raik176/burnable-cobwebs"
commitish = "master"
tagName = "v${mod.version}"
allowEmptyFiles = true
}
dryRun = providers.environmentVariable("PUBLISH_DRY_RUN").isPresent
}