Update Upstream

6c08b68 Set Multi-Release in CLI manifest
This commit is contained in:
NotMyFault 2021-09-07 10:19:04 +02:00
parent 91ad0a20ef
commit 8c328abdd2
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
2 changed files with 9 additions and 2 deletions

View File

@ -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<String, String> = mapOf()) {
tasks.named<Jar>("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)
}
}

View File

@ -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