-
Notifications
You must be signed in to change notification settings - Fork 454
Description
Describe the bug
The generated Dokka documentation does not include API links to Android Jetpack's Compose libraries by default.
Expected behaviour
The generated Dokka documentation should include Android Jetpack's Compose libraries by default. (i.e. link to the respective Jetpack Compose classes where possible)
The Modifier
class should link to the Modifier
class in the Android docs, but in this screenshot it doesn't.
To Reproduce
- Clone EdricChan03/Ephemeris and checkout the
feat/dokka
branch - Run
./gradlew dokkaHtmlMultiModule
to generate the Dokka docs - Navigate to and open the generated docs (
build/dokka/htmlMultiModule
) (for e.g. withnpx http-server
) - In the docs, expand the "android-compose" module > compose package >
EphemerisCalendarView
Dokka configuration
Configuration of dokka used to reproduce the bug
tasks.withType<DokkaTaskPartial>().configureEach {
moduleName.set(publishing.publications["release"].cast<MavenPublication>().artifactId)
dokkaSourceSets {
named("main") {
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl.set(URL(
"https://github.com/boswelja/Ephemeris/blob/main/android/compose/src/main/kotlin"))
}
}
}
}
Installation
- Operating system: Windows
- Build tool: Gradle v7.4.2
- Dokka version: 1.6.20
Additional context
N/A
Are you willing to provide a PR?
I suppose so. Looking around in the source code for "AndroidX" points me to defaultExternalLinks.kt
, which is used for the default externalDocumentationLink
s.
I believe the line to fix should be as follows:
packageListUrl = URL("https://developer.android.com/reference/androidx/package-list") |
It should be modified from https://developer.android.com/reference/androidx/package-list to https://developer.android.com/reference/kotlin/androidx/package-list, which should then include the Kotlin-only libraries like Jetpack Compose
Edit: I've just opened a PR #2456