aboutsummaryrefslogtreecommitdiff
path: root/src/main.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-14 15:44:32 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-14 15:44:32 +0400
commit08e690021ce2df402134ea5cebd769183499c771 (patch)
tree5c8c95a9fcc26bb31e65cb08ac762980e46e1040 /src/main.kt
parent71aacc5719cf59d2284592018177fbf8d71d12e4 (diff)
downloaddokka-08e690021ce2df402134ea5cebd769183499c771.tar.gz
dokka-08e690021ce2df402134ea5cebd769183499c771.tar.bz2
dokka-08e690021ce2df402134ea5cebd769183499c771.zip
Migrate to PackageView processing to unify all package fragments into single item.
Diffstat (limited to 'src/main.kt')
-rw-r--r--src/main.kt11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main.kt b/src/main.kt
index fbbb53d6..56717a80 100644
--- a/src/main.kt
+++ b/src/main.kt
@@ -35,10 +35,13 @@ public fun main(args: Array<String>) {
println()
- val documentation = environment.processFiles { context, module, file ->
- println("Processing: ${file.getName()}")
- context.createDocumentationModule(module, file)
- }.reduce {(aggregate, item) -> aggregate.merge(item) }
+ val documentation = environment.withContext<DocumentationModule> { environment, module, context ->
+ val packageSet = environment.getSourceFiles().map { file ->
+ context.getPackageFragment(file)!!.fqName
+ }.toSet()
+
+ context.createDocumentationModule(module, packageSet)
+ }
val signatureGenerator = KotlinSignatureGenerator()
val locationService = FoldersLocationService(arguments.outputDir ?: "out/doc/")