3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-26 16:12:50 +01:00
Velocity/api/build.gradle.kts
Andrew Steinborn 277be8f9a7 Bump SnakeYAML to the last 1.x version
Fixes #1047. We can't go any higher since that's an API-breaking change. In any event, this will likely disappear in 5.0.0 anyway, because Configurate 4.x now shades SnakeYAML internally.
2023-10-27 16:58:43 -04:00

77 Zeilen
2.2 KiB
Plaintext

plugins {
`java-library`
`maven-publish`
id("velocity-publish")
}
java {
withJavadocJar()
withSourcesJar()
sourceSets["main"].java {
srcDir("src/ap/java")
}
sourceSets["main"].resources {
srcDir("src/ap/resources")
}
}
dependencies {
api(libs.gson)
api(libs.guava)
// DEPRECATED: Will be removed in Velocity Polymer
api("com.moandjiezana.toml:toml4j:0.7.2")
api(platform(libs.adventure.bom))
api("net.kyori:adventure-api")
api("net.kyori:adventure-text-serializer-gson")
api("net.kyori:adventure-text-serializer-legacy")
api("net.kyori:adventure-text-serializer-plain")
api("net.kyori:adventure-text-minimessage")
api("net.kyori:adventure-text-logger-slf4j")
api("net.kyori:adventure-text-serializer-ansi")
api(libs.snakeyaml)
api(libs.slf4j)
api(libs.guice)
api(libs.checker.qual)
api(libs.brigadier)
api(libs.bundles.configurate)
api(libs.caffeine)
}
tasks {
jar {
manifest {
attributes["Automatic-Module-Name"] = "com.velocitypowered.api"
}
}
withType<Javadoc> {
exclude("com/velocitypowered/api/plugin/ap/**")
val o = options as StandardJavadocDocletOptions
o.encoding = "UTF-8"
o.source = "8"
o.links(
"https://www.slf4j.org/apidocs/",
"https://guava.dev/releases/${libs.guava.get().version}/api/docs/",
"https://google.github.io/guice/api-docs/${libs.guice.get().version}/javadoc/",
"https://docs.oracle.com/en/java/javase/11/docs/api/",
"https://jd.advntr.dev/api/${libs.adventure.bom.get().version}/",
"https://javadoc.io/doc/com.github.ben-manes.caffeine/caffeine"
)
// Disable the crazy super-strict doclint tool in Java 8
o.addStringOption("Xdoclint:none", "-quiet")
// Remove "undefined" from search paths when generating javadoc for a non-modular project (JDK-8215291)
if (JavaVersion.current() >= JavaVersion.VERSION_1_9 && JavaVersion.current() < JavaVersion.VERSION_12) {
o.addBooleanOption("-no-module-directories", true)
}
}
}