-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
208 lines (180 loc) · 7.74 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
import org.gradle.jvm.toolchain.JavaLanguageVersion
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net/' }
jcenter()
mavenCentral()
gradlePluginPortal()
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/maven'
}
maven {
name = 'parchment'
url = 'https://maven.parchmentmc.org'
}
maven { url 'https://dvs1.progwml6.com/files/maven' }
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1+', changing: true
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
classpath 'org.parchmentmc:librarian:1.+'
}
}
repositories {
maven { url = 'https://libraries.minecraft.net/' }
mavenCentral()
maven { url = 'https://maven.minecraftforge.net/' }
maven { url 'https://dvs1.progwml6.com/files/maven' }
maven {
url = "https://www.cursemaven.com"
}
maven {
name = 'sponge'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {
url "https://maven.tterrag.com/"
}
maven { url 'https://jitpack.io' }
}
apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
version = "${mod_version}"
group = 'trinsdar.gt_foods' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'GT Foods'
//Print out JVM information so that we know what version is running. Extreamly useful for people to know when helping you.
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
include '**/**'
srcDirs += 'src/generated/resources'
exclude '.cache'
exclude 'Thumbs.db'
}
}
}
minecraft {
mappings channel: 'parchment', version: "${mappings_version}"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
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')
// Recommended logging data for a userdev enmappings channel: 'parchment', version: '2021.10.17-1.16.5'vironment
property 'forge.logging.markers', 'DEBUG'
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
arg "-mixin.config=gt_foods.mixins.json"
mods {
gt_foods {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'DEBUG'
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
//jvmArgs '-javaagent:/opt/JavaHot/hotswap-agent.jar -XX:TraceRedefineClasses=1'
//Comment this if you aren't developing against antimatter locally.
arg "-mixin.config=gt_foods.mixins.json"
mods {
gt_foods {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'DEBUG'
//jvmArgs '-javaagent:/opt/JavaHot/hotswap-agent.jar -XX:TraceRedefineClasses=1'
//Comment this if you aren't developing against antimatter locally.
// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
arg "-mixin.config=gt_foods.mixins.json"
args '--mod', 'gt_foods', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources')
mods {
gt_foods {
source sourceSets.main
}
}
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
implementation 'org.apache.commons:commons-collections4:4.4'
runtimeOnly fg.deobf("curse.maven:world_stripper-250603:3142092")
runtimeOnly fg.deobf("curse.maven:world_edit-225608:3172951")
runtimeOnly fg.deobf("curse.maven:top-245211:${top_file}")
runtimeOnly fg.deobf("curse.maven:apple_skin-248787:3395800")
runtimeOnly fg.deobf("com.github.Gregtech-Intergalactical:AntimatterAPI:${antimatter_version}")
compileOnly fg.deobf("com.github.Gregtech-Intergalactical:AntimatterAPI:${antimatter_version}")
runtimeOnly fg.deobf("com.github.GregTech-Intergalactical:TesseractAPI:${tesseract_version}")
compileOnly fg.deobf("com.github.GregTech-Intergalactical:TesseractAPI:${tesseract_version}")
//runtimeOnly fg.deobf("com.github.GregTech-Intergalactical.GregTech:build:${gregtech_version}")
compileOnly fg.deobf("com.github.GregTech-Intergalactical.GregTech:build:${gregtech_version}")
runtimeOnly fg.deobf("com.github.Trinsdar.GT-4-Reimagined:build:${gt4r_version}")
compileOnly fg.deobf("com.github.Trinsdar.GT-4-Reimagined:build:${gt4r_version}")
annotationProcessor 'org.spongepowered:mixin:0.8.5-SNAPSHOT:processor'
compileOnly fg.deobf("mezz.jei:jei-${jei_version}:api")
runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}")
}
// Example configuration to allow publishing using the maven-publish task
// we define a custom artifact that is sourced from the reobfJar output task
// and then declare that to be published
// Note you'll need to add a repository here
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}
apply plugin: 'org.spongepowered.mixin'
mixin {
add sourceSets.main, "gt_foods.refmap.json"
}
jar {
zip64 true
manifest {
attributes([
"MixinConfigs": "gt_foods.mixins.json",
"Specification-Title": project.name,
"Specification-Vendor": "GT Foods",
"Specification-Version": project.version,
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor": "GT Foods",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}