Link to KDoc/Javadoc in their respective counterpart overview pages

This commit adds a link in the package-overview pages of KDoc and
Javadoc, pointing to the other documentation's own page.

In order for local tests to work, the build has been slightly modified
to align with the directory structure in the distributed documentation
zip (and consequently with that of the deployed documentation website).

Lastly, the javadoc build was fixed to include the `overview.html` again
in the resulting HTML index, since this is where the KDoc link is added.

See gh-28055
Closes gh-31587
This commit is contained in:
Simon Baslé 2023-11-10 11:36:27 +01:00 committed by GitHub
parent 8a7144ba42
commit a97ecf7a29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -27,7 +27,8 @@ javadoc {
author = true
header = rootProject.description
use = true
overview = "framework-docs/src/docs/api/overview.html"
overview = "$rootProject.rootDir/framework-docs/src/docs/api/overview.html"
destinationDir = file("${project.buildDir}/docs/javadoc-api")
splitIndex = true
links(rootProject.ext.javadocLinks)
addBooleanOption('Xdoclint:syntax,reference', true) // only check syntax and reference with doclint
@ -51,7 +52,8 @@ rootProject.tasks.dokkaHtmlMultiModule.configure {
tasks.named("javadoc")
}
moduleName.set("spring-framework")
outputDirectory.set(project.file("$buildDir/docs/kdoc"))
outputDirectory.set(project.file("$buildDir/docs/kdoc-api"))
includes.from("$rootProject.rootDir/framework-docs/src/docs/api/dokka-overview.md")
}
/**

View File

@ -0,0 +1,2 @@
# All Modules
_See also the <a href="../javadoc-api/" target="_blank">Java API documentation (Javadoc)</a>._

View File

@ -1,7 +1,10 @@
<html>
<body>
<p>
This is the public API documentation for the <a href="https://github.com/spring-projects/spring-framework" target="_top">Spring Framework</a>.
This is the public Java API documentation (Javadoc) for the <a href="https://github.com/spring-projects/spring-framework" target="_top">Spring Framework</a>.
</p>
<p><em>
See also the <a href="../kdoc-api/" target="_blank">Kotlin API documentation (KDoc)</a>.
</em></p>
</body>
</html>