2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-11-05 12:58:02 +00:00
RedisBungee/RedisBungee-API/build.gradle.kts

87 lines
2.2 KiB
Plaintext
Raw Normal View History

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"
}
dependencies {
api(libs.guava)
api(libs.jedis)
api(libs.okhttp)
api(libs.configurate)
api(libs.caffeine)
api(libs.adventure.api)
api(libs.adventure.gson)
api(libs.adventure.legacy)
api(libs.adventure.plain)
api(libs.adventure.miniMessage)
2023-03-23 11:42:59 +00:00
}
description = "RedisBungee interfaces"
2023-03-23 11:42:59 +00:00
blossom {
replaceToken("@version@", "$version")
// GIT
2024-04-12 18:01:53 +00:00
val commit: String;
2023-03-23 11:42:59 +00: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)
2023-09-12 12:04:27 +00:00
replaceToken("@build_date@", "${Instant.now().epochSecond}")
2023-03-23 11:42:59 +00:00
}
2024-04-12 18:01:53 +00:00
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
val jedisVersion = libs.jedis.get().version
val configurateVersion = libs.configurate.get().version
val guavaVersion = libs.guava.get().version
val adventureVersion = libs.guava.get().version
2023-03-23 11:42:59 +00:00
options.links(
"https://configurate.aoeu.xyz/$configurateVersion/apidocs/", // configurate
"https://javadoc.io/doc/redis.clients/jedis/$jedisVersion/", // jedis
"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()
2024-04-12 18:37:02 +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"])
}
}
}