mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-15 07:05:32 +01:00
fb9705e4f0
Getting ready for java 17.
79 lines
2.3 KiB
Plaintext
79 lines
2.3 KiB
Plaintext
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
plugins {
|
|
`java-library`
|
|
}
|
|
|
|
applyPlatformAndCoreConfiguration()
|
|
applyShadowConfiguration()
|
|
|
|
repositories {
|
|
maven {
|
|
name = "paper"
|
|
url = uri("https://papermc.io/repo/repository/maven-public/")
|
|
}
|
|
maven {
|
|
name = "bstats"
|
|
url = uri("https://repo.codemc.org/repository/maven-public")
|
|
}
|
|
maven {
|
|
name = "aikar-timings"
|
|
url = uri("https://repo.aikar.co/nexus/content/groups/aikar/")
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
compileClasspath.get().extendsFrom(create("shadeOnly"))
|
|
}
|
|
|
|
dependencies {
|
|
"api"(project(":worldguard-core"))
|
|
"compileOnly"("io.papermc.paper:paper-api:1.17-R0.1-SNAPSHOT")
|
|
"runtimeOnly"("org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT") {
|
|
exclude("junit", "junit")
|
|
}
|
|
"api"("com.sk89q.worldedit:worldedit-bukkit:${Versions.WORLDEDIT}") { isTransitive = false }
|
|
"implementation"("com.google.guava:guava:${Versions.GUAVA}")
|
|
"compileOnly"("com.sk89q:commandbook:2.3") { isTransitive = false }
|
|
"shadeOnly"("io.papermc:paperlib:1.0.7")
|
|
"shadeOnly"("org.bstats:bstats-bukkit:2.1.0")
|
|
"shadeOnly"("co.aikar:minecraft-timings:1.0.4")
|
|
}
|
|
|
|
tasks.named<Copy>("processResources") {
|
|
val internalVersion = project.ext["internalVersion"]
|
|
inputs.property("internalVersion", internalVersion)
|
|
filesMatching("plugin.yml") {
|
|
expand("internalVersion" to internalVersion)
|
|
}
|
|
}
|
|
|
|
tasks.named<Jar>("jar") {
|
|
val projectVersion = project.version
|
|
inputs.property("projectVersion", projectVersion)
|
|
manifest {
|
|
attributes("Implementation-Version" to projectVersion)
|
|
}
|
|
}
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
configurations = listOf(project.configurations["shadeOnly"], project.configurations["runtimeClasspath"])
|
|
|
|
dependencies {
|
|
include(dependency(":worldguard-core"))
|
|
relocate("org.bstats", "com.sk89q.worldguard.bukkit.bstats") {
|
|
include(dependency("org.bstats:"))
|
|
}
|
|
relocate ("io.papermc.lib", "com.sk89q.worldguard.bukkit.paperlib") {
|
|
include(dependency("io.papermc:paperlib"))
|
|
}
|
|
relocate ("co.aikar.timings.lib", "com.sk89q.worldguard.bukkit.timingslib") {
|
|
include(dependency("co.aikar:minecraft-timings"))
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.named("assemble").configure {
|
|
dependsOn("shadowJar")
|
|
}
|