aboutsummaryrefslogtreecommitdiff
path: root/runners
diff options
context:
space:
mode:
Diffstat (limited to 'runners')
-rw-r--r--runners/ant/src/main/kotlin/ant/dokka.kt49
-rw-r--r--runners/cli/src/main/kotlin/cli/main.kt36
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt47
3 files changed, 73 insertions, 59 deletions
diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt
index 0b1ccc13..4f629198 100644
--- a/runners/ant/src/main/kotlin/ant/dokka.kt
+++ b/runners/ant/src/main/kotlin/ant/dokka.kt
@@ -116,29 +116,34 @@ class DokkaAntTask: Task() {
SourceLinkDefinitionImpl(File(path).canonicalFile.absolutePath, url, it.lineSuffix)
}
- val generator = DokkaGenerator(
- AntLogger(this),
- compileClasspath.list().toList(),
- sourcePath.list().map { SourceRootImpl(it) } + antSourceRoots.mapNotNull { it.toSourceRoot() },
- samplesPath.list().toList(),
- includesPath.list().toList(),
- moduleName!!,
- DocumentationOptions(
- outputDir!!,
- outputFormat,
- skipDeprecated = skipDeprecated,
- sourceLinks = sourceLinks,
- jdkVersion = jdkVersion,
- impliedPlatforms = impliedPlatforms.split(','),
- perPackageOptions = antPackageOptions,
- externalDocumentationLinks = antExternalDocumentationLinks.map { it.build() },
- noStdlibLink = noStdlibLink,
- noJdkLink = noJdkLink,
- cacheRoot = cacheRoot,
- languageVersion = languageVersion,
- apiVersion = apiVersion
- )
+ val passConfiguration = PassConfigurationImpl(
+ classpath = compileClasspath.list().toList(),
+ sourceRoots = sourcePath.list().map { SourceRootImpl(it) } + antSourceRoots.mapNotNull { it.toSourceRoot() },
+ samples = samplesPath.list().toList(),
+ includes = includesPath.list().toList(),
+ moduleName = moduleName!!,
+ skipDeprecated = skipDeprecated,
+ sourceLinks = sourceLinks,
+ jdkVersion = jdkVersion,
+ perPackageOptions = antPackageOptions,
+ externalDocumentationLinks = antExternalDocumentationLinks.map { it.build() },
+ noStdlibLink = noStdlibLink,
+ noJdkLink = noJdkLink,
+ languageVersion = languageVersion,
+ apiVersion = apiVersion
)
+
+ val configuration = DokkaConfigurationImpl(
+ outputDir = outputDir!!,
+ format = outputFormat,
+ impliedPlatforms = impliedPlatforms.split(','),
+ cacheRoot = cacheRoot,
+ passesConfigurations = listOf(
+ passConfiguration
+ )
+ )
+
+ val generator = DokkaGenerator(configuration, AntLogger(this))
generator.generate()
}
} \ No newline at end of file
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()
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index ea55c8fe..78fd2d86 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -129,30 +129,33 @@ abstract class AbstractDokkaMojo : AbstractMojo() {
return
}
- val gen = DokkaGenerator(
- MavenDokkaLogger(log),
- classpath,
- sourceDirectories.map { SourceRootImpl(it) } + sourceRoots,
- samplesDirs,
- includeDirs + includes,
- moduleName,
- DocumentationOptions(getOutDir(), getOutFormat(),
- sourceLinks = sourceLinks.map { SourceLinkDefinitionImpl(it.dir, it.url, it.urlSuffix) },
- jdkVersion = jdkVersion,
- skipDeprecated = skipDeprecated,
- skipEmptyPackages = skipEmptyPackages,
- reportUndocumented = reportNotDocumented,
- impliedPlatforms = impliedPlatforms,
- perPackageOptions = perPackageOptions,
- externalDocumentationLinks = externalDocumentationLinks.map { it.build() },
- noStdlibLink = noStdlibLink,
- noJdkLink = noJdkLink,
- cacheRoot = cacheRoot,
- languageVersion = languageVersion,
- apiVersion = apiVersion
- )
+ val passConfiguration = PassConfigurationImpl(
+ sourceLinks = sourceLinks.map { SourceLinkDefinitionImpl(it.dir, it.url, it.urlSuffix) },
+ jdkVersion = jdkVersion,
+ skipDeprecated = skipDeprecated,
+ skipEmptyPackages = skipEmptyPackages,
+ reportUndocumented = reportNotDocumented,
+ perPackageOptions = perPackageOptions,
+ externalDocumentationLinks = externalDocumentationLinks.map { it.build() },
+ noStdlibLink = noStdlibLink,
+ noJdkLink = noJdkLink,
+ languageVersion = languageVersion,
+ apiVersion = apiVersion
+
+ )
+
+ val configuration = DokkaConfigurationImpl(
+ outputDir = getOutDir(),
+ format = getOutFormat(),
+ impliedPlatforms = impliedPlatforms,
+ cacheRoot = cacheRoot,
+ passesConfigurations = listOf(
+ passConfiguration
+ )
)
+ val gen = DokkaGenerator(configuration, MavenDokkaLogger(log))
+
gen.generate()
}
}