-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
136 lines (105 loc) · 3.85 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
124
125
126
127
128
129
130
131
132
133
134
135
136
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
}
architectury {
minecraft = rootProject.minecraft_version
}
subprojects {
apply plugin: "dev.architectury.loom"
loom {
silentMojangMappingsLicense()
}
dependencies {
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
mappings loom.officialMojangMappings()
}
}
allprojects {
apply plugin: "java"
apply plugin: "architectury-plugin"
apply plugin: "maven-publish"
archivesBaseName = rootProject.archives_base_name
version = rootProject.mod_version
group = rootProject.maven_group
repositories {
maven { url "https://maven.neoforged.net/releases/" }
maven { url "https://maven.isxander.dev/releases" }
maven { url "https://maven.quiltmc.org/repository/release/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.release.set(21)
}
java {
withSourcesJar()
}
}
ext.getChangeLog = { ->
return ""
}
publishMods {
changelog = project.getChangeLog()
type = STABLE
def optionsCurseforge = curseforgeOptions {
accessToken = providers.environmentVariable("CURSEFORGE_API_KEY")
projectId = "489631"
projectSlug = "fuel-info"
minecraftVersions.add("${project.minecraft_version}")
}
def optionsModrinth = modrinthOptions {
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
projectId = "J1ueTDcI"
minecraftVersions.add("${project.minecraft_version}")
}
curseforge("curseforgeForge") {
from optionsCurseforge
modLoaders.add("neoforge")
file = project(":forge").tasks.named("remapJar").get().archiveFile
displayName = "${rootProject.mod_version} (NeoForge)"
version = "${rootProject.mod_version}-neoforge"
requires("architectury-api")
embeds("yacl")
announcementTitle = "Download from CurseForge (NeoForge)"
}
curseforge("curseforgeFabric") {
from optionsCurseforge
modLoaders.add("fabric")
file = project(":fabric").tasks.named("remapJar").get().archiveFile
displayName = "${rootProject.mod_version} (Fabric)"
version = "${rootProject.mod_version}-fabric"
requires("fabric-api")
requires("architectury-api")
embeds("yacl")
announcementTitle = "Download from CurseForge (Fabric)"
}
modrinth("modrinthForge") {
from optionsModrinth
modLoaders.add("neoforge")
file = project(":forge").tasks.named("remapJar").get().archiveFile
displayName = "${rootProject.mod_version} (NeoForge)"
version = "${rootProject.mod_version}-neoforge"
requires("architectury-api")
embeds("yacl")
announcementTitle = "Download from Modrinth (NeoForge)"
}
modrinth("modrinthFabric") {
from optionsModrinth
modLoaders.add("fabric")
file = project(":fabric").tasks.named("remapJar").get().archiveFile
displayName = "${rootProject.mod_version} (Fabric)"
version = "${rootProject.mod_version}-fabric"
requires("fabric-api")
requires("architectury-api")
embeds("yacl")
announcementTitle = "Download from Modrinth (Fabric)"
}
discord {
webhookUrl = providers.environmentVariable("CAFETERIA_MOD_RELEASE_WEBHOOK")
username = "${rootProject.archives_base_name}"
avatarUrl = "${rootProject.discordAnnouncementIconURL}"
content = changelog.map { "# " + (project.archives_base_name as String) + " " + (project.mod_version as String) + " has been released \n" + it}
}
}