-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
182 lines (153 loc) · 6.18 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
plugins {
id 'eclipse'
id 'idea'
id 'net.minecraftforge.gradle' version '[6.0.16,6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
id 'org.spongepowered.mixin' version '0.7.+'
}
group = mod_group_id
version = mod_version
base {
archivesName = mod_id
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
}
minecraft {
mappings channel: mapping_channel, version: mapping_version
copyIdeResources = true
runs {
configureEach {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
"${mod_id}" {
source sourceSets.main
}
}
}
client {
property 'forge.enabledGameTestNamespaces', mod_id
}
server {
property 'forge.enabledGameTestNamespaces', mod_id
args '--nogui'
}
gameTestServer {
property 'forge.enabledGameTestNamespaces', mod_id
}
data {
workingDirectory project.file('run-data')
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/'), '--existing-mod', 'tconstruct'
}
}
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
maven {
url = 'https://dvs1.progwml6.com/files/maven'
content {
includeGroup "slimeknights.tconstruct"
includeGroup "slimeknights.mantle"
}
}
maven {
url = "https://code.redspace.io/releases"
content {
includeGroup "io.redspace.ironsspellbooks"
}
}
maven {
url = "https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/"
content {
includeGroup "software.bernie.geckolib"
}
}
maven {
url = "https://maven.theillusivec4.top"
content {
includeGroup "top.theillusivec4.curios"
includeGroup "top.theillusivec4.caelus"
}
}
maven {
url = "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
url = "https://maven.blamejared.com"
content {
includeGroup "mezz.jei"
}
}
maven {
url = "https://maven.kosmx.dev/"
content {
includeGroup "dev.kosmx.player-anim"
}
}
mavenCentral()
}
dependencies {
// FORGE ******************************************************************************************************
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
// MIXINS *****************************************************************************************************
annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
//TINKERS CONSTRUCT & MANTLE
implementation fg.deobf("slimeknights.mantle:Mantle:${minecraft_version}-${mantle_version}")
implementation fg.deobf("slimeknights.tconstruct:TConstruct:${minecraft_version}-${tic_version}")
// IRONS SPELLS N SPELLBOOKS **********************************************************************************
compileOnly fg.deobf("io.redspace.ironsspellbooks:irons_spellbooks:${irons_spells_version}:api")
implementation fg.deobf("io.redspace.ironsspellbooks:irons_spellbooks:${irons_spells_version}")
// GECKOLIB ***************************************************************************************************
runtimeOnly fg.deobf("software.bernie.geckolib:geckolib-forge-${geckolib_version}")
// CAELUS *****************************************************************************************************
runtimeOnly fg.deobf("top.theillusivec4.caelus:caelus-forge:${caelus_version}")
// PLAYER ANIMATOR ********************************************************************************************
runtimeOnly fg.deobf("dev.kosmx.player-anim:player-animation-lib-forge:${player_animator_version}")
// CURIOS *****************************************************************************************************
implementation fg.deobf("top.theillusivec4.curios:curios-forge:${curios_version}")
// JEI ********************************************************************************************************
runtimeOnly fg.deobf("mezz.jei:jei-${jei_mc_version}-forge:${jei_version}")
//DUMMMMY
runtimeOnly fg.deobf("curse.maven:moonlight_lib-499980:4983974")
runtimeOnly fg.deobf("curse.maven:mmmmmmmmmmmm-225738:4410143")
}
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description,
]
inputs.properties replaceProperties
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}}
// Example for how to get properties into the manifest for reading at runtime.
tasks.named('jar', Jar).configure {
manifest {
attributes([
"Specification-Title": mod_id,
"Specification-Vendor": mod_authors,
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": project.jar.archiveVersion,
"Implementation-Vendor": mod_authors,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
// This is the preferred method to reobfuscate your jar file
finalizedBy 'reobfJar'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
mixin {
add sourceSets.main, 'constructscasting.refmap.json'
config 'mixins.constructscasting.json'
}