forked from Oganesson897/GregicaPlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
243 lines (197 loc) · 7.42 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
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven {
name = 'Forge'
url = 'https://maven.minecraftforge.net'
}
maven {
name = 'MixinGradle'
url = 'https://repo.spongepowered.org/repository/maven-public'
}
}
dependencies {
classpath "org.spongepowered:mixingradle:0.7-SNAPSHOT"
}
}
plugins {
id 'net.minecraftforge.gradle' version '5.1.+'
id 'wtf.gofancy.fancygradle' version "1.1.+"
}
apply plugin: 'org.spongepowered.mixin'
group = 'me.oganesson'
version = "${project.current_version}-${project.current_state}"
archivesBaseName = "${project.archives_base_name}-${project.minecraft_version}"
java {
archivesBaseName = 'gregica'
toolchain.languageVersion = JavaLanguageVersion.of(8)
}
minecraft {
mappings channel: 'stable', version: '39-1.12'
accessTransformer = file('src/main/resources/META-INF/gregica_at.cfg')
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
// Recommended logging level for the console
// You can set various levels here.
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
property 'forge.logging.console.level', 'debug'
mods {
gregica {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
gregica {
source sourceSets.main
}
}
}
}
}
repositories {
mavenCentral()
maven {url = 'https://cursemaven.com/'}
maven {url = 'https://maven.blamejared.com'}
maven {url = "https://api.modrinth.com/maven"}
maven {url = 'https://maven.cleanroommc.com'}
maven {url = 'https://oss.sonatype.org/content/groups/public/'}
}
dependencies {
implementation 'org.jetbrains:annotations:24.0.0'
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'
implementation fg.deobf("curse.maven:code-chicken-lib-1-8-242818:2779848")
implementation "mezz.jei:jei_1.12.2:${jei_version}"
implementation "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-${crt_version}"
implementation fg.deobf("curse.maven:top-${top_pid}:${top_fid}")
implementation fg.deobf("curse.maven:ctm-${ctm_pid}:${ctm_fid}")
//implementation fg.deobf("curse.maven:groovyscript-${grs_pid}:${grs_fid}")
implementation files("libs/groovyscript-0.4.0.jar")
implementation fg.deobf("curse.maven:ae2-extended-life-${ae2_pid}:${ae2_fid}")
//implementation fg.deobf("maven.modrinth:endercore:0.5.76")
//implementation fg.deobf("curse.maven:endercore-231868:2972849")
implementation fg.deobf("maven.modrinth:gregtech-ce-unofficial:${ceu_version}")
// implementation fg.deobf("curse.maven:gregtech-ce-unofficial-4527757:${ceu_version}")
//implementation files(("libs/gregtech-2.6.2-beta.jar"))
//implementation fg.deobf("libs:gregtech-1.12.2:2.5.4-beta")
implementation fg.deobf("curse.maven:gregicality-multiblocks-564858:${gcym_version}")
compileOnly "curse.maven:thaumcraft-223628:2629023"
compileOnly "curse.maven:baubles-227083:2518667"
implementation fg.deobf("zone.rong:mixinbooter:${mixinbooter_version}")
compileOnly 'curse.maven:AdvancedRocketry-236542:3801020'
compileOnly group: "info.journeymap", name: "journeymap-api", version: "1.9-1.2", changing: true
compileOnly (files("libs/EnderCore-1.12.2-0.5.76-core.jar"))
//implementation 'org.spongepowered:mixin:0.8.2'
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
// Examples using mod jars from ./libs
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
// For more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
//jabel
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:0.4.2'
compileOnly 'com.github.bsideup.jabel:jabel-javac-plugin:0.4.2'
}
fancyGradle {
patches {
resources
coremods
codeChickenLib
asm
mergetool
}
}
// Example for how to get properties into the manifest for reading at runtime.
jar {
manifest {
attributes([
// "TweakOrder": "0",
'FMLCorePluginContainsFMLMod': true,
'FMLCorePlugin': 'gregica.mixininit.EarlyMixinInit',
"ForceLoadAsMod": true,
//"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
"Specification-Title" : "gregica",
"Specification-Vendor" : "Oganesson897",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : project.current_version,
"Implementation-Vendor" : "Oganesson897",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
file('src/api/').eachDirRecurse { dir ->
exclude dir.name
}
}
mixin {
add sourceSets.main, "mixins.gregica.refmap.json"
// config 'mixins.gregica.json'
debug.export = true
}
jar.finalizedBy('reobfJar')
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
//from https://github.com/bsideup/jabel/blob/master/README.md
configure([tasks.compileJava]) {
sourceCompatibility = 16 // for the IDE support
options.release = 8
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(16)
}
}
compileTestJava {
sourceCompatibility = targetCompatibility = 8
}
test {
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(8)
}
}
//borrow from ceu
sourceSets {
main {
// if (project.use_mixins.toBoolean()) {
// ext.refMap = 'mixins.' + archives_base_name + '.refmap.json'
// }
java {
srcDirs = ['src/main/java', 'src/api/java']
}
resources {
srcDirs = ['src/main/resources']
}
}
}
// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }
apply {
plugin 'java'
plugin 'idea'
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
//private void processJarTask(task) {
// // exclude all files in src/api from being shipped in the jar
// // this prevents crashes in obfuscated environments
// file('src/api/').eachDirRecurse { dir ->
// exclude dir.name
// }
//
//}