Add JVM Downgrader (DH now uses Java version Ω)

This commit is contained in:
Cutiepie
2024-05-21 01:26:03 +10:00
parent 00d8aa356b
commit af6dca6e5e
5 changed files with 33 additions and 6 deletions
+19
View File
@@ -12,6 +12,8 @@ plugins {
// Architectury is used here only as a replacement for forge's own loom
id "dev.architectury.loom" version "1.6-SNAPSHOT" apply false
id 'xyz.wagyourtail.jvmdowngrader' version '0.4.0' apply true
}
@@ -102,6 +104,7 @@ subprojects { p ->
// Apply plugins
apply plugin: "java"
apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "xyz.wagyourtail.jvmdowngrader"
if (isMinecraftSubProject)
apply plugin: "systems.manifold.manifold-gradle-plugin"
@@ -313,6 +316,22 @@ subprojects { p ->
// Using jar.finalizedBy(shadowJar) causes issues so we do this scuffed bypass
jar.dependsOn(shadowJar)
// For downgrading our project to Java 8
if (isMinecraftSubProject) {
task jarDowngrade(type: xyz.wagyourtail.jvmdg.gradle.task.DowngradeJar) {
inputFile = tasks.shadowJar.archiveFile
archiveClassifier = "downgraded-8"
}
task apiDowngrade(type: xyz.wagyourtail.jvmdg.gradle.task.ShadeAPI) {
inputFile = jarDowngrade.archiveFile
archiveClassifier = "downgraded-8-shaded"
}
// We're using a custom downgrade task so we disable the original downgrade tasks
downgradeJar.enabled = false
shadeDowngradedApi.enabled = false
}
// Put stuff from gradle.properties into the mod info
processResources {