Add JVM Downgrader (DH now uses Java version Ω)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user