From 69ac74e350c40984e778997b0830abbd5900c4e5 Mon Sep 17 00:00:00 2001 From: malte0811 Date: Sun, 30 Jul 2023 10:00:59 +0200 Subject: [PATCH 1/6] Fix "duplicate key" error in server installs created by the installer --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index b0edd30c204..3e6be63cfe2 100644 --- a/build.gradle +++ b/build.gradle @@ -783,7 +783,6 @@ project(':forge') { doLast { def CLASS_PATH = Util.getArtifacts(project, configurations.installer, false).values().collect{"libraries/${it.downloads.artifact.path}"} + [ - 'libraries/' + Util.getMavenPath(project, "net.neoforged.fancymodloader:loader:${FANCY_MOD_LOADER_VERSION}"), "libraries/net/minecraft/server/${MC_VERSION}-${MCP_VERSION}/server-${MC_VERSION}-${MCP_VERSION}-extra.jar" ] def claimed = CLASS_PATH.collect{ it.rsplit('/', 2)[0] }.toSet() // Allow us to override versions From fc6c8094294cf0e08932cd531fff446bfd67c8e3 Mon Sep 17 00:00:00 2001 From: malte0811 Date: Sun, 30 Jul 2023 10:43:44 +0200 Subject: [PATCH 2/6] Provide language providers on the legacy classpath in server installs --- build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index 3e6be63cfe2..89e044ac607 100644 --- a/build.gradle +++ b/build.gradle @@ -370,6 +370,11 @@ project(':forge') { moduleonly "cpw.mods:bootstraplauncher:${BOOTSTRAPLAUNCHER_VERSION}" moduleonly "net.minecraftforge:JarJarFileSystems:${JARJAR_VERSION}" + installer "net.neoforged.fancymodloader:core:${FANCY_MOD_LOADER_VERSION}" + installer "net.neoforged.fancymodloader:events:${FANCY_MOD_LOADER_VERSION}" + installer "net.neoforged.fancymodloader:language-java:${FANCY_MOD_LOADER_VERSION}" + installer "net.neoforged.fancymodloader:language-lowcode:${FANCY_MOD_LOADER_VERSION}" + installer "net.neoforged.fancymodloader:language-minecraft:${FANCY_MOD_LOADER_VERSION}" installer "cpw.mods:securejarhandler:${SECUREJARHANDLER_VERSION}" installer "org.ow2.asm:asm:${ASM_VERSION}" installer "org.ow2.asm:asm-commons:${ASM_VERSION}" From 869f18ff353c32dd862eabb24801caf694c0edbe Mon Sep 17 00:00:00 2001 From: malte0811 Date: Sun, 30 Jul 2023 10:44:16 +0200 Subject: [PATCH 3/6] Fix "reads more than one module named X" errors on server installs --- build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 89e044ac607..42fb38c034c 100644 --- a/build.gradle +++ b/build.gradle @@ -778,7 +778,11 @@ project(':forge') { MC_VERSION: MC_VERSION, MCP_VERSION: MCP_VERSION, FORGE_GROUP: group, - IGNORE_LIST: Util.getArtifacts(project, configurations.moduleonly, false).values().collect{it.downloads.artifact.path.rsplit('/', 1)[1]}.join(','), + IGNORE_LIST: [ + configurations.moduleonly, configurations.gameLayerLibrary, configurations.pluginLayerLibrary + ].collectMany { Util.getArtifacts(project, it, false).values() } + .collect{it.downloads.artifact.path.rsplit('/', 1)[1]} + .join(','), PLUGIN_LAYER_LIBRARIES: project.patcher.runs.forge_client.properties['fml.pluginLayerLibraries'], GAME_LAYER_LIBRARIES: project.patcher.runs.forge_client.properties['fml.gameLayerLibraries'], MODULES: 'ALL-MODULE-PATH' From 46936433f212a587b43945a3d5ef0b3249025e41 Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Thu, 3 Aug 2023 01:52:10 +0800 Subject: [PATCH 4/6] Bump FancyModLoader to 47.1.43 Fixes an issue where the language providers couldn't be discovered properly, causing a crash. --- build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 42fb38c034c..d420f803c11 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ ext { SLF4J_API_VERSION = '1.8.0-beta4' APACHE_MAVEN_ARTIFACT_VERSION = '3.8.5' JARJAR_VERSION = '0.3.19' - FANCY_MOD_LOADER_VERSION = '47.1.41' + FANCY_MOD_LOADER_VERSION = '47.1.43' // These versions should be kept in sync with the version manifest JSON // To use a version newer than the version manifest JSON, the dependency must be added to the installer configuration @@ -209,7 +209,7 @@ subprojects { maven gradleutils.getPublishingForgeMaven() } } - + tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation options.warnings = false // Shutup deprecated for removal warnings @@ -268,7 +268,7 @@ project(':clean') { } } } - + tasks.named('compileJava') { mustRunAfter 'extractMapped' } } @@ -279,8 +279,8 @@ project(':forge') { apply plugin: 'org.parchmentmc.librarian.forgegradle' apply plugin: 'org.cadixdev.licenser' - applyPatches { - verbose = true + applyPatches { + verbose = true //failOnError = false } From e49f3cb137282449770a00c985f9809f87da5cd6 Mon Sep 17 00:00:00 2001 From: cpw Date: Thu, 3 Aug 2023 12:54:07 -0400 Subject: [PATCH 5/6] fix the server install. Don't add additional stuff to installer because that breaks client. Should be merging the LayerLibraries into the CLASS_PATH for discovery by BSL --- build.gradle | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index d420f803c11..5e3e362a7e1 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ ext { SLF4J_API_VERSION = '1.8.0-beta4' APACHE_MAVEN_ARTIFACT_VERSION = '3.8.5' JARJAR_VERSION = '0.3.19' - FANCY_MOD_LOADER_VERSION = '47.1.43' + FANCY_MOD_LOADER_VERSION = '47.1.41' // These versions should be kept in sync with the version manifest JSON // To use a version newer than the version manifest JSON, the dependency must be added to the installer configuration @@ -370,11 +370,6 @@ project(':forge') { moduleonly "cpw.mods:bootstraplauncher:${BOOTSTRAPLAUNCHER_VERSION}" moduleonly "net.minecraftforge:JarJarFileSystems:${JARJAR_VERSION}" - installer "net.neoforged.fancymodloader:core:${FANCY_MOD_LOADER_VERSION}" - installer "net.neoforged.fancymodloader:events:${FANCY_MOD_LOADER_VERSION}" - installer "net.neoforged.fancymodloader:language-java:${FANCY_MOD_LOADER_VERSION}" - installer "net.neoforged.fancymodloader:language-lowcode:${FANCY_MOD_LOADER_VERSION}" - installer "net.neoforged.fancymodloader:language-minecraft:${FANCY_MOD_LOADER_VERSION}" installer "cpw.mods:securejarhandler:${SECUREJARHANDLER_VERSION}" installer "org.ow2.asm:asm:${ASM_VERSION}" installer "org.ow2.asm:asm-commons:${ASM_VERSION}" @@ -778,11 +773,13 @@ project(':forge') { MC_VERSION: MC_VERSION, MCP_VERSION: MCP_VERSION, FORGE_GROUP: group, - IGNORE_LIST: [ - configurations.moduleonly, configurations.gameLayerLibrary, configurations.pluginLayerLibrary - ].collectMany { Util.getArtifacts(project, it, false).values() } - .collect{it.downloads.artifact.path.rsplit('/', 1)[1]} - .join(','), + IGNORE_LIST: ['moduleonly', 'gameLayerLibrary', 'pluginLayerLibrary'].collectMany { configurations.getByName(it).files }.collect { + if (it.name.startsWith('events') || it.name.startsWith('core')) { + it.name // These names are too generic by themselves, so let's keep the version info + } else { + it.name.replaceAll(/([-_]([.\d]*\d+)|\.jar$)/, '') + } + }.join(','), PLUGIN_LAYER_LIBRARIES: project.patcher.runs.forge_client.properties['fml.pluginLayerLibraries'], GAME_LAYER_LIBRARIES: project.patcher.runs.forge_client.properties['fml.gameLayerLibraries'], MODULES: 'ALL-MODULE-PATH' @@ -790,7 +787,8 @@ project(':forge') { task([dependsOn: rootProject.downloadServerRaw], 'makeClasspathFiles') { doLast { - def CLASS_PATH = Util.getArtifacts(project, configurations.installer, false).values().collect{"libraries/${it.downloads.artifact.path}"} + + def CLASS_PATH = ['installer', 'gameLayerLibrary', 'pluginLayerLibrary'].collectMany { Util.getArtifacts(project, configurations.getByName(it), false).values() }. + collect{"libraries/${it.downloads.artifact.path}"} + [ "libraries/net/minecraft/server/${MC_VERSION}-${MCP_VERSION}/server-${MC_VERSION}-${MCP_VERSION}-extra.jar" ] From 64b9cf9d64fafa5a9c7395e925af60fcc485afae Mon Sep 17 00:00:00 2001 From: cpw Date: Thu, 3 Aug 2023 13:52:14 -0400 Subject: [PATCH 6/6] Tweak a broken URL and update Fancy to 45. Should fix winderp. --- build.gradle | 6 +++--- .../net/minecraftforge/forge/tasks/TeamcityRequests.groovy | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 5e3e362a7e1..30b44ce40a0 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,7 @@ ext { SLF4J_API_VERSION = '1.8.0-beta4' APACHE_MAVEN_ARTIFACT_VERSION = '3.8.5' JARJAR_VERSION = '0.3.19' - FANCY_MOD_LOADER_VERSION = '47.1.41' + FANCY_MOD_LOADER_VERSION = '47.1.45' // These versions should be kept in sync with the version manifest JSON // To use a version newer than the version manifest JSON, the dependency must be added to the installer configuration @@ -714,8 +714,8 @@ project(':forge') { it.name.replaceAll(/([-_]([.\d]*\d+)|\.jar$)/, '') } }.join(',') + ",client-extra,${project.name}-" - run.property 'fml.pluginLayerLibraries', configurations.pluginLayerLibrary.files.collect { it.name }.join(';') - run.property 'fml.gameLayerLibraries', configurations.gameLayerLibrary.files.collect { it.name }.join(';') + run.property 'fml.pluginLayerLibraries', configurations.pluginLayerLibrary.files.collect { it.name }.join(',') + run.property 'fml.gameLayerLibraries', configurations.gameLayerLibrary.files.collect { it.name }.join(',') // FIXME: Without this jna doesn't work at runtime. Someone figure out why please? run.property 'mergeModules', 'jna-5.10.0.jar,jna-platform-5.10.0.jar' if (userdevRuns.contains(run)) { diff --git a/buildSrc/src/main/groovy/net/minecraftforge/forge/tasks/TeamcityRequests.groovy b/buildSrc/src/main/groovy/net/minecraftforge/forge/tasks/TeamcityRequests.groovy index ca55d7aad56..6650737b13b 100644 --- a/buildSrc/src/main/groovy/net/minecraftforge/forge/tasks/TeamcityRequests.groovy +++ b/buildSrc/src/main/groovy/net/minecraftforge/forge/tasks/TeamcityRequests.groovy @@ -32,7 +32,7 @@ class TeamcityRequests { @Nullable static Map buildsByCommit() throws IOException { final Map builds = [:] - jsonRequest(new TypeToken() {}, 'https://teamcity.neoforged.net/guestAuth/app/rest/builds?fields=build:(revisions,number)&locator=buildType:(id:MinecraftForge_MinecraftForge_MinecraftForge_MinecraftForge__Build),defaultFilter:false,count:300,status:SUCCESS') + jsonRequest(new TypeToken() {}, 'https://teamcity.neoforged.net/guestAuth/app/rest/builds?fields=build:(revisions,number)&locator=buildType:(id:MinecraftForge_NeoForge_MinecraftForge_MinecraftForge__Build),defaultFilter:false,count:300,status:SUCCESS') ?.build?.forEach { it.revisions.revision.each { rev -> builds[rev.version] = it } }