aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-01-12 19:34:48 +0100
committerDmitry Jemerov <yole@jetbrains.com>2016-01-12 19:34:48 +0100
commit8640e513391f3a3c9909396d45795543f01e87d2 (patch)
treeeb28bbdd3d5afb86c9bb61b99503b21809932787
parentf3ed9f5fa553c72a254e5ca5d28e108849937769 (diff)
downloaddokka-8640e513391f3a3c9909396d45795543f01e87d2.tar.gz
dokka-8640e513391f3a3c9909396d45795543f01e87d2.tar.bz2
dokka-8640e513391f3a3c9909396d45795543f01e87d2.zip
don't generate index pages in tests
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt5
-rw-r--r--core/src/test/kotlin/TestAPI.kt6
2 files changed, 9 insertions, 2 deletions
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<SourceLinkDefinition>)
private fun isExtensionForExternalClass(extensionFunctionDescriptor: DeclarationDescriptor,
@@ -293,7 +294,9 @@ class DocumentationBuilder
}
propagateExtensionFunctionsToSubclasses(fragments)
- generateAllTypesNode()
+ if (options.generateIndexPages) {
+ generateAllTypesNode()
+ }
}
private fun propagateExtensionFunctionsToSubclasses(fragments: Collection<PackageFragmentDescriptor>) {
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<SourceLinkDefinition>())
+ val options = DocumentationOptions("", format,
+ includeNonPublic = true,
+ skipEmptyPackages = false,
+ sourceLinks = listOf<SourceLinkDefinition>(),
+ generateIndexPages = false)
val injector = Guice.createInjector(DokkaModule(environment, options, DokkaConsoleLogger))
val documentation = buildDocumentationModule(injector, "test")
verifier(documentation)