2019-07-30 05:25:13 +02:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
|
|
|
plugins {
|
2021-06-12 14:12:22 +02:00
|
|
|
`java-library`
|
2019-07-30 05:25:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
applyPlatformAndCoreConfiguration()
|
|
|
|
applyShadowConfiguration()
|
|
|
|
|
|
|
|
repositories {
|
2019-06-15 05:12:31 +02:00
|
|
|
maven {
|
|
|
|
name = "paper"
|
2023-03-12 16:50:21 +01:00
|
|
|
url = uri("https://repo.papermc.io/repository/maven-public/")
|
2019-07-30 05:25:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-13 06:11:32 +02:00
|
|
|
configurations {
|
|
|
|
compileClasspath.get().extendsFrom(create("shadeOnly"))
|
|
|
|
}
|
|
|
|
|
2019-07-30 05:25:13 +02:00
|
|
|
dependencies {
|
2021-06-12 14:12:22 +02:00
|
|
|
"api"(project(":worldguard-core"))
|
2022-12-09 13:23:57 +01:00
|
|
|
"compileOnly"("io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT")
|
|
|
|
"runtimeOnly"("org.spigotmc:spigot-api:1.19.3-R0.1-SNAPSHOT") {
|
2021-06-12 14:12:22 +02:00
|
|
|
exclude("junit", "junit")
|
|
|
|
}
|
2019-12-19 21:18:53 +01:00
|
|
|
"api"("com.sk89q.worldedit:worldedit-bukkit:${Versions.WORLDEDIT}") { isTransitive = false }
|
2020-07-17 07:11:12 +02:00
|
|
|
"implementation"("com.google.guava:guava:${Versions.GUAVA}")
|
2021-06-13 06:11:32 +02:00
|
|
|
"compileOnly"("com.sk89q:commandbook:2.3") { isTransitive = false }
|
2023-01-05 12:28:13 +01:00
|
|
|
"shadeOnly"("io.papermc:paperlib:1.0.8")
|
2023-03-12 16:50:21 +01:00
|
|
|
"shadeOnly"("org.bstats:bstats-bukkit:3.0.1")
|
2019-07-30 05:25:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<Copy>("processResources") {
|
2020-11-03 20:42:39 +01:00
|
|
|
val internalVersion = project.ext["internalVersion"]
|
|
|
|
inputs.property("internalVersion", internalVersion)
|
2019-07-30 05:25:13 +02:00
|
|
|
filesMatching("plugin.yml") {
|
2020-11-03 20:42:39 +01:00
|
|
|
expand("internalVersion" to internalVersion)
|
2019-07-30 05:25:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<Jar>("jar") {
|
2020-11-03 20:42:39 +01:00
|
|
|
val projectVersion = project.version
|
|
|
|
inputs.property("projectVersion", projectVersion)
|
2019-07-30 05:25:13 +02:00
|
|
|
manifest {
|
2020-11-03 20:42:39 +01:00
|
|
|
attributes("Implementation-Version" to projectVersion)
|
2019-07-30 05:25:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
2021-06-13 06:11:32 +02:00
|
|
|
configurations = listOf(project.configurations["shadeOnly"], project.configurations["runtimeClasspath"])
|
|
|
|
|
2019-07-30 05:25:13 +02:00
|
|
|
dependencies {
|
2021-06-12 14:12:22 +02:00
|
|
|
include(dependency(":worldguard-core"))
|
2019-07-30 05:25:13 +02:00
|
|
|
relocate("org.bstats", "com.sk89q.worldguard.bukkit.bstats") {
|
2021-06-13 11:31:25 +02:00
|
|
|
include(dependency("org.bstats:"))
|
2019-07-30 05:25:13 +02:00
|
|
|
}
|
2019-06-15 05:12:31 +02:00
|
|
|
relocate ("io.papermc.lib", "com.sk89q.worldguard.bukkit.paperlib") {
|
2021-02-10 21:21:03 +01:00
|
|
|
include(dependency("io.papermc:paperlib"))
|
2019-06-15 05:12:31 +02:00
|
|
|
}
|
2021-02-06 17:10:04 +01:00
|
|
|
relocate ("co.aikar.timings.lib", "com.sk89q.worldguard.bukkit.timingslib") {
|
2021-02-10 21:21:03 +01:00
|
|
|
include(dependency("co.aikar:minecraft-timings"))
|
2021-02-06 17:10:04 +01:00
|
|
|
}
|
2019-07-30 05:25:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.named("assemble").configure {
|
|
|
|
dependsOn("shadowJar")
|
2020-07-17 03:41:08 +02:00
|
|
|
}
|