aboutsummaryrefslogtreecommitdiff
path: root/runners/cli/src/main
diff options
context:
space:
mode:
authoraleksZubakov <aleks.zubakov@gmail.com>2018-08-01 19:48:45 +0300
committeraleksZubakov <aleks.zubakov@gmail.com>2018-08-01 19:48:45 +0300
commit052a218dcf8bc565d5e78dc900a9647f0da5350a (patch)
tree7f63b95ea16c4de5fc241cfcb384cc8d337f7310 /runners/cli/src/main
parent899c11d36f565cd192945573860568ff62c16ef2 (diff)
downloaddokka-052a218dcf8bc565d5e78dc900a9647f0da5350a.tar.gz
dokka-052a218dcf8bc565d5e78dc900a9647f0da5350a.tar.bz2
dokka-052a218dcf8bc565d5e78dc900a9647f0da5350a.zip
Refactoring, replace DocumentationOption with PassConfiguration
Diffstat (limited to 'runners/cli/src/main')
-rw-r--r--runners/cli/src/main/kotlin/cli/main.kt36
1 files changed, 21 insertions, 15 deletions
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt
index f871f406..330de5e1 100644
--- a/runners/cli/src/main/kotlin/cli/main.kt
+++ b/runners/cli/src/main/kotlin/cli/main.kt
@@ -44,7 +44,7 @@ class DokkaArguments {
@set:Argument(value = "impliedPlatforms", description = "List of implied platforms (comma-separated)")
var impliedPlatforms: String = ""
- @set:Argument(value = "packageOptions", description = "List of package options in format \"prefix,-deprecated,-privateApi,+warnUndocumented,+suppress;...\" ")
+ @set:Argument(value = "packageOptions", description = "List of package passConfiguration in format \"prefix,-deprecated,-privateApi,+warnUndocumented,+suppress;...\" ")
var packageOptions: String = ""
@set:Argument(value = "links", description = "External documentation links in format url^packageListUrl^^url2...")
@@ -111,31 +111,37 @@ object MainKt {
val classPath = arguments.classpath.split(File.pathSeparatorChar).toList()
- val documentationOptions = DocumentationOptions(
- arguments.outputDir.let { if (it.endsWith('/')) it else it + '/' },
- arguments.outputFormat,
+ val passConfig = PassConfigurationImpl(
skipDeprecated = arguments.nodeprecated,
sourceLinks = sourceLinks,
- impliedPlatforms = arguments.impliedPlatforms.split(','),
perPackageOptions = parsePerPackageOptions(arguments.packageOptions),
jdkVersion = arguments.jdkVersion,
externalDocumentationLinks = parseLinks(arguments.links),
noStdlibLink = arguments.noStdlibLink,
- cacheRoot = arguments.cacheRoot,
languageVersion = arguments.languageVersion,
apiVersion = arguments.apiVersion,
collectInheritedExtensionsFromLibraries = arguments.collectInheritedExtensionsFromLibraries,
- noJdkLink = arguments.noJdkLink
+ noJdkLink = arguments.noJdkLink,
+ sourceRoots = sources.map(SourceRootImpl.Companion::parseSourceRoot),
+ analysisPlatform = sources.map (SourceRootImpl.Companion::parseSourceRoot).single().analysisPlatform,
+ samples = samples,
+ includes = includes,
+ moduleName = arguments.moduleName,
+ classpath = classPath
+ )
+
+ val config = DokkaConfigurationImpl(
+ outputDir = arguments.outputDir.let { if (it.endsWith('/')) it else it + '/' },
+ format = arguments.outputFormat,
+ impliedPlatforms = arguments.impliedPlatforms.split(','),
+ cacheRoot = arguments.cacheRoot,
+
+ passesConfigurations = listOf(
+ passConfig
+ )
)
- val generator = DokkaGenerator(
- DokkaConsoleLogger,
- classPath,
- sources.map(SourceRootImpl.Companion::parseSourceRoot),
- samples,
- includes,
- arguments.moduleName,
- documentationOptions)
+ val generator = DokkaGenerator(config, DokkaConsoleLogger)
generator.generate()
DokkaConsoleLogger.report()