diff --git a/build.gradle b/build.gradle index 354688b26..8c9f07ed0 100644 --- a/build.gradle +++ b/build.gradle @@ -56,65 +56,6 @@ subprojects { } } -tasks.register('fixForge', Zip) { - if (gradle.startParameter.taskNames.contains(name)) { - if (!file('./build/libs/' + archives_base_name + - '-' + minecraft_version + - '-' + mod_version + - '-forge_nonfunctional_without_changes.jar').exists() || - !file('./build/libs/' + archives_base_name + - '-' + minecraft_version + - '-' + mod_version + - '-neoforge.jar').exists()) { - throw new GradleException("forge and neoforge need to be built to run this task") - } - doFirst { - println('unzipping jars') - } - copy { - // extract all forge files - from zipTree('./build/libs/' + archives_base_name + - '-' + minecraft_version + - '-' + mod_version + - '-forge_nonfunctional_without_changes.jar') - into './build/tmp/forge' - // remove any refmap - exclude "**/*-refmap.json" - // remove the refmap from the mixin jsons - eachFile { fileCopyDetails -> - if (fileCopyDetails.name.endsWith('.json')) { - filter { - line -> line.contains('"refmap": "vivecraft-common-refmap.json"') ? '"dummy": ""' : line - } - } - } - } - copy { - // override the general classes with the neoforge ones, since those are mapped correctly - from zipTree('./build/libs/' + archives_base_name + - '-' + minecraft_version + - '-' + mod_version + - '-neoforge.jar') - into './build/tmp/forge' - include '/org/vivecraft/**' - exclude '**/neoforge/**', '**/Xplat*.class', '**/Xevents*.class' - } - - // zip up the combined jar again - archiveFileName = archives_base_name + - '-' + minecraft_version + - '-' + mod_version + - '-forge.jar' - destinationDirectory = file('./build/libs/') - from './build/tmp/forge' - - doLast { - println('removing temp files') - delete './build/tmp/forge' - } - } -} - allprojects { apply plugin: "architectury-plugin" apply plugin: "maven-publish" diff --git a/forge/build.gradle b/forge/build.gradle index c508fc56b..ddacb5df8 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -92,7 +92,7 @@ shadowJar { remapJar { input.set shadowJar.archiveFile dependsOn shadowJar - archiveClassifier.set('forge_nonfunctional_without_changes') + archiveClassifier.set('forge') } jar {