2023-09-12 12:04:27 +00:00
|
|
|
import java.time.Instant
|
2023-03-23 11:42:59 +00:00
|
|
|
import java.io.ByteArrayOutputStream
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
`java-library`
|
|
|
|
`maven-publish`
|
|
|
|
id("net.kyori.blossom") version "1.2.0"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-08-13 13:22:54 +00:00
|
|
|
val jedisVersion = "4.4.3"
|
2023-03-23 11:42:59 +00:00
|
|
|
val configurateVersion = "3.7.3"
|
|
|
|
val guavaVersion = "31.1-jre"
|
2023-09-10 15:29:11 +00:00
|
|
|
val okHttpVersion = "2.7.5"
|
|
|
|
val caffeineVersion = "3.1.8"
|
|
|
|
val adventureVersion = "4.14.0"
|
2023-03-23 11:42:59 +00:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
api("com.google.guava:guava:$guavaVersion")
|
|
|
|
api("redis.clients:jedis:$jedisVersion")
|
2023-09-10 15:29:11 +00:00
|
|
|
api("com.squareup.okhttp:okhttp:$okHttpVersion")
|
2023-03-23 11:42:59 +00:00
|
|
|
api("org.spongepowered:configurate-yaml:$configurateVersion")
|
2023-09-10 15:29:11 +00:00
|
|
|
api("com.github.ben-manes.caffeine:caffeine:$caffeineVersion")
|
2023-09-10 14:15:01 +00:00
|
|
|
|
2023-09-10 15:29:11 +00:00
|
|
|
api("net.kyori:adventure-api:$adventureVersion")
|
|
|
|
api("net.kyori:adventure-text-serializer-gson:$adventureVersion")
|
|
|
|
api("net.kyori:adventure-text-serializer-legacy:$adventureVersion")
|
|
|
|
api("net.kyori:adventure-text-serializer-plain:$adventureVersion")
|
|
|
|
api("net.kyori:adventure-text-minimessage:$adventureVersion")
|
2023-09-10 14:15:01 +00:00
|
|
|
|
2023-03-23 11:42:59 +00:00
|
|
|
}
|
|
|
|
|
2023-09-10 15:29:11 +00:00
|
|
|
description = "RedisBungee interfaces"
|
2023-03-23 11:42:59 +00:00
|
|
|
|
|
|
|
blossom {
|
|
|
|
replaceToken("@version@", "$version")
|
|
|
|
// GIT
|
|
|
|
var commit: String = ""
|
|
|
|
val commitStdout = ByteArrayOutputStream()
|
|
|
|
rootProject.exec {
|
|
|
|
standardOutput = commitStdout
|
|
|
|
commandLine("git", "rev-parse", "HEAD")
|
|
|
|
}
|
|
|
|
commit = "$commitStdout".replace("\n", "") // for some reason it adds new line so remove it.
|
|
|
|
commitStdout.close()
|
|
|
|
replaceToken("@git_commit@", commit)
|
2023-09-12 12:04:27 +00:00
|
|
|
replaceToken("@build_date@", "${Instant.now().epochSecond}")
|
2023-03-23 11:42:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
withJavadocJar()
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks {
|
|
|
|
// thanks again for paper too
|
|
|
|
withType<Javadoc> {
|
|
|
|
val options = options as StandardJavadocDocletOptions
|
|
|
|
options.use()
|
|
|
|
options.isDocFilesSubDirs = true
|
|
|
|
options.links(
|
|
|
|
"https://configurate.aoeu.xyz/$configurateVersion/apidocs/", // configurate
|
|
|
|
"https://javadoc.io/doc/redis.clients/jedis/$jedisVersion/", // jedis
|
2023-09-10 15:29:11 +00:00
|
|
|
"https://guava.dev/releases/$guavaVersion/api/docs/", // guava
|
|
|
|
"https://javadoc.io/doc/com.github.ben-manes.caffeine/caffeine",
|
|
|
|
"https://jd.advntr.dev/api/$adventureVersion"
|
|
|
|
|
2023-03-23 11:42:59 +00:00
|
|
|
)
|
2023-03-25 15:46:22 +00:00
|
|
|
|
2023-03-23 11:42:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
compileJava {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
2023-08-30 13:30:17 +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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
create<MavenPublication>("maven") {
|
|
|
|
from(components["java"])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|