generated from txnimc/TemplateMod
-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
117 lines (101 loc) · 3.6 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
plugins {
id 'java'
id 'idea'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.spongepowered.mixin' version '0.7.+'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
}
version = "${mcversion}-v${modversion}"
base {
archivesName = modid
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
}
minecraft {
mappings channel: "${mappingsch}", version: "${mappings_version}-${mcversion}"
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
copyIdeResources = true
runs {
configureEach {
workingDirectory file('run')
arg "-mixin.config=${modid}.${mixin_file_suffix}"
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'terminal.jline', 'true'
mods {
"${modid}" {
source sourceSets.main
}
}
}
client {
taskName "runClient"
}
}
}
repositories {
mavenCentral()
maven { url "https://repo.spongepowered.org/maven" }
maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.tterrag.com/" }
maven { url "https://maven.blamejared.com" }
maven {
url 'https://www.cursemaven.com'
content {
includeGroup 'curse.maven'
}
}
}
dependencies {
minecraft "net.minecraftforge:forge:${mcversion}-${fgversion}"
// MIXINS
annotationProcessor "net.fabricmc:sponge-mixin:0.12.5+mixin.0.8.5"
compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5"))
implementation(jarJar("io.github.llamalad7:mixinextras-forge:0.3.5")) {
jarJar.ranged(it, "[0.3.5,)")
}
// DEPENDENCIES
implementation fg.deobf("org.embeddedt:embeddium-${mcversion}:${embeddiumversion}")
implementation fg.deobf("curse.maven:jei-238222:${jeiversion}")
runtimeOnly fg.deobf("curse.maven:textrues-embeddium-options-910506:${embeddiumoptionsversion}")
runtimeOnly fg.deobf("curse.maven:oculus-581495:${oculusversion}")
// MOD SUPPORT
implementation fg.deobf("com.simibubi.create:create-${mcversion}:${createversion}:slim") { transitive = false }
implementation fg.deobf("com.jozufozu.flywheel:flywheel-forge-${mcversion}:${flywheelversion}")
implementation fg.deobf("com.tterrag.registrate:Registrate:${registrateversion}")
// UTILITY
runtimeOnly fg.deobf("curse.maven:worldedit-225608:${worldeditversion}")
}
mixin {
add sourceSets.main, "${modid}.${mixin_refmap_suffix}"
config("${modid}.${mixin_file_suffix}")
}
jar {
archiveClassifier = 'ignore'
manifest {
attributes([
"Specification-Title": modid,
"Specification-Vendor": modauthor,
"Specification-Version": modversion,
"Implementation-Title": modname,
"Implementation-Version": modversion,
"Implementation-Vendor" : modauthor,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs": "${modid}.${mixin_file_suffix}"
])
}
}
jarJar.enable()
tasks.jarJar.finalizedBy('reobfJarJar')
tasks.jarJar.archiveClassifier = ''
// Process target resources with mod info
tasks.processResources.outputs.upToDateWhen { false }
processResources {
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
expand(rootProject.properties)
}
}
jar.finalizedBy('reobfJar')
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
}