diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-05-16 18:26:22 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-05-16 19:37:32 +0300 |
commit | 177aff68f26b01c20508a51272607829c831d323 (patch) | |
tree | 44c974c95037af1f003fa09352a3e3408968b2b7 /runners | |
parent | f9baebebf36904caea48fa45292874f53c4986ab (diff) | |
download | dokka-177aff68f26b01c20508a51272607829c831d323.tar.gz dokka-177aff68f26b01c20508a51272607829c831d323.tar.bz2 dokka-177aff68f26b01c20508a51272607829c831d323.zip |
Fix runner parameters for consistency, add default link to stdlib
Diffstat (limited to 'runners')
-rw-r--r-- | runners/ant/src/main/kotlin/ant/dokka.kt | 5 | ||||
-rw-r--r-- | runners/cli/src/main/kotlin/cli/main.kt | 8 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/main.kt | 10 | ||||
-rw-r--r-- | runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 6 |
4 files changed, 19 insertions, 10 deletions
diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt index 83d7e8ac..964c77a5 100644 --- a/runners/ant/src/main/kotlin/ant/dokka.kt +++ b/runners/ant/src/main/kotlin/ant/dokka.kt @@ -38,6 +38,8 @@ class DokkaAntTask: Task() { var impliedPlatforms: String = "" var jdkVersion: Int = 6 + var noStdlibLink: Boolean = false + var skipDeprecated: Boolean = false val compileClasspath: Path by lazy { Path(getProject()) } @@ -119,7 +121,8 @@ class DokkaAntTask: Task() { jdkVersion = jdkVersion, impliedPlatforms = impliedPlatforms.split(','), perPackageOptions = antPackageOptions, - externalDocumentationLinks = antExternalDocumentationLinks.map { it.build() } + externalDocumentationLinks = antExternalDocumentationLinks.map { it.build() }, + noStdlibLink = noStdlibLink ) ) generator.generate() diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt index ff2107e2..9a852b5a 100644 --- a/runners/cli/src/main/kotlin/cli/main.kt +++ b/runners/cli/src/main/kotlin/cli/main.kt @@ -55,8 +55,11 @@ class DokkaArguments { @set:Argument(value = "packageOptions", description = "List of package options in format \"prefix,-deprecated,-privateApi,+warnUndocumented;...\" ") var packageOptions: String = "" - @set:Argument(value = "links", description = "") + @set:Argument(value = "links", description = "External documentation links in format url^packageListUrl^^url2...") var links: String = "" + + @set: Argument(value = "noStdlibLink", description = "Disable documentation link to stdlib") + var noStdlibLink: Boolean = false } @@ -108,7 +111,8 @@ object MainKt { impliedPlatforms = arguments.impliedPlatforms.split(','), perPackageOptions = parsePerPackageOptions(arguments.packageOptions), jdkVersion = arguments.jdkVersion, - externalDocumentationLinks = parseLinks(arguments.links) + externalDocumentationLinks = parseLinks(arguments.links), + noStdlibLink = arguments.noStdlibLink ) val generator = DokkaGenerator( diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt index bfa8feea..afd1f762 100644 --- a/runners/gradle-plugin/src/main/kotlin/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/main.kt @@ -87,6 +87,7 @@ open class DokkaTask : DefaultTask() { @Input var externalDocumentationLinks = mutableListOf<DokkaConfiguration.ExternalDocumentationLink>() + @Input var noStdlibLink: Boolean = false protected open val sdkProvider: SdkProvider? = null @@ -195,7 +196,8 @@ open class DokkaTask : DefaultTask() { linkMappings, impliedPlatforms, perPackageOptions, - externalDocumentationLinks) + externalDocumentationLinks, + noStdlibLink) bootstrapProxy.configure( @@ -217,10 +219,6 @@ open class DokkaTask : DefaultTask() { } fun collectSourceRoots(): List<SourceRoot> { - if (sourceRoots.any()) { - return sourceRoots - } - val provider = sdkProvider val sourceDirs = if (sourceDirs.any()) { logger.info("Dokka: Taking source directories provided by the user") @@ -235,7 +233,7 @@ open class DokkaTask : DefaultTask() { sourceSets?.allSource?.srcDirs } - return sourceDirs?.filter { it.exists() }?.map { SourceRoot().apply { path = it.path } } ?: emptyList() + return sourceRoots + (sourceDirs?.filter { it.exists() }?.map { SourceRoot().apply { path = it.path } } ?: emptyList()) } @InputFiles diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index cef0f2d8..fc358a90 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -99,6 +99,9 @@ abstract class AbstractDokkaMojo : AbstractMojo() { @Parameter var externalDocumentationLinks: List<ExternalDocumentationLinkBuilder> = emptyList() + @Parameter(defaultValue = "false") + var noStdlibLink: Boolean = false + protected abstract fun getOutDir(): String protected abstract fun getOutFormat(): String @@ -123,7 +126,8 @@ abstract class AbstractDokkaMojo : AbstractMojo() { reportUndocumented = reportNotDocumented, impliedPlatforms = impliedPlatforms, perPackageOptions = perPackageOptions, - externalDocumentationLinks = externalDocumentationLinks.map { it.build() } + externalDocumentationLinks = externalDocumentationLinks.map { it.build() }, + noStdlibLink = noStdlibLink ) ) |