forked from MayaqqDev/Estrogen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
220 lines (197 loc) · 7.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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.5-SNAPSHOT" apply false
id "me.modmuss50.mod-publish-plugin" version "0.4.5"
}
// A task to build both, Forge and Fabric
tasks.register("buildBoth") {
dependsOn project(":fabric").tasks.named("buildBothFabric")
dependsOn project(":forge").tasks.named("buildBothForge")
}
tasks.register("multiplatformDatagen") {
Project common = project(":common")
Project fabric = project(":fabric")
Project forge = project(":forge")
dependsOn project(":fabric").tasks.named("runDatagen")
// Copy the fabric only recipes to the generated resources
File fabricDir = fabric.file("src/main/generated/data/estrogen/recipes/")
File forgeDir = forge.file("src/main/generated/data/estrogen/recipes/")
delete(fabricDir)
delete(forgeDir)
copy {
from common.file("src/main/generated/data/estrogen/recipes/.fabric")
include "**/*.json"
into fabric.file("src/main/generated/data/estrogen/recipes/")
}
// Copy the forge only recipes to the generated resources
copy {
from common.file("src/main/generated/data/estrogen/recipes/.forge")
include "**/*.json"
into forge.file("src/main/generated/data/estrogen/recipes/")
}
}
architectury {
minecraft = rootProject.minecraft_version
}
subprojects {
apply plugin: "dev.architectury.loom"
loom {
silentMojangMappingsLicense()
}
dependencies {
minecraft("com.mojang:minecraft:${rootProject.minecraft_version}")
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchmentmc_version}@zip")
}
modApi("com.teamresourceful.resourcefullib:resourcefullib-${project.name}-${rootProject.minecraft_version}:${rootProject.resourcefullib_version}")
modApi("earth.terrarium.botarium:botarium-${project.name}-${rootProject.minecraft_version}:${rootProject.botarium_version}")
modImplementation include("maven.modrinth:jukeboxfix:${rootProject.jukeboxfix_version}-${rootProject.minecraft_version}")
// JEI
modCompileOnly("mezz.jei:jei-${rootProject.minecraft_version}-common-api:${rootProject.jei_version}")
}
}
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 for all the build.gradle files, makes it a lot easier to manage
// Format is: name: name of the maven, description: mods that use this maven, url: the url of the maven
repositories {
maven { name = "Terraformers Maven"; description = "EMI & Mod Menu"; url = "https://maven.terraformersmc.com/" }
maven { name = "Shedaniel Maven"; description = "REI"; url = "https://maven.shedaniel.me" }
maven { name = "Blamejared Maven"; description = "JEI"; url = "https://maven.blamejared.com/" }
maven { name = "Tterrag Maven"; description = "Create, Forge Registrate & Forge Flywheel"; url = "https://maven.tterrag.com" }
maven { name = "TheIllusivec4 Maven"; description = "Curios"; url = "https://maven.theillusivec4.top/" }
maven { name = "Devos Maven"; description = "Create Fabric, Porting Lib, Forge Tags, Milk Lib & Fabric Registrate"; url = "https://mvn.devos.one/snapshots/" }
maven { name = "Curseforge Maven"; description = "Forge Config API Port"; url = "https://cursemaven.com" }
maven { name = "Cafeteria Maven"; description = "Fake Player API"; url = "https://maven.cafeteria.dev/releases" }
maven { name = "JamiesWhiteShirt Maven"; description = "Reach Entity Attributes"; url = "https://maven.jamieswhiteshirt.com/libs-release" }
maven { name = "Ladysnake Maven"; description = "Trinkets"; url = "https://maven.ladysnake.org/releases" }
maven { name = "Unascribed Maven"; description = "Ears"; url = "https://repo.unascribed.com" }
maven { name = "Modrinth Maven"; description = "Jukeboxfix"; url = "https://api.modrinth.com/maven" }
maven { name = "Resourceful Maven"; description = "Baubly, Botarium & ResourcefulLib"; url = "https://maven.teamresourceful.com/repository/maven-public/" }
maven { name = "Figura Maven"; description = "Figura"; url = "https://maven.figuramc.org/releases" }
maven { name = "Jitpack maven"; description = "Mixin Extras & Fabric ASM"; url = "https://jitpack.io/" } //NOTE: LEAVE THIS AS LAST
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
options.release.set(17)
}
java {
withSourcesJar()
}
}
publishMods {
changelog = file("CHANGELOG.md").text.replace("@VERSION@", rootProject.mod_version)
type = STABLE
def optionsCurseforge = curseforgeOptions {
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
minecraftVersions.add("1.20.1")
projectId = "850410"
requires {
slug = "botarium"
}
requires {
slug = "resourceful-lib"
}
optional {
slug = "ears"
}
embeds {
slug = "jukeboxfix"
}
}
def optionsModrinth = modrinthOptions {
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
projectId = "HhIJW8n1"
minecraftVersions.add("1.20.1")
requires {
slug = "botarium"
}
requires {
slug = "resourceful-lib"
}
optional {
slug = "ears"
}
embeds {
slug = "jukeboxfix"
}
}
curseforge("curseforgeFabric") {
from optionsCurseforge
modLoaders.add("fabric")
modLoaders.add("quilt")
file = project(":fabric").tasks.named("remapJar").get().archiveFile
displayName = "Create: Estrogen ${rootProject.mod_version} Fabric"
version = "${rootProject.mod_version}-fabric"
requires {
slug = "create-fabric"
}
requires {
slug = "trinkets"
}
optional {
slug = "roughly-enough-items"
}
optional {
slug = "emi"
}
}
curseforge("curseforgeForge") {
from optionsCurseforge
modLoaders.add("forge")
file = project(":forge").tasks.named("remapJar").get().archiveFile
displayName = "Create: Estrogen ${rootProject.mod_version} Forge"
version = "${rootProject.mod_version}-forge"
requires {
slug = "create"
}
requires {
slug = "curios"
}
optional {
slug = "jei"
}
}
modrinth("modrinthFabric") {
from optionsModrinth
modLoaders.add("fabric")
modLoaders.add("quilt")
file = project(":fabric").tasks.named("remapJar").get().archiveFile
displayName = "Create: Estrogen ${rootProject.mod_version} Fabric"
version = "${rootProject.mod_version}-fabric"
requires {
slug = "create-fabric"
}
requires {
slug = "trinkets"
}
optional {
slug = "rei"
}
optional {
slug = "emi"
}
}
modrinth("modrinthForge") {
from optionsModrinth
modLoaders.add("forge")
file = project(":forge").tasks.named("remapJar").get().archiveFile
displayName = "Create: Estrogen ${rootProject.mod_version} Forge"
version = "${rootProject.mod_version}-forge"
requires {
slug = "create"
}
requires {
slug = "curios"
}
optional {
slug = "jei"
}
}
}