-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
64 lines (52 loc) · 1.95 KB
/
build.gradle.kts
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
import dev.deftu.gradle.utils.MinecraftVersion
import dev.deftu.gradle.utils.includeOrShade
plugins {
java
kotlin("jvm")
id("dev.deftu.gradle.multiversion")
id("dev.deftu.gradle.tools")
id("dev.deftu.gradle.tools.resources")
id("dev.deftu.gradle.tools.bloom")
id("dev.deftu.gradle.tools.shadow")
id("dev.deftu.gradle.tools.minecraft.loom")
id("dev.deftu.gradle.tools.minecraft.releases")
}
toolkitMultiversion {
moveBuildsToRootProject.set(true)
}
toolkitLoomHelper {
if (!mcData.isNeoForge) {
useMixinRefMap(modData.id)
}
if (mcData.isForge) {
useTweaker("org.spongepowered.asm.launch.MixinTweaker")
useForgeMixin(modData.id)
}
if (mcData.isForgeLike && mcData.version >= MinecraftVersion.VERSION_1_16_5) {
useKotlinForForge()
}
}
dependencies {
val textileVersion = "0.3.1"
val omnicoreVersion = "0.6.0"
modImplementation("dev.deftu:textile-$mcData:$textileVersion")
modImplementation("dev.deftu:omnicore-$mcData:$omnicoreVersion")
if (mcData.isFabric) {
modImplementation("net.fabricmc.fabric-api:fabric-api:${mcData.dependencies.fabric.fabricApiVersion}")
modImplementation("net.fabricmc:fabric-language-kotlin:${mcData.dependencies.fabric.fabricLanguageKotlinVersion}")
} else if (mcData.version <= MinecraftVersion.VERSION_1_12_2) {
implementation(includeOrShade(kotlin("stdlib-jdk8"))!!)
implementation(includeOrShade("org.jetbrains.kotlin:kotlin-reflect:1.6.10")!!)
modImplementation(includeOrShade("org.spongepowered:mixin:0.7.11-SNAPSHOT")!!)
includeOrShade("dev.deftu:textile-$mcData:$textileVersion")
includeOrShade("dev.deftu:omnicore-$mcData:$omnicoreVersion")
}
}
tasks {
fatJar {
if (mcData.isLegacyForge) {
relocate("dev.deftu.textile", "dev.deftu.favorita.textile")
relocate("dev.deftu.omnicore", "dev.deftu.favorita.omnicore")
}
}
}