You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR in base introduces separation of artifacts generated by Dokka for Kotlin- and Java-based API mode of documentation.
In addition to standard Dokka HTML publication artifact, which serves the Java API perspective, we need to have another artifact, which contains documentation from the Kotlin API perspective.
Dokka setup for Kotlin API mode should be be checked to support the facility similar to ExcludeInternal doclet which strips API elements annotated with @Internal. Please see Configuration Options as a source of inspiration of how it may be implemented. It currently works for Java API mode and hopefully should work for Kotlin out of the box.
Currently there's only one dokkaHtml task, which does not comply with KMM modules because it produces at least two publications: one for commonMain and one for jvmMain source sets.
We need to have two API modes for all the modules (both JVM-only and KMM):
Java API view for all the code.
Kotlin API view for all the code.
Here's the details of the issue that needs to solved. Java API mode is currently enabled by importing dokka-for-java script plugin. It adds a separate dependency for kotlin-as-java Dokka plugin:
fun DependencyHandlerScope.useDokkaForKotlinAsJava() {
dokkaPlugin(Dokka.KotlinAsJavaPlugin.lib)
}
When it comes to KMM module, we cannot use this approach because there are at least to publications. And we probably need to have a separate Configuration for jvm documentation which handles the dependency dokkaPlugin(Dokka.KotlinAsJavaPlugin.lib).
The PR in base solves the above issue only partially as it uses Dokka for Kotlin mode for the logging module (which is KMM) and adds vanilla Javadoc artifact for the jvm publication:
Once the general documentation improvement is introduced as the result of addressing this issue, the base project (or the separate logging project, if we choose to extract it) needs to be adjusted accordingly.
The text was updated successfully, but these errors were encountered:
alexander-yevsyukov
changed the title
Add publishing of Dokka-generated documentation in Java API mode
Add publishing of Dokka-generated documentation in Kotlin API mode
Apr 5, 2023
This PR in base introduces separation of artifacts generated by Dokka for Kotlin- and Java-based API mode of documentation.
In addition to standard Dokka HTML publication artifact, which serves the Java API perspective, we need to have another artifact, which contains documentation from the Kotlin API perspective.
Dokka setup for Kotlin API mode should be be checked to support the facility similar to
ExcludeInternal
doclet which strips API elements annotated with@Internal
. Please see Configuration Options as a source of inspiration of how it may be implemented. It currently works for Java API mode and hopefully should work for Kotlin out of the box.Currently there's only one
dokkaHtml
task, which does not comply with KMM modules because it produces at least two publications: one forcommonMain
and one forjvmMain
source sets.We need to have two API modes for all the modules (both JVM-only and KMM):
Here's the details of the issue that needs to solved. Java API mode is currently enabled by importing
dokka-for-java
script plugin. It adds a separate dependency for kotlin-as-java Dokka plugin:When it comes to KMM module, we cannot use this approach because there are at least to publications. And we probably need to have a separate
Configuration
forjvm
documentation which handles the dependencydokkaPlugin(Dokka.KotlinAsJavaPlugin.lib)
.The PR in base solves the above issue only partially as it uses Dokka for Kotlin mode for the
logging
module (which is KMM) and adds vanilla Javadoc artifact for thejvm
publication:Once the general documentation improvement is introduced as the result of addressing this issue, the
base
project (or the separatelogging
project, if we choose to extract it) needs to be adjusted accordingly.The text was updated successfully, but these errors were encountered: