mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-15 15:16:06 +01:00
74 lines
2.2 KiB
Plaintext
74 lines
2.2 KiB
Plaintext
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
import org.gradle.api.internal.HasConvention
|
|
|
|
plugins {
|
|
id("java-library")
|
|
id("net.ltgt.apt-eclipse")
|
|
id("net.ltgt.apt-idea")
|
|
}
|
|
|
|
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")
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
"compile"(project(":worldguard-core"))
|
|
//"compile"(project(":worldguard-libs:bukkit"))
|
|
"api"("com.destroystokyo.paper:paper-api:1.16.1-R0.1-SNAPSHOT")
|
|
"implementation"("io.papermc:paperlib:1.0.4")
|
|
"api"("com.sk89q.worldedit:worldedit-bukkit:${Versions.WORLDEDIT}") { isTransitive = false }
|
|
"implementation"("com.sk89q:commandbook:2.3") { isTransitive = false }
|
|
"implementation"("org.bstats:bstats-bukkit:1.7")
|
|
}
|
|
|
|
tasks.named<Upload>("install") {
|
|
(repositories as HasConvention).convention.getPlugin<MavenRepositoryHandlerConvention>().mavenInstaller {
|
|
pom.whenConfigured {
|
|
dependencies.firstOrNull { dep ->
|
|
dep!!.withGroovyBuilder {
|
|
getProperty("groupId") == "com.destroystokyo.paper" && getProperty("artifactId") == "paper-api"
|
|
}
|
|
}?.withGroovyBuilder {
|
|
setProperty("groupId", "org.bukkit")
|
|
setProperty("artifactId", "bukkit")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.named<Copy>("processResources") {
|
|
filesMatching("plugin.yml") {
|
|
expand("internalVersion" to project.ext["internalVersion"])
|
|
}
|
|
}
|
|
|
|
tasks.named<Jar>("jar") {
|
|
manifest {
|
|
attributes("Implementation-Version" to project.version)
|
|
}
|
|
}
|
|
|
|
tasks.named<ShadowJar>("shadowJar") {
|
|
dependencies {
|
|
relocate("org.bstats", "com.sk89q.worldguard.bukkit.bstats") {
|
|
include(dependency("org.bstats:bstats-bukkit:1.7"))
|
|
}
|
|
relocate ("io.papermc.lib", "com.sk89q.worldguard.bukkit.paperlib") {
|
|
include(dependency("io.papermc:paperlib:1.0.4"))
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.named("assemble").configure {
|
|
dependsOn("shadowJar")
|
|
} |