From e3cb4fba43b43f575e315f8bc2fd2ebf079d5326 Mon Sep 17 00:00:00 2001 From: Wolfgang Mathurin Date: Fri, 8 May 2026 11:32:10 -0700 Subject: [PATCH] Migrate doc generation from Javadoc to Dokka Replace the raw javadoc invocation in tools/generate_doc.sh with ./gradlew dokkaHtmlMultiModule. Add the Dokka Gradle plugin (1.9.20) to the buildscript classpath, apply it at the root for multi-module aggregation, and to all :libs:* subprojects for per-module docs. Output directory remains doc/ at the repo root. --- build.gradle.kts | 14 ++++++++++++++ tools/generate_doc.sh | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index b18845c278..df5c765377 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,6 +15,7 @@ buildscript { classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.20") classpath("org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.3.21") classpath("org.jacoco:org.jacoco.core:0.8.14") + classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.9.20") } } @@ -32,3 +33,16 @@ allprojects { } } } + +apply(plugin = "org.jetbrains.dokka") + +subprojects { + if (path.startsWith(":libs:")) { + apply(plugin = "org.jetbrains.dokka") + } +} + +tasks.named("dokkaHtmlMultiModule") { + moduleName.set("SalesforceSDK 14.0 API") + outputDirectory.set(rootDir.resolve("doc")) +} diff --git a/tools/generate_doc.sh b/tools/generate_doc.sh index 9072328541..a998c67359 100755 --- a/tools/generate_doc.sh +++ b/tools/generate_doc.sh @@ -3,5 +3,5 @@ if [ ! -d "external" ] then echo "You must run this tool from the root directory of your repo clone" else - javadoc -d doc -author -version -verbose -use -doctitle "SalesforceSDK 14.0 API" -sourcepath "libs/SalesforceAnalytics/src:libs/SalesforceSDK/src:libs/SmartStore/src:libs/MobileSync/src:libs/SalesforceHybrid/src:libs/SalesforceReact/src" -subpackages com + ./gradlew dokkaHtmlMultiModule fi