aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc/src
diff options
context:
space:
mode:
authorKamil Doległo <9080183+kamildoleglo@users.noreply.github.com>2021-07-05 14:10:23 +0200
committerGitHub <noreply@github.com>2021-07-05 14:10:23 +0200
commit0bf1d0f5491a62c56393a06cdfb4168778d9829e (patch)
tree808f631e72b652dc2c3d5929f85f677968bc56f6 /plugins/javadoc/src
parenta1d44ab80df217196fe5ee9455c7cf1c135e3b07 (diff)
downloaddokka-0bf1d0f5491a62c56393a06cdfb4168778d9829e.tar.gz
dokka-0bf1d0f5491a62c56393a06cdfb4168778d9829e.tar.bz2
dokka-0bf1d0f5491a62c56393a06cdfb4168778d9829e.zip
Flatten multi-module structure (#1980)
* Add support for multimodule package lists * Merge package-lists in multi-module generation * Remove double-wrapping of modules in multi-module generation * Handle empty modules in package lists
Diffstat (limited to 'plugins/javadoc/src')
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt3
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt4
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt10
3 files changed, 9 insertions, 8 deletions
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt
index 0bbbbf86..7f90f1ce 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt
@@ -7,6 +7,7 @@ import org.jetbrains.dokka.CoreExtensions
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.renderers.PackageListCreator
import org.jetbrains.dokka.base.renderers.RootCreator
+import org.jetbrains.dokka.base.resolvers.shared.PackageList.Companion.PACKAGE_LIST_NAME
import org.jetbrains.dokka.base.resolvers.shared.RecognizedLinkFormat
import org.jetbrains.dokka.javadoc.pages.*
import org.jetbrains.dokka.javadoc.transformers.documentables.JavadocDocumentableJVMSourceSetFilter
@@ -56,7 +57,7 @@ class JavadocPlugin : DokkaPlugin() {
PackageListCreator(
context = it,
format = RecognizedLinkFormat.DokkaJavadoc,
- outputFilesNames = listOf("package-list", "element-list")
+ outputFilesNames = listOf(PACKAGE_LIST_NAME, "element-list")
)
} order { after(rootCreator) }
}
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt
index aee38596..6d04093e 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt
@@ -270,10 +270,10 @@ class AllClassesPage(val classes: List<JavadocClasslikePageNode>) : JavadocPageN
dri: Set<DRI>,
embeddedResources: List<String>,
children: List<PageNode>
- ): ContentPage = TODO()
+ ): ContentPage = this
override fun modified(name: String, children: List<PageNode>): PageNode =
- TODO()
+ this
override val children: List<PageNode> = emptyList()
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt
index 431f4464..89e4c535 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt
@@ -32,8 +32,8 @@ internal class JavadocPackageListTest : AbstractJavadocTemplateMapTest() {
package0
package1
""".trimIndent()
- assertEquals(expected, contents["/element-list"]?.trimIndent())
- assertEquals(expected, contents["/package-list"]?.trimIndent())
+ assertEquals(expected, contents["element-list"]?.trimIndent())
+ assertEquals(expected, contents["package-list"]?.trimIndent())
}
}
@@ -69,8 +69,8 @@ internal class JavadocPackageListTest : AbstractJavadocTemplateMapTest() {
package0.package0Inner
package1.package1Inner.package1InnerInner
""".trimIndent()
- assertEquals(expected, contents["/element-list"]?.trimIndent())
- assertEquals(expected, contents["/package-list"]?.trimIndent())
+ assertEquals(expected, contents["element-list"]?.trimIndent())
+ assertEquals(expected, contents["package-list"]?.trimIndent())
}
}
-} \ No newline at end of file
+}