Skip to content

Fix Dokka 1.x compatibility with AGP 8.7.3#115

Merged
pimpimmi merged 2 commits into
masterfrom
fix-dokka-agp-compat
Jul 2, 2026
Merged

Fix Dokka 1.x compatibility with AGP 8.7.3#115
pimpimmi merged 2 commits into
masterfrom
fix-dokka-agp-compat

Conversation

@pimpimmi

@pimpimmi pimpimmi commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bump Dokka from 1.9.10 to 1.9.20
  • Work around Dokka 1.x NPE when auto-discovering androidTest source sets on AGP 8.7+

What changed

Dokka 1.x crashes with a NullPointerException when trying to create a GradleDokkaSourceSetBuilder for androidTestAuthDebug on AGP 8.7+. This is a known Dokka 1.x limitation — the auto-discovery of Android source sets calls AGP APIs that return null in newer AGP versions.

The fix clears the auto-discovered source sets and manually registers only the variant being documented. This preserves the existing per-flavor documentation (separate docs for auth and store artifacts).

Dokka 2.x was evaluated but doesn't support per-flavor documentation natively, which this project needs since the auth and store flavors expose different public classes.

Test plan

  • ./gradlew :auth-lib:authReleaseDokka succeeds
  • ./gradlew :auth-lib:storeReleaseDokka succeeds
  • Full ./gradlew build passes (290 tasks)

🤖 Generated with Claude Code

pimpimmi and others added 2 commits July 1, 2026 14:32
Dokka 1.x crashes with a NPE when auto-discovering source sets on
AGP 8.7+ due to androidTest source set builder creation failing.

Bump Dokka to 1.9.20 and manually register source sets instead of
using configureEach, which avoids the problematic auto-discovery.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dokka 1.x crashes with a NPE when auto-discovering androidTest
source sets on AGP 8.7+. Work around it by clearing auto-discovered
source sets and manually registering only the variant being documented.

Also bump Dokka from 1.9.10 to 1.9.20.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pimpimmi pimpimmi merged commit 30f54ce into master Jul 2, 2026
1 check passed
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