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 /runners/maven-plugin/src/main/kotlin | |
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 'runners/maven-plugin/src/main/kotlin')
-rw-r--r-- | runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 49 |
1 files changed, 43 insertions, 6 deletions
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index dcccdb1f..dbae2362 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -9,10 +9,7 @@ import org.apache.maven.project.MavenProject import org.apache.maven.project.MavenProjectHelper import org.codehaus.plexus.archiver.Archiver import org.codehaus.plexus.archiver.jar.JarArchiver -import org.jetbrains.dokka.DocumentationOptions -import org.jetbrains.dokka.DokkaGenerator -import org.jetbrains.dokka.SourceLinkDefinitionImpl -import org.jetbrains.dokka.SourceRootImpl +import org.jetbrains.dokka.* import java.io.File class SourceLinkMapItem { @@ -27,10 +24,32 @@ class SourceLinkMapItem { } abstract class AbstractDokkaMojo : AbstractMojo() { + class SourceRoot : DokkaConfiguration.SourceRoot { + @Parameter(required = true) + override var path: String = "" + + @Parameter + override var platforms: List<String> = emptyList() + } + + class PackageOptions : DokkaConfiguration.PackageOptions { + @Parameter + override var prefix: String = "" + @Parameter + override var includeNonPublic: Boolean = false + @Parameter + override var reportUndocumented: Boolean = true + @Parameter + override var skipDeprecated: Boolean = false + } + @Parameter(required = true, defaultValue = "\${project.compileSourceRoots}") var sourceDirectories: List<String> = emptyList() @Parameter + var sourceRoots: List<SourceRoot> = emptyList() + + @Parameter var samplesDirs: List<String> = emptyList() @Parameter @@ -55,6 +74,19 @@ abstract class AbstractDokkaMojo : AbstractMojo() { @Parameter(required = false, defaultValue = "6") var jdkVersion: Int = 6 + @Parameter + var skipDeprecated = false + @Parameter + var skipEmptyPackages = true + @Parameter + var reportNotDocumented = true + + @Parameter + var impliedPlatforms: List<String> = emptyList() + + @Parameter + var perPackageOptions: List<PackageOptions> = emptyList() + protected abstract fun getOutDir(): String protected abstract fun getOutFormat(): String @@ -67,13 +99,18 @@ abstract class AbstractDokkaMojo : AbstractMojo() { val gen = DokkaGenerator( MavenDokkaLogger(log), classpath, - sourceDirectories.map { SourceRootImpl(it) }, + sourceDirectories.map { SourceRootImpl(it) } + sourceRoots, samplesDirs, includeDirs + includes, moduleName, DocumentationOptions(getOutDir(), getOutFormat(), sourceLinks = sourceLinks.map { SourceLinkDefinitionImpl(it.dir, it.url, it.urlSuffix) }, - jdkVersion = jdkVersion + jdkVersion = jdkVersion, + skipDeprecated = skipDeprecated, + skipEmptyPackages = skipEmptyPackages, + reportUndocumented = reportNotDocumented, + impliedPlatforms = impliedPlatforms, + perPackageOptions = perPackageOptions ) ) |