2019-08-25 09:58:28 +00:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
2020-08-14 19:29:15 +00:00
|
|
|
plugins {
|
|
|
|
`java-library`
|
2021-08-17 14:57:35 +00:00
|
|
|
|
|
|
|
alias(libs.plugins.pluginyml)
|
2020-08-14 19:29:15 +00:00
|
|
|
}
|
|
|
|
|
2021-07-01 20:16:25 +00:00
|
|
|
project.description = "CLI"
|
|
|
|
|
2019-08-25 09:58:28 +00:00
|
|
|
applyPlatformAndCoreConfiguration()
|
|
|
|
applyShadowConfiguration()
|
|
|
|
|
2021-09-07 08:19:04 +00: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",
|
|
|
|
),
|
|
|
|
)
|
2021-02-25 21:58:17 +00:00
|
|
|
|
2019-08-25 09:58:28 +00:00
|
|
|
dependencies {
|
2021-08-01 17:28:51 +00:00
|
|
|
// Modules
|
|
|
|
api(projects.worldeditCore)
|
|
|
|
compileOnly(projects.worldeditLibs.core.ap)
|
|
|
|
annotationProcessor(projects.worldeditLibs.core.ap)
|
|
|
|
|
|
|
|
// Minecraft expectations
|
|
|
|
annotationProcessor(libs.guava)
|
|
|
|
implementation(libs.guava)
|
|
|
|
implementation(libs.gson)
|
|
|
|
|
|
|
|
// Logging
|
|
|
|
implementation(libs.log4jBom) {
|
2021-03-29 13:29:16 +00:00
|
|
|
because("We control Log4J on this platform")
|
2021-08-01 17:28:51 +00:00
|
|
|
}
|
|
|
|
implementation(libs.log4j)
|
|
|
|
implementation(libs.log4jCore
|
|
|
|
)
|
2021-11-01 12:53:29 +00:00
|
|
|
implementation("commons-cli:commons-cli:1.5.0")
|
2021-09-06 18:17:43 +00:00
|
|
|
api(libs.parallelgzip) { isTransitive = false }
|
2021-09-07 08:41:42 +00:00
|
|
|
api(libs.lz4Java)
|
2019-08-25 09:58:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
|
|
dependencies {
|
|
|
|
include { true }
|
2021-09-06 18:17:43 +00:00
|
|
|
relocate("org.anarres", "com.fastasyncworldedit.core.internal.io")
|
2021-09-07 08:41:42 +00:00
|
|
|
relocate("net.jpountz", "com.fastasyncworldedit.core.jpountz")
|
|
|
|
relocate("org.lz4", "com.fastasyncworldedit.core.lz4")
|
2019-08-25 09:58:28 +00:00
|
|
|
}
|
2021-07-22 20:11:43 +00:00
|
|
|
archiveFileName.set(moduleIdentifier)
|
2019-08-25 09:58:28 +00:00
|
|
|
minimize {
|
2019-09-02 03:11:34 +00:00
|
|
|
exclude(dependency("org.apache.logging.log4j:log4j-core"))
|
2019-08-25 09:58:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named("assemble").configure {
|
|
|
|
dependsOn("shadowJar")
|
|
|
|
}
|
2021-07-22 20:11:43 +00:00
|
|
|
|
|
|
|
val moduleIdentifier = "${rootProject.name}-${project.description}-${project.version}.jar"
|
|
|
|
val decoration = "\n****************************************"
|
|
|
|
val websiteURL = "https://www.spigotmc.org/resources/13932/"
|
|
|
|
|
|
|
|
bukkit {
|
|
|
|
name = "FastAsyncWorldEdit-COMMAND_LINE_INTERFACE_NOT_A_PLUGIN"
|
|
|
|
main = "com.sk89q.worldedit.cli.AccessPoint"
|
|
|
|
apiVersion = decoration +
|
|
|
|
"\n* 404 - Plugin Not Found.\n" +
|
|
|
|
"* You installed the command line interface (CLI) which is not a plugin.\n" +
|
|
|
|
"* Stop your server, delete `$moduleIdentifier`" +
|
|
|
|
" and download the proper one from:\n" +
|
|
|
|
"* $websiteURL\n" +
|
|
|
|
"* (contains `-Bukkit-` instead of `-CLI-` in the name ;)" +
|
|
|
|
decoration
|
|
|
|
version = rootProject.version.toString()
|
|
|
|
website = websiteURL
|
|
|
|
}
|