From 8640e513391f3a3c9909396d45795543f01e87d2 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 12 Jan 2016 19:34:48 +0100 Subject: don't generate index pages in tests --- core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 5 ++++- core/src/test/kotlin/TestAPI.kt | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index 1bc41f54..1b4dafd4 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -42,6 +42,7 @@ data class DocumentationOptions(val outputDir: String, val skipEmptyPackages: Boolean = true, val skipDeprecated: Boolean = false, val jdkVersion: Int = 6, + val generateIndexPages: Boolean = true, val sourceLinks: List) private fun isExtensionForExternalClass(extensionFunctionDescriptor: DeclarationDescriptor, @@ -293,7 +294,9 @@ class DocumentationBuilder } propagateExtensionFunctionsToSubclasses(fragments) - generateAllTypesNode() + if (options.generateIndexPages) { + generateAllTypesNode() + } } private fun propagateExtensionFunctionsToSubclasses(fragments: Collection) { diff --git a/core/src/test/kotlin/TestAPI.kt b/core/src/test/kotlin/TestAPI.kt index d7833e36..91812dfc 100644 --- a/core/src/test/kotlin/TestAPI.kt +++ b/core/src/test/kotlin/TestAPI.kt @@ -50,7 +50,11 @@ public fun verifyModel(vararg roots: ContentRoot, } addRoots(roots.toList()) } - val options = DocumentationOptions("", format, includeNonPublic = true, skipEmptyPackages = false, sourceLinks = listOf()) + val options = DocumentationOptions("", format, + includeNonPublic = true, + skipEmptyPackages = false, + sourceLinks = listOf(), + generateIndexPages = false) val injector = Guice.createInjector(DokkaModule(environment, options, DokkaConsoleLogger)) val documentation = buildDocumentationModule(injector, "test") verifier(documentation) -- cgit