-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
123 lines (100 loc) · 2.97 KB
/
build.gradle
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
plugins {
id("fabric-loom") version "1.6-SNAPSHOT"
id("com.matthewprenger.cursegradle") version "1.4.0"
id("com.modrinth.minotaur") version "2.8.7"
}
group = "me.ramidzkh"
version = System.getenv("FABRISHOT_VERSION") ?: "0.0.0"
repositories {
maven {
name = "TerraformersMC"
url = uri("https://maven.terraformersmc.com/releases/")
content {
includeGroup("com.terraformersmc")
}
}
maven {
name = "shedaniel"
url = uri("https://maven.shedaniel.me/")
content {
includeGroup("me.shedaniel.cloth")
}
}
}
dependencies {
minecraft("net.minecraft:minecraft:1.21")
mappings("net.fabricmc:yarn:1.21+build.2")
modImplementation("net.fabricmc:fabric-loader:0.15.11")
modImplementation("net.fabricmc.fabric-api:fabric-api:0.100.1+1.21")
modImplementation("com.terraformersmc:modmenu:11.0.0-rc.4")
modImplementation("me.shedaniel.cloth:cloth-config-fabric:15.0.127")
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
processResources {
inputs.property("version", project.version)
from("LICENSE")
filesMatching("fabric.mod.json") {
expand("version": project.version)
}
}
////////////////
// CurseForge
System.getenv("CURSEFORGE")?.with { String key ->
curseforge {
apiKey = key
project {
id = "404870"
changelogType = "markdown"
changelog = "View changelog at [the release page](https://github.com/ramidzkh/fabrishot/releases/tag/${version})"
if (version.contains("alpha")) {
releaseType = "alpha"
} else if (version.contains("beta")) {
releaseType = "beta"
} else {
releaseType = "release"
}
addGameVersion("1.21")
addGameVersion("Fabric")
mainArtifact(remapJar) {
displayName = "${project.version}"
relations {
requiredDependency("fabric-api")
optionalDependency("modmenu")
optionalDependency("cloth-config")
}
}
}
}
}
////////////////
// Modrinth
modrinth {
token.set(System.getenv("MODRINTH"))
projectId.set("fabrishot")
changelog.set("View changelog at [the release page](https://github.com/ramidzkh/fabrishot/releases/tag/${version})")
versionNumber.set(project.version)
if (version.contains("alpha")) {
versionType.set("alpha")
} else if (version.contains("beta")) {
versionType.set("beta")
} else {
versionType.set("release")
}
uploadFile.set(remapJar)
gameVersions.addAll(["1.21"])
dependencies {
required.project("fabric-api")
optional.project("modmenu")
optional.project("cloth-config")
}
}
tasks.modrinth.onlyIf {
System.getenv("MODRINTH")
}