Skip to content

Migrate doc generation to Dokka v2#2887

Open
wmathurin wants to merge 3 commits into
forcedotcom:devfrom
wmathurin:feature/migrate-doc-generation-to-dokka
Open

Migrate doc generation to Dokka v2#2887
wmathurin wants to merge 3 commits into
forcedotcom:devfrom
wmathurin:feature/migrate-doc-generation-to-dokka

Conversation

@wmathurin
Copy link
Copy Markdown
Contributor

@wmathurin wmathurin commented May 15, 2026

Why Dokka HTML instead of Javadoc format

The old workflow ran javadoc -subpackages com across all six source paths, producing a single flat site. Dokka v2's dokka-javadoc plugin generates per-module independent Javadoc sites — there is no built-in aggregation for the Javadoc format. A Copy-task merge is lossy (alphabetical index files and allclasses.html get overwritten per-module). The HTML format is the only Dokka format with proper multi-module aggregation, so doc/index.html remains a complete, cross-linked API reference.

wmathurin added 2 commits May 8, 2026 11:32
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.
- Bump dokka-gradle-plugin from 1.9.20 to 2.0.0
- Opt in to Dokka v2 mode via gradle.properties
- Replace subprojects{} apply + dokkaHtmlMultiModule task (v1 API)
  with DokkaExtension DSL + dokka() dependencies (v2 API)
- Apply org.jetbrains.dokka to each lib subproject directly so Dokka
  can resolve their source sets for aggregation
- Switch output format from Javadoc to unified Dokka HTML so that
  doc/index.html is a proper multi-module site (Javadoc format does
  not support true multi-module aggregation in v2)
- Update generate_doc.sh: dokkaHtmlMultiModule -> dokkaGeneratePublicationHtml
@wmathurin wmathurin changed the title Migrate doc generation from Dokka v1 to v2 (HTML format) Migrate doc generation to Dokka v2 May 15, 2026
@wmathurin
Copy link
Copy Markdown
Contributor Author

wmathurin commented May 15, 2026

Before

Screenshot 2026-05-15 at 1 26 31 PM

After

Screenshot 2026-05-15 at 1 26 51 PM

NB: javadoc did not document Kotlin classes

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

1 Warning
⚠️ libs/SmartStore/build.gradle.kts#L23 - A newer version of com.google.android.material:material than 1.13.0 is available: 1.14.0

Generated by 🚫 Danger

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

10 Warnings
⚠️ libs/SalesforceSDK/build.gradle.kts#L23 - A newer version of com.google.firebase:firebase-messaging than 25.0.1 is available: 25.0.2
⚠️ libs/SalesforceSDK/build.gradle.kts#L30 - A newer version of com.google.android.material:material than 1.13.0 is available: 1.14.0
⚠️ libs/SalesforceSDK/build.gradle.kts#L45 - A newer version of androidx.compose:compose-bom than 2026.04.01 is available: 2026.05.00
⚠️ libs/SalesforceSDK/build.gradle.kts#L46 - A newer version of androidx.compose.foundation:foundation-android than 1.11.0 is available: 1.11.1
⚠️ libs/SalesforceSDK/build.gradle.kts#L47 - A newer version of androidx.compose.runtime:runtime-livedata than 1.11.0 is available: 1.11.1
⚠️ libs/SalesforceSDK/build.gradle.kts#L48 - A newer version of androidx.compose.ui:ui-tooling-preview-android than 1.11.0 is available: 1.11.1
⚠️ libs/SalesforceSDK/build.gradle.kts#L49 - A newer version of androidx.compose.material:material than 1.11.0 is available: 1.11.1
⚠️ libs/SalesforceSDK/build.gradle.kts#L52 - A newer version of androidx.compose.ui:ui-tooling than 1.11.0 is available: 1.11.1
⚠️ libs/SalesforceSDK/build.gradle.kts#L53 - A newer version of androidx.compose.ui:ui-test-manifest than 1.11.0 is available: 1.11.1
⚠️ libs/SalesforceSDK/build.gradle.kts#L60 - A newer version of androidx.compose.ui:ui-test-junit4 than 1.11.0 is available: 1.11.1

Generated by 🚫 Danger

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

1 Warning
⚠️ libs/SalesforceReact/build.gradle.kts#L26 - A newer version of com.facebook.react:react-android than 0.79.3 is available: 0.85.3

Generated by 🚫 Danger

…d into feature/migrate-doc-generation-to-dokka
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.09%. Comparing base (59fe3d9) to head (608b88e).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #2887      +/-   ##
============================================
- Coverage     55.13%   55.09%   -0.04%     
- Complexity     2495     2504       +9     
============================================
  Files           226      226              
  Lines         17722    17781      +59     
  Branches       2311     2328      +17     
============================================
+ Hits           9771     9797      +26     
- Misses         6955     6980      +25     
- Partials        996     1004       +8     
Components Coverage Δ
Analytics 48.71% <ø> (ø)
SalesforceSDK 41.78% <50.00%> (-0.01%) ⬇️
Hybrid 59.30% <ø> (ø)
SmartStore 78.22% <ø> (ø)
MobileSync 82.12% <ø> (+0.01%) ⬆️
React 51.50% <ø> (ø)
see 9 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@JohnsonEricAtSalesforce JohnsonEricAtSalesforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants