From a97ecf7a299760306012d28e9110f6caf3a18720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Basl=C3=A9?= Date: Fri, 10 Nov 2023 11:36:27 +0100 Subject: [PATCH] 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 --- framework-api/framework-api.gradle | 6 ++++-- framework-docs/src/docs/api/dokka-overview.md | 2 ++ framework-docs/src/docs/api/overview.html | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 framework-docs/src/docs/api/dokka-overview.md diff --git a/framework-api/framework-api.gradle b/framework-api/framework-api.gradle index e4919ed34c..b39133c5c8 100644 --- a/framework-api/framework-api.gradle +++ b/framework-api/framework-api.gradle @@ -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") } /** diff --git a/framework-docs/src/docs/api/dokka-overview.md b/framework-docs/src/docs/api/dokka-overview.md new file mode 100644 index 0000000000..e68dd557ff --- /dev/null +++ b/framework-docs/src/docs/api/dokka-overview.md @@ -0,0 +1,2 @@ +# All Modules +_See also the Java API documentation (Javadoc)._ \ No newline at end of file diff --git a/framework-docs/src/docs/api/overview.html b/framework-docs/src/docs/api/overview.html index e6086dc458..6e98d58b9c 100644 --- a/framework-docs/src/docs/api/overview.html +++ b/framework-docs/src/docs/api/overview.html @@ -1,7 +1,10 @@

-This is the public API documentation for the Spring Framework. +This is the public Java API documentation (Javadoc) for the Spring Framework.

+

+See also the Kotlin API documentation (KDoc). +