-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
86 lines (69 loc) · 2.39 KB
/
build.gradle.kts
File metadata and controls
86 lines (69 loc) · 2.39 KB
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
import dev.deftu.gradle.utils.GameSide
val oneconfigVersion: String by project
val oneconfigWrapperVersion: String by project
val devAuthVersion: String by project
version = properties["mod.version"]!!
repositories {
gradlePluginPortal()
mavenCentral()
maven("https://repo.polyfrost.cc/releases")
maven("https://repo.spongepowered.org/repository/maven-public")
maven("https://repo.hypixel.net/repository/Hypixel/")
}
plugins {
id("dev.deftu.gradle.multiversion")
id("dev.deftu.gradle.tools")
for (tool in listOf(
"java",
"minecraft.loom",
"bloom",
"ducks",
"resources",
"shadow"
)) id("dev.deftu.gradle.tools.$tool")
}
dependencies {
compileOnly("cc.polyfrost:oneconfig-${mcData.version}-${mcData.loader}:$oneconfigVersion")
listOf(
"implementation",
"shade"
).forEach { it("cc.polyfrost:oneconfig-wrapper-launchwrapper:$oneconfigWrapperVersion") }
compileOnly("org.spongepowered:mixin:0.7.11-SNAPSHOT")
implementation("net.hypixel:mod-api:1.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.1")
}
toolkitLoomHelper {
disableRunConfigs(GameSide.SERVER)
// Remove this in the run config if you're using other OneConfig mods, since those mods will not load with the tweaker argument.
useTweaker("cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker")
if (mcData.isLegacyForge) {
useCoreMod("at.yedel.yedelmod.launch.YedelModLoadingPlugin")
useForgeMixin("yedelmod")
useMixinRefMap("yedelmod")
}
useDevAuth(devAuthVersion)
useArgument("--version", "YedelMod", GameSide.BOTH)
val resourcePackDir: String? = System.getenv("minecraft.resourcePackDir")
if (!resourcePackDir.isNullOrBlank()) {
println("Using resource pack directory $resourcePackDir from environment variable minecraft.resourcePackDir")
useArgument("--resourcePackDir", resourcePackDir, GameSide.BOTH)
}
}
toolkitMultiversion {
moveBuildsToRootProject.set(true)
}
tasks {
jar {
archiveFileName = "YedelMod-$version+${mcData}.jar"
manifest.attributes(
mapOf(
"Main-Class" to "at.yedel.yedelmod.launch.YedelModWindow",
"ModSide" to "CLIENT",
)
)
}
test {
useJUnitPlatform()
}
}