-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
193 lines (169 loc) · 6.23 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
plugins {
id 'dev.architectury.loom' version '1.7-SNAPSHOT' apply false
id 'architectury-plugin' version '3.4-SNAPSHOT'
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id "me.modmuss50.mod-publish-plugin" version "0.7.4" apply false
}
tasks.register("multiplatformDatagen") {
Project common = project(":common")
Project fabric = project(":fabric")
Project neoforge = project(":neoforge")
dependsOn project(":fabric").tasks.named("runDatagen")
// Copy the fabric only recipes to the generated resources
File fabricDir = fabric.file("src/main/generated/data/cornexpansion/recipes/")
File neoforgeDir = neoforge.file("src/main/generated/data/cornexpansion/recipes/")
delete(fabricDir)
delete(neoforgeDir)
copy {
from common.file("src/main/generated/data/cornexpansion/recipes/.fabric")
include "**/*.json"
into fabric.file("src/main/generated/data/cornexpansion/recipes/")
}
// Copy the forge only recipes to the generated resources
copy {
from common.file("src/main/generated/data/cornexpansion/recipes/.neoforge")
include "**/*.json"
into neoforge.file("src/main/generated/data/cornexpansion/recipes/")
}
}
architectury {
minecraft = project.minecraft_version
}
allprojects {
group = rootProject.maven_group
version = rootProject.mod_version
}
subprojects {
apply plugin: 'dev.architectury.loom'
apply plugin: 'architectury-plugin'
apply plugin: 'maven-publish'
base {
archivesName = "$rootProject.archives_name-$project.name"
}
loom {
silentMojangMappingsLicense()
}
repositories {
maven {
name "terraform wood api, trinkets"
url "https://maven.terraformersmc.com"
}
maven {
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
maven {
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
}
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
maven { name = "Curseforge Maven"; description = "Forge Config API Port"; url = "https://cursemaven.com" }
maven { name = "Tterrag Maven"; description = "Create, Forge Registrate & Forge Flywheel";
url = "https://maven.tterrag.com" }
maven { name = "JamiesWhiteShirt Maven"; description = "Reach Entity Attributes";
url = "https://maven.jamieswhiteshirt.com/libs-release" }
maven { name = "Devos Maven";
description = "Create Fabric, Porting Lib, Forge Tags, Milk Lib & Fabric Registrate";
url = "https://mvn.devos.one/snapshots/" }
maven { name = "Jitpack maven"; description = "Mixin Extras & Fabric ASM"; url = "https://jitpack.io/" }
}
dependencies {
minecraft "net.minecraft:minecraft:$rootProject.minecraft_version"
mappings loom.officialMojangMappings()
}
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 21
}
}
apply plugin: "me.modmuss50.mod-publish-plugin"
publishMods {
changelog = file("CHANGELOG.md").text.replace("@VERSION@", rootProject.mod_version)
type = STABLE
def optionsCurseforge = curseforgeOptions {
accessToken = providers.environmentVariable("CURSEFORGE_API_KEY")
minecraftVersions.add("1.21.1")
projectId = "1038740"
requires {
slug = "architectury-api"
}
requires {
slug = "lets-do-farm-charm"
}
}
def optionsModrinth = modrinthOptions {
accessToken = providers.environmentVariable("MODRINTH_API_KEY")
projectId = "20p2kirx"
minecraftVersions.add("1.21.1")
requires {
slug = "architectury-api"
}
requires {
slug = "lets-do-farm-charm"
}
}
curseforge("curseforgeFabric") {
from optionsCurseforge
modLoaders.add("fabric")
modLoaders.add("quilt")
file = project(":fabric").tasks.named("remapJar").get().archiveFile
displayName = "[Let's Do Addon] CornExpansion ${rootProject.mod_version} Fabric"
version = "${rootProject.mod_version}-fabric"
/*optional {
slug = "create-fabric"
}*/
}
curseforge("curseforgeNeoforge") {
from optionsCurseforge
modLoaders.add("neoforge")
file = project(":neoforge").tasks.named("remapJar").get().archiveFile
displayName = "[Let's Do Addon] CornExpansion ${rootProject.mod_version} Neoforge"
version = "${rootProject.mod_version}-neoforge"
/*optional {
slug = "create"
}*/
}
modrinth("modrinthFabric") {
from optionsModrinth
modLoaders.add("fabric")
modLoaders.add("quilt")
file = project(":fabric").tasks.named("remapJar").get().archiveFile
displayName = "[Let's Do Addon] CornExpansion ${rootProject.mod_version} Fabric"
version = "${rootProject.mod_version}-fabric"
/*optional {
slug = "create-fabric"
}*/
additionalFiles.from(project(":fabric").tasks.named("remapSourcesJar").get().archiveFile)
}
modrinth("modrinthNeoorge") {
from optionsModrinth
modLoaders.add("neoforge")
file = project(":neoforge").tasks.named("remapJar").get().archiveFile
displayName = "[Let's Do Addon] CornExpansion ${rootProject.mod_version} Neoorge"
version = "${rootProject.mod_version}-neoforge"
/*optional {
slug = "create"
}*/
additionalFiles.from(project(":neoforge").tasks.named("remapSourcesJar").get().archiveFile)
}
}