-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
100 lines (80 loc) · 2.75 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
plugins {
id "fabric-loom" version "1.8-SNAPSHOT"
id ("com.modrinth.minotaur") version "2.+"
id ("com.matthewprenger.cursegradle") version "1.4.0"
}
repositories {}
archivesBaseName = "${project.mod_id}-${project.minecraft_version}"
version = "${project.mod_version}"
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
dependencies {
// Fabric
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Hocon config
include implementation("org.spongepowered:configurate-core:${hocon_version}")
include implementation("org.spongepowered:configurate-hocon:${hocon_version}")
include implementation("org.apache.commons:commons-text:${commons_text_version}")
include implementation("com.typesafe:config:${typesafe_config_version}")
include implementation("io.leangen.geantyref:geantyref:${geantyref_version}")
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release.set(21)
}
java {
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
jar {
from "LICENCE"
}
processResources {
inputs.property "id", project.mod_id
inputs.property "name", project.mod_name
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand(["id": project.mod_id, "name": project.mod_name, "version": project.version])
}
}
modrinth {
token.set(System.getenv("MODRINTH_TOKEN"))
projectId.set("1S4LxcvL")
versionNumber.set("${project.version}")
versionName = "[1.21.2 - 1.21.4] ${project.version}"
versionType = "release"
changelog.set("Release notes:\nhttps://github.com/NikitaCartes/Glowing-Torchflower/releases/tag/${project.version}")
uploadFile = remapJar
gameVersions.addAll("1.21.2", "1.21.3")
loaders = ["fabric", "quilt"]
}
curseforge {
apiKey = System.getenv("CURSEFORGE_TOKEN") ?: ""
project {
id = "827288"
changelogType = "markdown"
changelog = "Release notes:\nhttps://github.com/NikitaCartes/Glowing-Torchflower/releases/tag/${project.version}"
releaseType = "release"
addGameVersion("Fabric")
addGameVersion("Quilt")
addGameVersion("Java 21")
addGameVersion("1.21.2")
addGameVersion("1.21.3")
mainArtifact(remapJar) {
displayName = "[1.21.2 - 1.21.4] ${project.version}"
}
}
options {
javaVersionAutoDetect = false
javaIntegration = false
forgeGradleIntegration = false
}
}
tasks.register("publish") {
dependsOn("modrinth")
dependsOn("curseforge")
}