generated from DragonsPlusMinecraft/CreateAddonTemplate
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle
271 lines (248 loc) · 10.9 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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
maven { url = 'https://repo.spongepowered.org/repository/maven-public' }
maven { url = 'https://maven.parchmentmc.org' }
}
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:${forgegradle_version}"
classpath "org.spongepowered:mixingradle:${mixingradle_version}"
classpath "org.parchmentmc:librarian:${librarian_version}"
}
}
plugins {
id "me.modmuss50.mod-publish-plugin" version "0.5.1"
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'
version = mod_version
group = 'plus.dragons.createcentralkitchen'
archivesBaseName = "create_central_kitchen-${artifact_minecraft_version}-for-create-${create_version}"
jarJar.enable()
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
mappings channel: 'parchment', version: "${parchment_version}-${minecraft_version}"
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default.
runs {
client {
workingDirectory project.file('run')
arg '-mixin.config=create_central_kitchen.mixins.json'
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'create_central_kitchen'
mods {
create_central_kitchen {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
arg '-mixin.config=create_central_kitchen.mixins.json'
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'create_central_kitchen'
mods {
create_central_kitchen {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
args '--mod', 'create_central_kitchen',
'--all', '--output', file('src/generated/resources/'),
'--existing', file('src/main/resources/'),
'--existing-mod', 'create',
'--existing-mod', 'farmersdelight'
mods {
create_central_kitchen {
source sourceSets.main
}
}
}
}
}
repositories {
mavenLocal()
maven {
name "Tterrag maven"
url "https://maven.tterrag.com/"
}
maven {
name "Blamejared Maven"
url "https://maven.blamejared.com"
}
maven {
name "Theillusivec4 Maven"
url "https://maven.theillusivec4.top/"
}
maven {
name "Abnormals Maven"
url "https://maven.jaackson.me"
}
maven {
name "Apple Skin"
url "https://maven.ryanliptak.com/"
}
maven {
name "JitPack"
url 'https://jitpack.io'
}
maven {
name "Curse Maven"
url "https://www.cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
// location of maven for CC: Tweaked
name = "squiddev"
url = "https://squiddev.cc/maven/"
}
maven {
name 'DragonsPlus Maven'
url "https://maven.dragons.plus/releases"
}
}
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
//embedded dependencies
compileOnly(annotationProcessor("com.github.llamalad7.mixinextras:mixinextras-common:${mixin_extras_version}"))
implementation(jarJar("com.github.llamalad7.mixinextras:mixinextras-forge:${mixin_extras_version}")) {
transitive = false
jarJar.ranged(it, "[${mixin_extras_version},)")
}
implementation(jarJar(fg.deobf("plus.dragons.createdragonlib:create_dragon_lib-${minecraft_version}:${create_dragon_lib_version}"))) {
transitive = false
jarJar.ranged(it, "${create_dragon_lib_version_range}")
}
//mandatory dependencies
implementation fg.deobf("com.simibubi.create:create-${create_minecraft_version}:${create_version}-${create_version_build}:slim")
implementation fg.deobf("com.jozufozu.flywheel:flywheel-forge-${flywheel_minecraft_version}:${flywheel_version}")
implementation fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}")
//integration dependencies
//create addons
implementation fg.deobf("curse.maven:createaddtion-439890:${create_addition_file}")
//farmers delight addons
implementation fg.deobf("curse.maven:farmers-delight-398521:${farmers_delight_file}")
//implementation fg.deobf("curse.maven:brewin-and-chewin-637808:${brewin_and_chewin_file}")
//implementation fg.deobf("curse.maven:collectors-reap-807101:${collectors_reap_file}")
//implementation fg.deobf("curse.maven:farmers-respite-551453:${farmers_respite_file}")
implementation fg.deobf("curse.maven:miners-delight-plus-689630:${miners_delight_file}")
implementation fg.deobf("curse.maven:nethers-delight-496394:${nethers_delight_file}")
implementation fg.deobf("curse.maven:corn-delight-577805:${corn_delight_file}")
implementation fg.deobf("curse.maven:corn-delight-lib-368098:${corn_delight_lib_file}")
implementation fg.deobf("curse.maven:ends-delight-662675:${ends_delight_file}")
implementation fg.deobf("curse.maven:geckolib-388172:5188427") // needed by crabbers delight
implementation fg.deobf("curse.maven:crabbers-delight-892827:${crabbers_delight_file}")
implementation fg.deobf("curse.maven:pineapple-delight-687974:${pineapple_delight_file}")
//implementation fg.deobf("curse.maven:cultural-delight-574622:${cultural_delight_file}")
//implementation fg.deobf("curse.maven:pineapple-delight-687974:${pineapple_delight_file}")
////abnormals mods addons
implementation fg.deobf("com.teamabnormals:blueprint:${blueprint_version}")
//implementation fg.deobf("curse.maven:abnormals-delight-442719:${abnormals_delight_file}")
//implementation fg.deobf("curse.maven:atmospheric-362393:${atmospheric_file}")
implementation fg.deobf("curse.maven:autumnity-365045:${autumnity_file}")
implementation fg.deobf("curse.maven:buzzier-bees-355458:${buzzier_bees_file}")
//implementation fg.deobf("curse.maven:environmental-388992:${environmental_file}")
//implementation fg.deobf("curse.maven:neapolitan-382016:${neapolitan_file}")
//implementation fg.deobf("curse.maven:upgrade-aquatic-326895:${upgrade_aquatic_file}")
//implementation fg.deobf("curse.maven:peculiars-418551:${peculiars_file}")
//implementation fg.deobf("curse.maven:respiteful-836471:${respiteful_file}")
//implementation fg.deobf("curse.maven:seasonals-416471:${seasonals_file}")
//implementation fg.deobf("curse.maven:cookielicious-409577:${cookielicious_file}")
//implementation fg.deobf("curse.maven:exquisito-859262:${exquisito_file}") // I believe the author disables 3rd party download
//independent mods
implementation fg.deobf("curse.maven:overweight-farming-591666:${overweight_farming_file}")
//implementation fg.deobf("curse.maven:snowy-spirit-566142:${snowy_spirit_file}")
//utility dependencies
compileOnly fg.deobf("mezz.jei:jei-${jei_minecraft_version}-common-api:${jei_version}")
compileOnly fg.deobf("mezz.jei:jei-${jei_minecraft_version}-forge-api:${jei_version}")
runtimeOnly fg.deobf("mezz.jei:jei-${jei_minecraft_version}-forge:${jei_version}")
compileOnly fg.deobf("top.theillusivec4.curios:curios-forge:${curios_minecraft_version}-${curios_version}:api")
runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:${curios_minecraft_version}-${curios_version}")
compileOnly fg.deobf("squeek.appleskin:appleskin-forge:mc${appleskin_minecraft_version}-${appleskin_version}:api")
runtimeOnly fg.deobf("squeek.appleskin:appleskin-forge:mc${appleskin_minecraft_version}-${appleskin_version}")
// Fix incompatible issue
implementation fg.deobf("curse.maven:botarium-704113:4831434")
implementation fg.deobf("curse.maven:cc-tweaked-282001:5072630")
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
mixin {
add sourceSets.main, 'create_central_kitchen.refmap.json'
config 'create_central_kitchen.mixins.json'
debug.verbose = true
debug.export = true
}
publishMods {
file = tasks.jarJar.archiveFile
changelog = new File("changelog/${mod_version}.md").text
version = mod_version
type = STABLE
displayName = "CCK ${mod_version} for Create ${minecraft_version}-${create_version}"
modLoaders.add("forge")
modLoaders.add("neoforge")
curseforge {
projectId = "820977"
accessToken = providers.environmentVariable("CURSEFORGE_TOKEN")
minecraftVersions.add(minecraft_version)
requires("create")
}
modrinth {
projectId = "btq68HMO"
accessToken = providers.environmentVariable("MODRINTH_TOKEN")
minecraftVersions.add(minecraft_version)
requires("create")
}
}
void processJar(Jar jarTask) {
jarTask.configure {
from "LICENSE"
exclude ".cache"
exclude "assets/create_central_kitchen/lang/unfinished"
exclude "assets/create_central_kitchen/lang/default"
manifest {
attributes([
"Specification-Title" : "create_central_kitchen",
"Specification-Vendor" : "dragonsplus",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "dragonsplus",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'MixinConfigs': 'create_central_kitchen.mixins.json'
])
}
}
}
jar.finalizedBy('reobfJar')
jar.setArchiveClassifier('slim')
tasks.jarJar.setArchiveClassifier('')
tasks.jarJar.finalizedBy('reobfJarJar')
processJar(jar)
processJar(tasks.jarJar)
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}