From 8c328abdd2a2b30a0a3c1de8367aa1ac70d6a826 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Tue, 7 Sep 2021 10:19:04 +0200 Subject: [PATCH] Update Upstream 6c08b68 Set Multi-Release in CLI manifest --- buildSrc/src/main/kotlin/PlatformConfig.kt | 3 ++- worldedit-cli/build.gradle.kts | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/PlatformConfig.kt b/buildSrc/src/main/kotlin/PlatformConfig.kt index ae725bdca..8353ee960 100644 --- a/buildSrc/src/main/kotlin/PlatformConfig.kt +++ b/buildSrc/src/main/kotlin/PlatformConfig.kt @@ -158,7 +158,7 @@ sealed class WorldEditKind( object Plugin : WorldEditKind("PLUGIN") } -fun Project.addJarManifest(kind: WorldEditKind, includeClasspath: Boolean = false) { +fun Project.addJarManifest(kind: WorldEditKind, includeClasspath: Boolean = false, extraAttributes: Map = mapOf()) { tasks.named("jar") { val version = project(":worldedit-core").version inputs.property("version", version) @@ -171,6 +171,7 @@ fun Project.addJarManifest(kind: WorldEditKind, includeClasspath: Boolean = fals if (includeClasspath) { attributes["Class-Path"] = CLASSPATH } + attributes.putAll(extraAttributes) manifest.attributes(attributes) } } diff --git a/worldedit-cli/build.gradle.kts b/worldedit-cli/build.gradle.kts index 407357444..0cf899d75 100644 --- a/worldedit-cli/build.gradle.kts +++ b/worldedit-cli/build.gradle.kts @@ -11,7 +11,13 @@ project.description = "CLI" applyPlatformAndCoreConfiguration() applyShadowConfiguration() -addJarManifest(WorldEditKind.Standalone("com.sk89q.worldedit.cli.CLIWorldEdit")) +addJarManifest( + WorldEditKind.Standalone("com.sk89q.worldedit.cli.CLIWorldEdit"), + extraAttributes = mapOf( + // We don't have any multi-release stuff, but Log4J does. + "Multi-Release" to "true", + ), +) dependencies { // Modules