Skip to content

Commit

Permalink
loader/ml9: configure manifest for stage0 mixin config
Browse files Browse the repository at this point in the history
  • Loading branch information
Sychic committed Jun 20, 2024
1 parent e891112 commit 8fa6370
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/kotlin/gg/essential/essential-loader.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package gg.essential

import gg.essential.gradle.multiversion.Platform
import gg.essential.gradle.util.RelocationTransform.Companion.registerRelocationAttribute
import net.fabricmc.loom.LoomGradleExtension


plugins {
Expand Down Expand Up @@ -56,6 +57,21 @@ when {
"forgeRuntimeLibrary"(essentialLoader("gg.essential:loader-modlauncher9:1.2.2")!!)
}
}

if (!isML8) {
afterEvaluate {
tasks.named<Jar>("jar") {
val mixinConfigs = manifest.attributes.getOrDefault("MixinConfigs", "") as String
manifest.attributes["MixinConfigs"] =
if (mixinConfigs.isBlank()) {
"mixin.stage0.essential-loader.json"
} else {
"$mixinConfigs,mixin.stage0.essential-loader.json"
}
}
}
}

tasks {
named<Jar>("jar") {
dependsOn(essentialLoader)
Expand Down

0 comments on commit 8fa6370

Please sign in to comment.