mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Use cloud-build-logic.javadoc-links for automatic javadoc linking (#395)
This commit is contained in:
1 parent
e32d50c71f
commit
71e7c465d8
1 file changed
+3
-30
+3
-30
@@ -1,28 +1,16 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("carbon.publishing-conventions")
|
id("carbon.publishing-conventions")
|
||||||
|
id("org.incendo.cloud-build-logic.javadoc-links") version "0.0.10"
|
||||||
}
|
}
|
||||||
|
|
||||||
description = "API for interfacing with the CarbonChat Minecraft mod/plugin"
|
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 {
|
dependencies {
|
||||||
// Doesn't add any dependencies, only version constraints
|
// Doesn't add any dependencies, only version constraints
|
||||||
api(platform(libs.adventureBom))
|
api(platform(libs.adventureBom))
|
||||||
docs(platform(libs.adventureBom))
|
|
||||||
|
|
||||||
// Provided by platform
|
// Provided by platform
|
||||||
docs(libs.adventureApi)
|
compileOnlyApi(libs.adventureApi)
|
||||||
compileOnlyApi(libs.adventureTextSerializerPlain)
|
compileOnlyApi(libs.adventureTextSerializerPlain)
|
||||||
compileOnlyApi(libs.adventureTextSerializerLegacy)
|
compileOnlyApi(libs.adventureTextSerializerLegacy)
|
||||||
compileOnlyApi(libs.adventureTextSerializerGson) {
|
compileOnlyApi(libs.adventureTextSerializerGson) {
|
||||||
@@ -30,23 +18,8 @@ dependencies {
|
|||||||
}
|
}
|
||||||
compileOnlyApi(libs.minimessage)
|
compileOnlyApi(libs.minimessage)
|
||||||
|
|
||||||
docs(libs.checkerQual)
|
compileOnlyApi(libs.checkerQual)
|
||||||
|
|
||||||
// Provided by Minecraft
|
// Provided by Minecraft
|
||||||
compileOnlyApi(libs.gson)
|
compileOnlyApi(libs.gson)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<Javadoc> {
|
|
||||||
val options = options as StandardJavadocDocletOptions
|
|
||||||
options.links(
|
|
||||||
"https://jd.advntr.dev/api/${libs.versions.adventure.get()}/",
|
|
||||||
"https://javadoc.io/doc/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