2019-07-11 00:59:23 +00:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
|
|
|
plugins {
|
2021-01-25 10:14:09 +00:00
|
|
|
id("org.spongepowered.gradle.plugin")
|
2019-07-11 00:59:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
applyPlatformAndCoreConfiguration()
|
|
|
|
applyShadowConfiguration()
|
|
|
|
|
2021-01-25 10:14:09 +00:00
|
|
|
// I can't believe sponge sets this in a base plugin with no opt-out
|
|
|
|
convention.getPlugin(JavaPluginConvention::class.java).apply {
|
|
|
|
setSourceCompatibility(null)
|
|
|
|
setTargetCompatibility(null)
|
|
|
|
}
|
|
|
|
|
2019-07-11 00:59:23 +00:00
|
|
|
repositories {
|
|
|
|
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-01-25 10:14:09 +00:00
|
|
|
api(project(":worldedit-core"))
|
|
|
|
api(project(":worldedit-libs:sponge"))
|
2021-03-29 13:29:16 +00:00
|
|
|
api("org.spongepowered:spongeapi:7.1.0") {
|
|
|
|
exclude(group = "org.slf4j", module = "slf4j-api")
|
|
|
|
}
|
|
|
|
implementation(enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.8.1") {
|
|
|
|
because("Sponge 8 provides Log4J at 2.8.1")
|
|
|
|
})
|
|
|
|
api("org.apache.logging.log4j:log4j-api")
|
2021-01-25 10:14:09 +00:00
|
|
|
api("org.bstats:bstats-sponge:1.7")
|
2024-05-19 14:20:21 +00:00
|
|
|
testImplementation("org.mockito:mockito-core:5.12.0")
|
2019-07-11 00:59:23 +00:00
|
|
|
}
|
|
|
|
|
2019-12-16 11:00:12 +00:00
|
|
|
<<<<<<< HEAD
|
2021-02-25 21:58:17 +00:00
|
|
|
addJarManifest(WorldEditKind.Mod, includeClasspath = true)
|
2019-12-16 11:00:12 +00:00
|
|
|
=======
|
|
|
|
tasks.named<Jar>("jar") {
|
|
|
|
manifest {
|
|
|
|
attributes("Class-Path" to CLASSPATH,
|
|
|
|
"WorldEdit-Version" to project.version)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
>>>>>>> 18a55bc14... Add new experimental snapshot API (#524)
|
2019-07-11 00:59:23 +00:00
|
|
|
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
|
|
dependencies {
|
|
|
|
relocate ("org.bstats", "com.sk89q.worldedit.sponge.bstats") {
|
|
|
|
include(dependency("org.bstats:bstats-sponge:1.5"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (project.hasProperty("signing")) {
|
|
|
|
apply(plugin = "signing")
|
|
|
|
|
|
|
|
configure<SigningExtension> {
|
|
|
|
sign("shadowJar")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named("build").configure {
|
|
|
|
dependsOn("signShadowJar")
|
|
|
|
}
|
2020-02-11 01:11:08 +00:00
|
|
|
}
|