2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2026-07-20 23:59:28 +00:00
Files
RedisBungee/api/build.gradle.kts
T

80 lines
1.9 KiB
Kotlin
Raw Normal View History

2023-03-23 15:42:59 +04:00
import java.io.ByteArrayOutputStream
plugins {
`java-library`
`maven-publish`
2024-12-23 14:48:22 +04:00
alias(libs.plugins.blossom)
2023-03-23 15:42:59 +04:00
}
dependencies {
2024-04-28 15:29:53 +04:00
api(libs.guava)
api(libs.jedis)
api(libs.okhttp)
2024-12-23 14:42:18 +04:00
api(libs.configurateV3)
2024-04-28 15:29:53 +04:00
api(libs.caffeine)
2023-03-23 15:42:59 +04:00
}
2024-04-28 15:29:53 +04:00
description = "RedisBungee interfaces"
2023-03-23 15:42:59 +04:00
blossom {
replaceToken("@version@", "$version")
// GIT
2024-04-28 15:29:53 +04:00
val commit: String;
2023-03-23 15:42:59 +04:00
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)
}
2024-04-28 15:29:53 +04:00
2023-03-23 15:42:59 +04:00
java {
withJavadocJar()
withSourcesJar()
}
tasks {
// thanks again for paper too
withType<Javadoc> {
val options = options as StandardJavadocDocletOptions
options.use()
options.isDocFilesSubDirs = true
2024-04-28 15:29:53 +04:00
val jedisVersion = libs.jedis.get().version
2024-12-23 14:42:18 +04:00
val configurateVersion = libs.configurateV3.get().version
2024-04-28 15:29:53 +04:00
val guavaVersion = libs.guava.get().version
val adventureVersion = libs.adventure.plain.get().version
2023-03-23 15:42:59 +04:00
options.links(
"https://configurate.aoeu.xyz/$configurateVersion/apidocs/", // configurate
"https://javadoc.io/doc/redis.clients/jedis/$jedisVersion/", // jedis
2024-04-28 15:29:53 +04: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 15:42:59 +04:00
)
2023-03-25 19:46:22 +04:00
2023-03-23 15:42:59 +04:00
}
compileJava {
options.encoding = Charsets.UTF_8.name()
2024-04-28 15:29:53 +04:00
options.release.set(17)
2023-03-23 15:42:59 +04:00
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
processResources {
filteringCharset = Charsets.UTF_8.name()
}
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}