diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-05-03 16:25:50 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-05-04 14:35:09 +0300 |
commit | 3b6e3a8bf69b7470cd7e9a867ff3b2e7e645fbd4 (patch) | |
tree | a2cf05b5734bdb6540466a0e56b4fc4e34d792a4 /core/src/main/kotlin/Generation | |
parent | c2afb348bb0d3dd60d336aa312b5fcedfb31b966 (diff) | |
download | dokka-3b6e3a8bf69b7470cd7e9a867ff3b2e7e645fbd4.tar.gz dokka-3b6e3a8bf69b7470cd7e9a867ff3b2e7e645fbd4.tar.bz2 dokka-3b6e3a8bf69b7470cd7e9a867ff3b2e7e645fbd4.zip |
Add bunch of new parameters to runners
Such as packageOptions, impliedPlatforms and so on
Diffstat (limited to 'core/src/main/kotlin/Generation')
-rw-r--r-- | core/src/main/kotlin/Generation/DokkaGenerator.kt | 4 | ||||
-rw-r--r-- | core/src/main/kotlin/Generation/configurationImpl.kt | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/core/src/main/kotlin/Generation/DokkaGenerator.kt b/core/src/main/kotlin/Generation/DokkaGenerator.kt index 67c641a0..3350ab1d 100644 --- a/core/src/main/kotlin/Generation/DokkaGenerator.kt +++ b/core/src/main/kotlin/Generation/DokkaGenerator.kt @@ -35,7 +35,7 @@ class DokkaGenerator(val logger: DokkaLogger, private val documentationModule = DocumentationModule(moduleName) fun generate() { - val sourcesGroupedByPlatform = sources.groupBy { it.defaultPlatforms.firstOrNull() } + val sourcesGroupedByPlatform = sources.groupBy { it.platforms.firstOrNull() } for ((platform, roots) in sourcesGroupedByPlatform) { appendSourceModule(platform, roots) } @@ -67,7 +67,7 @@ class DokkaGenerator(val logger: DokkaLogger, val containingFilePath = descriptor.sourcePsi()?.containingFile?.virtualFile?.canonicalPath ?.let { File(it).absolutePath } val sourceRoot = containingFilePath?.let { path -> sourceRoots.find { path.startsWith(it.path) } } - return sourceRoot?.defaultPlatforms ?: defaultPlatformAsList + return sourceRoot?.platforms ?: defaultPlatformAsList } } diff --git a/core/src/main/kotlin/Generation/configurationImpl.kt b/core/src/main/kotlin/Generation/configurationImpl.kt index 6ed0d639..bb2f6d12 100644 --- a/core/src/main/kotlin/Generation/configurationImpl.kt +++ b/core/src/main/kotlin/Generation/configurationImpl.kt @@ -18,7 +18,7 @@ data class SourceLinkDefinitionImpl(override val path: String, } } -class SourceRootImpl(path: String, override val defaultPlatforms: List<String> = emptyList()) : SourceRoot { +class SourceRootImpl(path: String, override val platforms: List<String> = emptyList()) : SourceRoot { override val path: String = File(path).absolutePath companion object { @@ -29,6 +29,11 @@ class SourceRootImpl(path: String, override val defaultPlatforms: List<String> = } } +data class PackageOptionsImpl(override val prefix: String, + override val includeNonPublic: Boolean = false, + override val reportUndocumented: Boolean = true, + override val skipDeprecated: Boolean = false) : DokkaConfiguration.PackageOptions + data class DokkaConfigurationImpl(override val moduleName: String, override val classpath: List<String>, override val sourceRoots: List<SourceRootImpl>, @@ -43,4 +48,6 @@ data class DokkaConfigurationImpl(override val moduleName: String, override val skipDeprecated: Boolean, override val jdkVersion: Int, override val generateIndexPages: Boolean, - override val sourceLinks: List<SourceLinkDefinitionImpl>) : DokkaConfiguration
\ No newline at end of file + override val sourceLinks: List<SourceLinkDefinitionImpl>, + override val impliedPlatforms: List<String>, + override val perPackageOptions: List<PackageOptionsImpl>) : DokkaConfiguration
\ No newline at end of file |