Add ability to generate unbundled docs for KMP projects
This CL adds 2 new tasks that can be used to generate offline docs
using dokka.
Each AndroidX project has a dokkaPartialDocs artifact if it has the
Kotlin plugin installed. (built by DokkaPartialDocsTask and then
zipped)
There is also a new "kmp-docs" project which declares a dependency on
projects that will be documented.
Documentation task setup is done by the AndroidXKmpDocsPlugin.
This plugin uses the DokkaCliCombinedDocsTask to produce the final
combined documentation.
Output is deployed here:
http://androidx.github.io/kmp-eap-docs
Bug: 249096220
Test: local
Change-Id: Ib9d30df45301b934d7b2cb1e9687c95a7cba5bad
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 12edbcd..d5df653 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -28,6 +28,7 @@
cmake = "3.22.1"
dagger = "2.42"
dexmaker = "2.28.3"
+dokka = "1.7.20-dev-178"
espresso = "3.5.0-alpha06"
guavaJre = "31.1-jre"
hilt = "2.42"
@@ -95,6 +96,14 @@
dexmakerMockito = { module = "com.linkedin.dexmaker:dexmaker-mockito", version.ref = "dexmaker" }
dexmakerMockitoInline = { module = "com.linkedin.dexmaker:dexmaker-mockito-inline", version.ref = "dexmaker" }
dexMemberList = { module = "com.jakewharton.dex:dex-member-list", version = "4.1.1" }
+dokkaCli = { module = "org.jetbrains.dokka:dokka-cli", version.ref = "dokka" }
+dokkaAnalysis = { module = "org.jetbrains.dokka:dokka-analysis", version.ref = "dokka" }
+dokkaAnalysisIntellij = { module = "org.jetbrains.dokka:kotlin-analysis-intellij", version.ref = "dokka" }
+dokkaAnalysisCompiler = { module = "org.jetbrains.dokka:kotlin-analysis-compiler", version.ref = "dokka" }
+dokkaAndroidDocumentation = { module = "org.jetbrains.dokka:android-documentation-plugin", version.ref = "dokka" }
+dokkaAllModules = { module = "org.jetbrains.dokka:all-modules-page-plugin", version.ref = "dokka" }
+dokkaBase = { module = "org.jetbrains.dokka:dokka-base", version.ref = "dokka" }
+dokkaTemplating = { module = "org.jetbrains.dokka:templating-plugin", version.ref = "dokka" }
dokkaGradlePluginz = { module = "org.jetbrains.dokka:dokka-android-gradle-plugin", version = "0.9.17-g014" }
dom4j = { module = "org.dom4j:dom4j", version = "2.1.3" }
espressoContribInternal = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso" }
@@ -105,6 +114,7 @@
espressoWeb = { module = "androidx.test.espresso:espresso-web", version.ref = "espresso" }
findbugs = { module = "com.google.code.findbugs:jsr305", version = "3.0.2" }
firebaseAppindexing = { module = "com.google.firebase:firebase-appindexing", version = "19.2.0" }
+freemarker = { module = "org.freemarker:freemarker", version = "2.3.31"}
googletest = { module = "com.android.ndk.thirdparty:googletest", version = "1.11.0-beta-1" }
hiltAndroid = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
hiltAndroidTesting = { module = "com.google.dagger:hilt-android-testing", version.ref = "hilt" }
@@ -160,6 +170,7 @@
kotlinReflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
kotlinPoet = { module = "com.squareup:kotlinpoet", version = "1.12.0" }
kotlinPoetJavaPoet = { module = "com.squareup:kotlinpoet-javapoet", version = "1.12.0" }
+kotlinXHtml = { module = "org.jetbrains.kotlinx:kotlinx-html-jvm", version = "0.7.3" }
ksp = { module = "com.google.devtools.ksp:symbol-processing", version.ref = "ksp" }
kspApi = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
kspGradlePluginz = { module = "com.google.devtools.ksp:symbol-processing-gradle-plugin", version.ref = "ksp" }