diff options
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 | 5 | ||||
-rw-r--r-- | runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 6 |
4 files changed, 19 insertions, 5 deletions
diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt index 964c77a5..fb70aefd 100644 --- a/runners/ant/src/main/kotlin/ant/dokka.kt +++ b/runners/ant/src/main/kotlin/ant/dokka.kt @@ -42,6 +42,8 @@ class DokkaAntTask: Task() { var skipDeprecated: Boolean = false + var cacheRoot: String? = null + val compileClasspath: Path by lazy { Path(getProject()) } val sourcePath: Path by lazy { Path(getProject()) } val samplesPath: Path by lazy { Path(getProject()) } @@ -122,7 +124,8 @@ class DokkaAntTask: Task() { impliedPlatforms = impliedPlatforms.split(','), perPackageOptions = antPackageOptions, externalDocumentationLinks = antExternalDocumentationLinks.map { it.build() }, - noStdlibLink = noStdlibLink + noStdlibLink = noStdlibLink, + cacheRoot = cacheRoot ) ) generator.generate() diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt index 9a852b5a..70336b9e 100644 --- a/runners/cli/src/main/kotlin/cli/main.kt +++ b/runners/cli/src/main/kotlin/cli/main.kt @@ -58,8 +58,11 @@ class DokkaArguments { @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") + @set:Argument(value = "noStdlibLink", description = "Disable documentation link to stdlib") var noStdlibLink: Boolean = false + + @set:Argument(value = "cacheRoot", description = "Path to cache folder, or 'default' to use ~/.cache/dokka, if not provided caching is disabled") + var cacheRoot: String? = null } @@ -112,7 +115,8 @@ object MainKt { perPackageOptions = parsePerPackageOptions(arguments.packageOptions), jdkVersion = arguments.jdkVersion, externalDocumentationLinks = parseLinks(arguments.links), - noStdlibLink = arguments.noStdlibLink + noStdlibLink = arguments.noStdlibLink, + cacheRoot = arguments.cacheRoot ) val generator = DokkaGenerator( diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt index afd1f762..ad5f3038 100644 --- a/runners/gradle-plugin/src/main/kotlin/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/main.kt @@ -89,6 +89,8 @@ open class DokkaTask : DefaultTask() { @Input var noStdlibLink: Boolean = false + @Input var cacheRoot: String? = null + protected open val sdkProvider: SdkProvider? = null fun linkMapping(closure: Closure<Any?>) { @@ -197,7 +199,8 @@ open class DokkaTask : DefaultTask() { impliedPlatforms, perPackageOptions, externalDocumentationLinks, - noStdlibLink) + noStdlibLink, + cacheRoot) bootstrapProxy.configure( diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index fc358a90..345de523 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -102,6 +102,9 @@ abstract class AbstractDokkaMojo : AbstractMojo() { @Parameter(defaultValue = "false") var noStdlibLink: Boolean = false + @Parameter + var cacheRoot: String? = null + protected abstract fun getOutDir(): String protected abstract fun getOutFormat(): String @@ -127,7 +130,8 @@ abstract class AbstractDokkaMojo : AbstractMojo() { impliedPlatforms = impliedPlatforms, perPackageOptions = perPackageOptions, externalDocumentationLinks = externalDocumentationLinks.map { it.build() }, - noStdlibLink = noStdlibLink + noStdlibLink = noStdlibLink, + cacheRoot = cacheRoot ) ) |