2019-08-25 17:58:28 +08:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
2020-07-16 09:48:47 +08:00
|
|
|
plugins {
|
|
|
|
`java-library`
|
|
|
|
}
|
|
|
|
|
2019-08-25 17:58:28 +08:00
|
|
|
applyPlatformAndCoreConfiguration()
|
|
|
|
applyShadowConfiguration()
|
2021-09-07 07:40:57 +08:00
|
|
|
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",
|
|
|
|
),
|
|
|
|
)
|
2019-08-25 17:58:28 +08:00
|
|
|
|
|
|
|
dependencies {
|
2021-07-02 00:44:44 +08:00
|
|
|
"compileOnly"(project(":worldedit-libs:core:ap"))
|
|
|
|
"annotationProcessor"(project(":worldedit-libs:core:ap"))
|
|
|
|
"annotationProcessor"("com.google.guava:guava:${Versions.GUAVA}")
|
2020-07-16 09:48:47 +08:00
|
|
|
"api"(project(":worldedit-core"))
|
2021-12-13 07:49:32 +08:00
|
|
|
"implementation"(platform("org.apache.logging.log4j:log4j-bom:${Versions.LOG4J}") {
|
2021-03-29 11:35:48 +08:00
|
|
|
because("We control Log4J on this platform")
|
|
|
|
})
|
|
|
|
"implementation"("org.apache.logging.log4j:log4j-api")
|
2021-01-25 18:14:09 +08:00
|
|
|
"implementation"("org.apache.logging.log4j:log4j-core")
|
2020-07-16 09:48:47 +08:00
|
|
|
"implementation"("commons-cli:commons-cli:1.4")
|
2021-01-25 18:14:09 +08:00
|
|
|
"implementation"("com.google.guava:guava")
|
|
|
|
"implementation"("com.google.code.gson:gson")
|
2019-08-25 17:58:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
|
|
dependencies {
|
|
|
|
include { true }
|
|
|
|
}
|
|
|
|
minimize {
|
2019-09-02 11:11:34 +08:00
|
|
|
exclude(dependency("org.apache.logging.log4j:log4j-core"))
|
2019-08-25 17:58:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named("assemble").configure {
|
|
|
|
dependsOn("shadowJar")
|
|
|
|
}
|
2021-07-18 14:06:03 +08:00
|
|
|
|
|
|
|
configure<PublishingExtension> {
|
|
|
|
publications.named<MavenPublication>("maven") {
|
2021-09-07 07:40:57 +08:00
|
|
|
artifactId = the<BasePluginExtension>().archivesName.get()
|
2021-07-18 14:06:03 +08:00
|
|
|
from(components["java"])
|
|
|
|
}
|
|
|
|
}
|