WorldEdit/worldedit-sponge/build.gradle.kts
Octavia Togami fb50324767
Update worldedit-sponge to API 8 (#1771)
* Sponge 8 work

Remove text adapter

Debugging the bugs out

* Resolve compiling for latest Sponge

* Update for latest SpongeAPI 8 snapshots

* Fixed a few issues with Sponge8 WorldEdit. Command completions are still broken.

* Resolve completions

* Bump to Sponge API 8 release

* Remove VALIDATION as a supported SideEffect on Sponge for now.

* Append Sponge API version to archive name

* Implement regeneration on Sponge; currently hangs due to a Sponge bug.

* Fixed typo

* Fix commands without permissions and version handling

* Make changes from PR comments and re-add bStats

Co-authored-by: Madeline Miller <mnmiller1@me.com>
2022-01-29 18:02:42 +00:00

84 lines
2.5 KiB
Plaintext

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.spongepowered.gradle.plugin.config.PluginLoaders
import org.spongepowered.plugin.metadata.model.PluginDependency
plugins {
id("org.spongepowered.gradle.plugin")
id("org.spongepowered.gradle.vanilla")
}
applyPlatformAndCoreConfiguration()
applyShadowConfiguration()
repositories {
mavenCentral()
}
minecraft {
version("1.16.5")
}
val spongeApiVersion = "8.0.0";
sponge {
apiVersion(spongeApiVersion)
license("GPL-3.0-or-later")
plugin("worldedit") {
loader {
name(PluginLoaders.JAVA_PLAIN)
version("1.0")
}
displayName("WorldEdit")
version(project.ext["internalVersion"].toString())
entrypoint("com.sk89q.worldedit.sponge.SpongeWorldEdit")
description("WorldEdit is an easy-to-use in-game world editor for Minecraft, supporting both single- and multi-player.")
links {
homepage("https://enginehub.org/worldedit/")
source("https://github.com/EngineHub/WorldEdit")
issues("https://github.com/EngineHub/WorldEdit/issues")
}
contributor("EngineHub") {
description("Various members of the EngineHub team")
}
dependency("spongeapi") {
loadOrder(PluginDependency.LoadOrder.AFTER)
optional(false)
}
}
}
dependencies {
api(project(":worldedit-core"))
api(project(":worldedit-libs:sponge"))
implementation(platform("org.apache.logging.log4j:log4j-bom:${Versions.LOG4J}") {
because("Sponge 8 (will?) provides Log4J")
})
api("org.apache.logging.log4j:log4j-api")
api("org.bstats:bstats-sponge:3.0.0")
testImplementation("org.mockito:mockito-core:${Versions.MOCKITO}")
}
configure<BasePluginExtension> {
archivesName.set("${project.name}-api$spongeApiVersion")
}
addJarManifest(WorldEditKind.Mod, includeClasspath = true)
tasks.named<ShadowJar>("shadowJar") {
dependencies {
relocate("org.bstats", "com.sk89q.worldedit.sponge.bstats") {
include(dependency("org.bstats:"))
}
include(dependency(":worldedit-core"))
relocate("org.antlr.v4", "com.sk89q.worldedit.sponge.antlr4")
include(dependency("org.antlr:antlr4-runtime"))
relocate("it.unimi.dsi.fastutil", "com.sk89q.worldedit.sponge.fastutil") {
include(dependency("it.unimi.dsi:fastutil"))
}
}
}
tasks.named("assemble").configure {
dependsOn("shadowJar")
}