-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
140 lines (112 loc) · 4.12 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
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
plugins {
id 'java'
id 'idea'
id "com.matthewprenger.cursegradle" version "1.4.0"
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
id 'org.spongepowered.mixin' version '0.7.+'
}
base {
version = mod_version
group = mod_group_id
archivesName = mod_id
}
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
idea {
module {
excludeDirs.add(file("run"))
}
}
repositories {
maven {
// tfc
url 'https://www.cursemaven.com'
content {
includeGroup "curse.maven"
}
}
maven {
// Patchouli
name = "BlameJared"
url = "https://maven.blamejared.com"
}
}
dependencies {
// Minecraft
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
// Mixin
annotationProcessor("org.spongepowered:mixin:${mixin_version}:processor")
// TFC
fg.deobf("curse.maven:terrafirmacraft-302973:${tfc_version}")
implementation fg.deobf("curse.maven:terrafirmacraft-302973:${tfc_version}")
// Immersive Engineering
// implementation fg.deobf("curse.maven:immersive-engineering-231951:${ie_version}")
// Create
// implementation fg.deobf("curse.maven:create-328085:${create_version}")
//JEI
compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}"))
compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}"))
runtimeOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}"))
// Patchouli
fg.deobf("curse.maven:patchouli-306770:${patchouli_version}")
implementation fg.deobf("curse.maven:patchouli-306770:${patchouli_version}")
// Jade
compileOnly(fg.deobf("curse.maven:jade-324717:${jade_version}"))
// Only use Jade at runtime
runtimeOnly(fg.deobf("curse.maven:jade-324717:${jade_version}"))
// AFC
compileOnly(fg.deobf("curse.maven:arborfirmacraft-877545:${afc_version}"))
// Only use AFC at runtime
runtimeOnly(fg.deobf("curse.maven:arborfirmacraft-877545:${afc_version}"))
}
processResources {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
mappings channel: mapping_channel, version: mapping_version
runs {
all {
// arg "-mixin.config=rnr.mixins.json"
property 'forge.logging.console.level', 'debug'
// property 'mixin.env.remapRefMap', 'true'
// property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
mods {
rnr {
source sourceSets.main
}
}
}
client {
workingDirectory project.file('run/client')
}
server {
workingDirectory project.file('run/server')
arg("--nogui")
}
}
}
//mixin {
// // MixinGradle Settings
//// add sourceSets.main, 'rnr.refmap.json'
// //If you get duplicate refmap error, delete the existing refmap file, a new one should generate on build.
//}
// Example for how to get properties into the manifest for reading at runtime.
tasks {
jar {
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")
// "MixinConfigs":"rnr.mixins.json"
])
}
}
}