WorldEdit/worldedit-sponge/build.gradle.kts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
2.3 KiB
Plaintext
Raw Normal View History

2019-07-11 08:59:23 +08:00
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.spongepowered.gradle.plugin.config.PluginLoaders
import org.spongepowered.plugin.metadata.model.PluginDependency
2019-07-11 08:59:23 +08:00
plugins {
id("org.spongepowered.gradle.plugin")
id("org.spongepowered.gradle.vanilla")
2019-07-11 08:59:23 +08:00
}
applyPlatformAndCoreConfiguration(javaRelease = 17)
2019-07-11 08:59:23 +08:00
applyShadowConfiguration()
repositories {
mavenCentral()
}
minecraft {
2023-06-08 20:00:27 +08:00
version("1.20")
}
2023-06-08 20:00:27 +08:00
val spongeApiVersion = "11.0.0-SNAPSHOT";
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)
}
}
2019-07-11 08:59:23 +08:00
}
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")
implementation("org.bstats:bstats-sponge:3.0.0")
implementation("it.unimi.dsi:fastutil")
testImplementation("org.mockito:mockito-core:${Versions.MOCKITO}")
}
configure<BasePluginExtension> {
archivesName.set("${project.name}-api$spongeApiVersion")
2019-07-11 08:59:23 +08:00
}
addJarManifest(WorldEditKind.Mod, includeClasspath = true)
2019-07-11 08:59:23 +08:00
tasks.named<ShadowJar>("shadowJar") {
dependencies {
include(dependency("org.bstats:"))
include(dependency("org.antlr:antlr4-runtime"))
2019-07-11 08:59:23 +08:00
relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4")
relocate("org.bstats", "com.sk89q.worldedit.sponge.bstats")
2019-07-11 08:59:23 +08:00
}
}
tasks.named("assemble").configure {
dependsOn("shadowJar")
}