summaryrefslogtreecommitdiff
path: root/archenemyexample/build.gradle.kts
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2023-12-14 18:11:17 +0100
committerLinnea Gräf <nea@nea.moe>2023-12-14 18:11:17 +0100
commita453cc833f52cf1ccd52288edb73c6f0fbc0c7cc (patch)
tree27704f77968903b7fb38debf42cefda7ed85b705 /archenemyexample/build.gradle.kts
parent9058126b0d77c315436226a589ade0748d8a2905 (diff)
downloadarchenemy-a453cc833f52cf1ccd52288edb73c6f0fbc0c7cc.tar.gz
archenemy-a453cc833f52cf1ccd52288edb73c6f0fbc0c7cc.tar.bz2
archenemy-a453cc833f52cf1ccd52288edb73c6f0fbc0c7cc.zip
Add support for jar merging
Diffstat (limited to 'archenemyexample/build.gradle.kts')
-rw-r--r--archenemyexample/build.gradle.kts18
1 files changed, 14 insertions, 4 deletions
diff --git a/archenemyexample/build.gradle.kts b/archenemyexample/build.gradle.kts
index fae9a49..7ae9646 100644
--- a/archenemyexample/build.gradle.kts
+++ b/archenemyexample/build.gradle.kts
@@ -9,7 +9,8 @@ repositories {
mavenCentral()
maven("https://maven.fabricmc.net")
}
-val minecraft = mojang.minecraft("1.20.2", MCSide.CLIENT) as ModuleDependency
+val minecraftClient = mojang.minecraft("1.20.2", MCSide.CLIENT) as ModuleDependency
+val minecraftServer = mojang.minecraft("1.20.2", MCSide.CLIENT) as ModuleDependency
val officialMappings = mojang.officialMappings(
"1.20.2", MCSide.CLIENT
)
@@ -30,7 +31,7 @@ kotlin {
this.dependencies {
implementation(
mojang.mapJar(
- minecraft,
+ minecraftClient,
officialMappings,
"official",
"named"
@@ -44,12 +45,21 @@ kotlin {
compilations.named("main").get().run {
defaultSourceSet.dependsOn(allJvm)
this.dependencies {
- val thingy = mojang.mapJar(
- minecraft,
+ val intermediaryClient = mojang.mapJar(
+ minecraftClient,
intermediaryMappings,
"official",
"intermediary"
)
+ val intermediaryServer = mojang.mapJar(
+ minecraftServer,
+ intermediaryMappings,
+ "official",
+ "intermediary"
+ )
+ val thingy = mojang.mergeJar(
+ intermediaryClient, intermediaryServer
+ )
implementation(
mojang.mapJar(
thingy as ModuleDependency,