2019-07-11 08:59:23 +08:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
|
|
|
plugins {
|
2021-01-25 18:14:09 +08:00
|
|
|
id("org.spongepowered.gradle.plugin")
|
2019-07-11 08:59:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
applyPlatformAndCoreConfiguration()
|
|
|
|
applyShadowConfiguration()
|
|
|
|
|
2021-01-25 18:14:09 +08: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 08:59:23 +08:00
|
|
|
repositories {
|
|
|
|
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-01-25 18:14:09 +08:00
|
|
|
api(project(":worldedit-core"))
|
|
|
|
api(project(":worldedit-libs:sponge"))
|
|
|
|
api("org.spongepowered:spongeapi:7.1.0")
|
|
|
|
api("org.bstats:bstats-sponge:1.7")
|
|
|
|
testImplementation("org.mockito:mockito-core:1.9.0-rc1")
|
2019-07-11 08:59:23 +08:00
|
|
|
}
|
|
|
|
|
2021-02-23 14:05:23 +08:00
|
|
|
addJarManifest(WorldEditKind.Mod, includeClasspath = true)
|
2019-07-11 08:59:23 +08:00
|
|
|
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
|
|
dependencies {
|
|
|
|
relocate ("org.bstats", "com.sk89q.worldedit.sponge.bstats") {
|
2020-01-24 20:38:52 +08:00
|
|
|
include(dependency("org.bstats:bstats-sponge:1.7"))
|
2019-07-11 08:59:23 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (project.hasProperty("signing")) {
|
|
|
|
apply(plugin = "signing")
|
|
|
|
|
|
|
|
configure<SigningExtension> {
|
|
|
|
sign("shadowJar")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named("build").configure {
|
|
|
|
dependsOn("signShadowJar")
|
|
|
|
}
|
2020-02-11 09:11:08 +08:00
|
|
|
}
|