mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
link external javadoc for dependencies
This commit is contained in:
1 file changed
+30
-2
+30
-2
@@ -4,12 +4,25 @@ plugins {
|
||||
|
||||
description = "API for interfacing with the CarbonChat Minecraft mod/plugin"
|
||||
|
||||
val docs: Configuration by configurations.creating {
|
||||
attributes {
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL))
|
||||
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.SOURCES))
|
||||
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage.JAVA_RUNTIME))
|
||||
}
|
||||
}
|
||||
configurations.compileOnlyApi {
|
||||
extendsFrom(docs)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Doesn't add any dependencies, only version constraints
|
||||
api(platform(libs.adventureBom))
|
||||
docs(platform(libs.adventureBom))
|
||||
|
||||
// Provided by platform
|
||||
compileOnlyApi(libs.adventureApi)
|
||||
docs(libs.adventureApi)
|
||||
compileOnlyApi(libs.adventureTextSerializerPlain)
|
||||
compileOnlyApi(libs.adventureTextSerializerLegacy)
|
||||
compileOnlyApi(libs.adventureTextSerializerGson) {
|
||||
@@ -17,8 +30,23 @@ dependencies {
|
||||
}
|
||||
compileOnlyApi(libs.minimessage)
|
||||
|
||||
compileOnlyApi(libs.checkerQual)
|
||||
docs(libs.checkerQual)
|
||||
|
||||
// Provided by Minecraft
|
||||
compileOnlyApi(libs.gson)
|
||||
}
|
||||
|
||||
tasks.withType<Javadoc> {
|
||||
val options = options as StandardJavadocDocletOptions
|
||||
options.links(
|
||||
"https://jd.advntr.dev/api/${libs.versions.adventure.get()}/",
|
||||
"https://javadocs.dev/org.checkerframework/checker-qual/${libs.versions.checkerQual.get()}/"
|
||||
)
|
||||
inputs.files(docs).ignoreEmptyDirectories().withPropertyName(docs.name + "-configuration")
|
||||
doFirst {
|
||||
options.addStringOption(
|
||||
"sourcepath",
|
||||
docs.resolvedConfiguration.files.joinToString(separator = File.pathSeparator, transform = File::getPath)
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user