Browse Source

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
pull/30534/merge
Simon Baslé 11 months ago committed by GitHub
parent
commit
a97ecf7a29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      framework-api/framework-api.gradle
  2. 2
      framework-docs/src/docs/api/dokka-overview.md
  3. 5
      framework-docs/src/docs/api/overview.html

6
framework-api/framework-api.gradle

@ -27,7 +27,8 @@ javadoc { @@ -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 { @@ -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")
}
/**

2
framework-docs/src/docs/api/dokka-overview.md

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

5
framework-docs/src/docs/api/overview.html

@ -1,7 +1,10 @@ @@ -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>

Loading…
Cancel
Save