2023-03-23 11:42:59 +00:00
|
|
|
plugins {
|
|
|
|
`java-library`
|
|
|
|
`maven-publish`
|
|
|
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
|
|
|
id("xyz.jpenilla.run-velocity") version "2.0.0"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
api(project(":RedisBungee-API")) {
|
|
|
|
// Since velocity already includes guava / configurate exlude them
|
|
|
|
exclude("com.google.guava", "guava")
|
|
|
|
exclude("com.google.code.gson", "gson")
|
|
|
|
exclude("org.spongepowered", "configurate-yaml")
|
2023-09-10 14:15:01 +00:00
|
|
|
// exclude also adventure api
|
|
|
|
exclude("net.kyori", "adventure-api")
|
|
|
|
exclude("net.kyori", "adventure-text-serializer-gson")
|
|
|
|
exclude("net.kyori", "adventure-text-serializer-legacy")
|
|
|
|
exclude("net.kyori", "adventure-text-serializer-plain")
|
|
|
|
exclude("net.kyori", "adventure-text-minimessage")
|
2023-03-23 11:42:59 +00:00
|
|
|
}
|
2024-04-13 19:57:00 +00:00
|
|
|
compileOnly(libs.platform.velocity)
|
|
|
|
annotationProcessor(libs.platform.velocity)
|
2024-04-14 01:54:08 +00:00
|
|
|
implementation(project(":RedisBungee-Commands"))
|
2024-04-13 19:57:00 +00:00
|
|
|
implementation(libs.acf.velocity)
|
|
|
|
|
2023-03-23 11:42:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
description = "RedisBungee Velocity implementation"
|
|
|
|
|
|
|
|
java {
|
|
|
|
withJavadocJar()
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
withType<Javadoc> {
|
2023-03-25 15:46:22 +00:00
|
|
|
dependsOn(project(":RedisBungee-API").getTasksByName("javadoc", false))
|
2023-03-23 11:42:59 +00:00
|
|
|
val options = options as StandardJavadocDocletOptions
|
|
|
|
options.use()
|
|
|
|
options.isDocFilesSubDirs = true
|
|
|
|
options.links(
|
|
|
|
"https://jd.papermc.io/velocity/3.0.0/", // velocity api
|
|
|
|
)
|
2023-03-25 15:46:22 +00:00
|
|
|
val apiDocs = File(rootProject.projectDir, "RedisBungee-API/build/docs/javadoc")
|
2024-04-12 18:37:02 +00:00
|
|
|
options.linksOffline("https://ci.limework.net/RedisBungee/RedisBungee-API/build/docs/javadoc", apiDocs.path)
|
2023-03-23 11:42:59 +00:00
|
|
|
}
|
|
|
|
runVelocity {
|
2024-04-12 15:33:47 +00:00
|
|
|
velocityVersion("3.3.0-SNAPSHOT")
|
2024-04-12 18:03:45 +00:00
|
|
|
environment["REDISBUNGEE_PROXY_ID"] = "velocity-1"
|
2023-03-23 11:42:59 +00:00
|
|
|
}
|
|
|
|
compileJava {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
2024-04-12 15:33:47 +00:00
|
|
|
options.release.set(17)
|
2023-03-23 11:42:59 +00:00
|
|
|
}
|
|
|
|
javadoc {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
|
|
|
}
|
|
|
|
processResources {
|
|
|
|
filteringCharset = Charsets.UTF_8.name()
|
|
|
|
}
|
|
|
|
shadowJar {
|
|
|
|
relocate("redis.clients.jedis", "com.imaginarycode.minecraft.redisbungee.internal.jedis")
|
|
|
|
relocate("redis.clients.util", "com.imaginarycode.minecraft.redisbungee.internal.jedisutil")
|
|
|
|
relocate("org.apache.commons.pool", "com.imaginarycode.minecraft.redisbungee.internal.commonspool")
|
|
|
|
relocate("com.squareup.okhttp", "com.imaginarycode.minecraft.redisbungee.internal.okhttp")
|
|
|
|
relocate("okio", "com.imaginarycode.minecraft.redisbungee.internal.okio")
|
|
|
|
relocate("org.json", "com.imaginarycode.minecraft.redisbungee.internal.json")
|
2024-04-12 18:37:02 +00:00
|
|
|
relocate("com.github.benmanes.caffeine", "com.imaginarycode.minecraft.redisbungee.internal.caffeine")
|
2024-04-13 19:57:00 +00:00
|
|
|
// acf shade
|
|
|
|
relocate("co.aikar.commands", "com.imaginarycode.minecraft.redisbungee.internal.acf.commands")
|
2023-03-23 11:42:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
create<MavenPublication>("maven") {
|
|
|
|
from(components["java"])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|