From 9ea429920e07c77e1241c4beb172bb36735af783 Mon Sep 17 00:00:00 2001 From: aleksZubakov Date: Tue, 10 Jul 2018 19:27:16 +0300 Subject: Add js platform support --- runners/ant/src/main/kotlin/ant/dokka.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runners/ant/src') diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt index d1b6bef5..58e2fa28 100644 --- a/runners/ant/src/main/kotlin/ant/dokka.kt +++ b/runners/ant/src/main/kotlin/ant/dokka.kt @@ -17,10 +17,11 @@ class AntLogger(val task: Task): DokkaLogger { class AntSourceLinkDefinition(var path: String? = null, var url: String? = null, var lineSuffix: String? = null) -class AntSourceRoot(var path: String? = null, var platforms: String? = null) { +class AntSourceRoot(var path: String? = null, var platforms: String? = null, + var platform: Platform = Platform.DEFAULT) { fun toSourceRoot(): SourceRootImpl? = path?.let { path -> - SourceRootImpl(path, platforms?.split(',').orEmpty()) + SourceRootImpl(path, platforms?.split(',').orEmpty(), platform) } } -- cgit From 052a218dcf8bc565d5e78dc900a9647f0da5350a Mon Sep 17 00:00:00 2001 From: aleksZubakov Date: Wed, 1 Aug 2018 19:48:45 +0300 Subject: Refactoring, replace DocumentationOption with PassConfiguration --- runners/ant/src/main/kotlin/ant/dokka.kt | 49 ++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'runners/ant/src') 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 -- cgit From 2ae2363cec43b5300038065c943f9991d91c7b15 Mon Sep 17 00:00:00 2001 From: aleksZubakov Date: Mon, 13 Aug 2018 21:52:23 +0300 Subject: Ant runner mpp change --- runners/ant/src/main/kotlin/ant/dokka.kt | 231 +++++++++++++++++++------------ 1 file changed, 141 insertions(+), 90 deletions(-) (limited to 'runners/ant/src') diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt index 4f629198..e1f85870 100644 --- a/runners/ant/src/main/kotlin/ant/dokka.kt +++ b/runners/ant/src/main/kotlin/ant/dokka.kt @@ -8,6 +8,7 @@ import org.apache.tools.ant.types.Reference import org.jetbrains.dokka.* import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink import java.io.File +import java.io.IOException class AntLogger(val task: Task): DokkaLogger { override fun info(message: String) = task.log(message, Project.MSG_INFO) @@ -25,47 +26,85 @@ class AntSourceRoot(var path: String? = null, var platforms: String? = null, } } -class AntPackageOptions( - override var prefix: String = "", - override var includeNonPublic: Boolean = false, - override var reportUndocumented: Boolean = true, - override var skipDeprecated: Boolean = false, - override var suppress: Boolean = false) : DokkaConfiguration.PackageOptions - - -class DokkaAntTask: Task() { - var moduleName: String? = null - var outputDir: String? = null - var outputFormat: String = "html" - var impliedPlatforms: String = "" - var jdkVersion: Int = 6 - - var noStdlibLink: Boolean = false - var noJdkLink: Boolean = false +class BuildTarget(var name: String = "") + +class BuildPlatform(var name: String = "") + +class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { + override var moduleName: String = "" + override val classpath: List + get() = buildClassPath.list().toList() + + override val sourceRoots: List + get() = sourcePath.list().map { SourceRootImpl(it) } + rawSourceRoots + + override val samples: List + get() = samplesPath.list().toList() + override val includes: List + get() = includesPath.list().toList() + override var includeNonPublic: Boolean = false + override var includeRootPackage: Boolean = false + override var reportUndocumented: Boolean = false + override var skipEmptyPackages: Boolean = false + override var skipDeprecated: Boolean = false + override var jdkVersion: Int = 6 + override val sourceLinks: List + get() = buildAntSourceLinkDefinition.map { + val path = it.path ?: throw BuildException("'path' attribute of a element is required") + val url = it.url ?: throw BuildException("'url' attribute of a element is required") + SourceLinkDefinitionImpl(File(path).canonicalFile.absolutePath, url, it.lineSuffix) + } + override val perPackageOptions: MutableList = mutableListOf() + override val externalDocumentationLinks: List + get() = buildExternalLinksBuilders.map { it.build() } + + override var languageVersion: String? = null + override var apiVersion: String? = null + override var noStdlibLink: Boolean = false + override var noJdkLink: Boolean = false + override var suppressedFiles: MutableList = mutableListOf() + override var collectInheritedExtensionsFromLibraries: Boolean = false + override var analysisPlatform: Platform = Platform.DEFAULT + override var targets: List = listOf() + get() = buildTargets.filter { it.name != "" } + .map { it.name } + + private val samplesPath: Path by lazy { Path(task.project) } + private val includesPath: Path by lazy { Path(task.project) } + private val buildClassPath: Path by lazy { Path(task.project) } + private val sourcePath: Path by lazy { Path(task.project) } + private val rawSourceRoots: MutableList = mutableListOf() + + private val buildTargets: MutableList = mutableListOf() + private val buildExternalLinksBuilders: MutableList = mutableListOf() + private val buildAntSourceLinkDefinition: MutableList = mutableListOf() + + fun setSamples(ref: Reference) { + samplesPath.createPath().refid = ref + } - var skipDeprecated: Boolean = false + fun setSamplesRef(ref: Reference) { + samplesPath.createPath().refid = ref + } - var cacheRoot: String? = null + fun setInclude(ref: Reference) { + includesPath.createPath().refid = ref + } - var languageVersion: String? = null - var apiVersion: String? = null + fun setClasspath(classpath: Path) { + buildClassPath.append(classpath) + } - val compileClasspath: Path by lazy { Path(getProject()) } - val sourcePath: Path by lazy { Path(getProject()) } - val samplesPath: Path by lazy { Path(getProject()) } - val includesPath: Path by lazy { Path(getProject()) } + fun createPackageOptions(): AntPackageOptions = AntPackageOptions().apply { perPackageOptions.add(this) } - val antSourceLinks: MutableList = arrayListOf() - val antSourceRoots: MutableList = arrayListOf() - val antPackageOptions: MutableList = arrayListOf() - val antExternalDocumentationLinks = mutableListOf() + fun createSourceRoot(): AntSourceRoot = AntSourceRoot().apply { this.toSourceRoot()?.let { rawSourceRoots.add(it) } } - fun setClasspath(classpath: Path) { - compileClasspath.append(classpath) + fun createTarget(): BuildTarget = BuildTarget().apply { + buildTargets.add(this) } fun setClasspathRef(ref: Reference) { - compileClasspath.createPath().refid = ref + buildClassPath.createPath().refid = ref } fun setSrc(src: Path) { @@ -76,74 +115,86 @@ class DokkaAntTask: Task() { sourcePath.createPath().refid = ref } - fun setSamples(samples: Path) { - samplesPath.append(samples) - } - - fun setSamplesRef(ref: Reference) { - samplesPath.createPath().refid = ref - } - - fun setInclude(include: Path) { - includesPath.append(include) - } - fun createSourceLink(): AntSourceLinkDefinition { val def = AntSourceLinkDefinition() - antSourceLinks.add(def) + buildAntSourceLinkDefinition.add(def) return def } - fun createSourceRoot(): AntSourceRoot = AntSourceRoot().apply { antSourceRoots.add(this) } + fun createExternalDocumentationLink() = + ExternalDocumentationLink.Builder().apply { buildExternalLinksBuilders.add(this) } + +} + +class AntPackageOptions( + override var prefix: String = "", + override var includeNonPublic: Boolean = false, + override var reportUndocumented: Boolean = true, + override var skipDeprecated: Boolean = false, + override var suppress: Boolean = false) : DokkaConfiguration.PackageOptions + +class DokkaAntTask: Task(), DokkaConfiguration { - fun createPackageOptions(): AntPackageOptions = AntPackageOptions().apply { antPackageOptions.add(this) } + override var format: String = "html" + override var generateIndexPages: Boolean = false + override var outputDir: String = "" + override var impliedPlatforms: List = listOf() + get() = buildImpliedPlatforms.map { it.name }.toList() + private val buildImpliedPlatforms: MutableList = mutableListOf() + + override var cacheRoot: String? = null + override val passesConfigurations: MutableList = mutableListOf() + + fun createPassConfig() = AntPassConfig(this).apply { passesConfigurations.add(this) } + fun createImpliedPlatform(): BuildPlatform = BuildPlatform().apply { buildImpliedPlatforms.add(this) } - fun createExternalDocumentationLink() = ExternalDocumentationLink.Builder().apply { antExternalDocumentationLinks.add(this) } override fun execute() { - if (sourcePath.list().isEmpty() && antSourceRoots.isEmpty()) { - throw BuildException("At least one source path needs to be specified") - } - if (moduleName == null) { - throw BuildException("Module name needs to be specified") - } - if (outputDir == null) { - throw BuildException("Output directory needs to be specified") - } - val sourceLinks = antSourceLinks.map { - val path = it.path ?: throw BuildException("'path' attribute of a element is required") - val url = it.url ?: throw BuildException("'url' attribute of a element is required") - SourceLinkDefinitionImpl(File(path).canonicalFile.absolutePath, url, it.lineSuffix) - } - 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)) + throw IOException(passesConfigurations.flatMap { it.targets }.joinToString()) +// if (sourcePath.list().isEmpty() && antSourceRoots.isEmpty()) { +// throw BuildException("At least one source path needs to be specified") +// } +// if (moduleName == null) { +// throw BuildException("Module name needs to be specified") +// } +// if (outputDir == null) { +// throw BuildException("Output directory needs to be specified") +// } +// val sourceLinks = antSourceLinks.map { +// val path = it.path ?: throw BuildException("'path' attribute of a element is required") +// val url = it.url ?: throw BuildException("'url' attribute of a element is required") +// SourceLinkDefinitionImpl(File(path).canonicalFile.absolutePath, url, it.lineSuffix) +// } + +// 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(this, AntLogger(this)) generator.generate() } } \ No newline at end of file -- cgit From 39b2f9faf768c185f6bd42a9fde18ceaecb34990 Mon Sep 17 00:00:00 2001 From: Zubakov Aleksey Date: Thu, 16 Aug 2018 17:27:10 +0300 Subject: Ant runner minor refactoring --- runners/ant/src/main/kotlin/ant/dokka.kt | 109 ++++++++++++------------------- 1 file changed, 43 insertions(+), 66 deletions(-) (limited to 'runners/ant/src') diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt index e1f85870..9e38aa22 100644 --- a/runners/ant/src/main/kotlin/ant/dokka.kt +++ b/runners/ant/src/main/kotlin/ant/dokka.kt @@ -8,7 +8,6 @@ import org.apache.tools.ant.types.Reference import org.jetbrains.dokka.* import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink import java.io.File -import java.io.IOException class AntLogger(val task: Task): DokkaLogger { override fun info(message: String) = task.log(message, Project.MSG_INFO) @@ -26,9 +25,7 @@ class AntSourceRoot(var path: String? = null, var platforms: String? = null, } } -class BuildTarget(var name: String = "") - -class BuildPlatform(var name: String = "") +class TextProperty(var value: String = "") class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { override var moduleName: String = "" @@ -36,7 +33,7 @@ class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { get() = buildClassPath.list().toList() override val sourceRoots: List - get() = sourcePath.list().map { SourceRootImpl(it) } + rawSourceRoots + get() = sourcePath.list().map { SourceRootImpl(it) } + antSourceRoots.mapNotNull { it.toSourceRoot() } override val samples: List get() = samplesPath.list().toList() @@ -49,9 +46,9 @@ class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { override var skipDeprecated: Boolean = false override var jdkVersion: Int = 6 override val sourceLinks: List - get() = buildAntSourceLinkDefinition.map { - val path = it.path ?: throw BuildException("'path' attribute of a element is required") - val url = it.url ?: throw BuildException("'url' attribute of a element is required") + get() = antSourceLinkDefinition.map { + val path = it.path!! + val url = it.url!! SourceLinkDefinitionImpl(File(path).canonicalFile.absolutePath, url, it.lineSuffix) } override val perPackageOptions: MutableList = mutableListOf() @@ -66,29 +63,29 @@ class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { override var collectInheritedExtensionsFromLibraries: Boolean = false override var analysisPlatform: Platform = Platform.DEFAULT override var targets: List = listOf() - get() = buildTargets.filter { it.name != "" } - .map { it.name } + get() = buildTargets.filter { it.value != "" } + .map { it.value } private val samplesPath: Path by lazy { Path(task.project) } private val includesPath: Path by lazy { Path(task.project) } private val buildClassPath: Path by lazy { Path(task.project) } - private val sourcePath: Path by lazy { Path(task.project) } - private val rawSourceRoots: MutableList = mutableListOf() + val sourcePath: Path by lazy { Path(task.project) } + val antSourceRoots: MutableList = mutableListOf() - private val buildTargets: MutableList = mutableListOf() + private val buildTargets: MutableList = mutableListOf() private val buildExternalLinksBuilders: MutableList = mutableListOf() - private val buildAntSourceLinkDefinition: MutableList = mutableListOf() + val antSourceLinkDefinition: MutableList = mutableListOf() - fun setSamples(ref: Reference) { - samplesPath.createPath().refid = ref + fun setSamples(ref: Path) { + samplesPath.append(ref) } fun setSamplesRef(ref: Reference) { samplesPath.createPath().refid = ref } - fun setInclude(ref: Reference) { - includesPath.createPath().refid = ref + fun setInclude(ref: Path) { + includesPath.append(ref) } fun setClasspath(classpath: Path) { @@ -97,9 +94,9 @@ class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { fun createPackageOptions(): AntPackageOptions = AntPackageOptions().apply { perPackageOptions.add(this) } - fun createSourceRoot(): AntSourceRoot = AntSourceRoot().apply { this.toSourceRoot()?.let { rawSourceRoots.add(it) } } + fun createSourceRoot(): AntSourceRoot = AntSourceRoot().apply { antSourceRoots.add(this) } - fun createTarget(): BuildTarget = BuildTarget().apply { + fun createTarget(): TextProperty = TextProperty().apply { buildTargets.add(this) } @@ -117,7 +114,7 @@ class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { fun createSourceLink(): AntSourceLinkDefinition { val def = AntSourceLinkDefinition() - buildAntSourceLinkDefinition.add(def) + antSourceLinkDefinition.add(def) return def } @@ -139,60 +136,40 @@ class DokkaAntTask: Task(), DokkaConfiguration { override var generateIndexPages: Boolean = false override var outputDir: String = "" override var impliedPlatforms: List = listOf() - get() = buildImpliedPlatforms.map { it.name }.toList() - private val buildImpliedPlatforms: MutableList = mutableListOf() + get() = buildImpliedPlatforms.map { it.value }.toList() + private val buildImpliedPlatforms: MutableList = mutableListOf() override var cacheRoot: String? = null override val passesConfigurations: MutableList = mutableListOf() fun createPassConfig() = AntPassConfig(this).apply { passesConfigurations.add(this) } - fun createImpliedPlatform(): BuildPlatform = BuildPlatform().apply { buildImpliedPlatforms.add(this) } + fun createImpliedPlatform(): TextProperty = TextProperty().apply { buildImpliedPlatforms.add(this) } override fun execute() { + for (passConfig in passesConfigurations) { + if (passConfig.sourcePath.list().isEmpty() && passConfig.antSourceRoots.isEmpty()) { + throw BuildException("At least one source path needs to be specified") + } + + if (passConfig.moduleName == "") { + throw BuildException("Module name needs to be specified and not empty") + } + + for (sourceLink in passConfig.antSourceLinkDefinition) { + if (sourceLink.path == null) { + throw BuildException("'path' attribute of a element is required") + } + + if (sourceLink.url == null) { + throw BuildException("'url' attribute of a element is required") + } + } + } - throw IOException(passesConfigurations.flatMap { it.targets }.joinToString()) -// if (sourcePath.list().isEmpty() && antSourceRoots.isEmpty()) { -// throw BuildException("At least one source path needs to be specified") -// } -// if (moduleName == null) { -// throw BuildException("Module name needs to be specified") -// } -// if (outputDir == null) { -// throw BuildException("Output directory needs to be specified") -// } -// val sourceLinks = antSourceLinks.map { -// val path = it.path ?: throw BuildException("'path' attribute of a element is required") -// val url = it.url ?: throw BuildException("'url' attribute of a element is required") -// SourceLinkDefinitionImpl(File(path).canonicalFile.absolutePath, url, it.lineSuffix) -// } - -// 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 -// ) -// ) + if (outputDir == "") { + throw BuildException("Output directory needs to be specified and not empty") + } val generator = DokkaGenerator(this, AntLogger(this)) generator.generate() -- cgit From b265a9ffacb8f8e8e6226a9458a92697b02355a8 Mon Sep 17 00:00:00 2001 From: Zubakov Date: Mon, 27 Aug 2018 15:08:28 +0300 Subject: Ant runner default external links and classpath resolving fix --- runners/ant/src/main/kotlin/ant/dokka.kt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'runners/ant/src') diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt index 9e38aa22..9428a7ce 100644 --- a/runners/ant/src/main/kotlin/ant/dokka.kt +++ b/runners/ant/src/main/kotlin/ant/dokka.kt @@ -53,7 +53,7 @@ class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { } override val perPackageOptions: MutableList = mutableListOf() override val externalDocumentationLinks: List - get() = buildExternalLinksBuilders.map { it.build() } + get() = buildExternalLinksBuilders.map { it.build() } + defaultExternalDocumentationLinks override var languageVersion: String? = null override var apiVersion: String? = null @@ -76,6 +76,18 @@ class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { private val buildExternalLinksBuilders: MutableList = mutableListOf() val antSourceLinkDefinition: MutableList = mutableListOf() + private val defaultExternalDocumentationLinks: List + get() { + val links = mutableListOf() + if (!noJdkLink) + links += DokkaConfiguration.ExternalDocumentationLink.Builder("http://docs.oracle.com/javase/$jdkVersion/docs/api/").build() + + if (!noStdlibLink) + links += DokkaConfiguration.ExternalDocumentationLink.Builder("https://kotlinlang.org/api/latest/jvm/stdlib/").build() + return links + } + + fun setSamples(ref: Path) { samplesPath.append(ref) } -- cgit From a4ae451279b4f89b9994d333c6d6d88a0868c5e4 Mon Sep 17 00:00:00 2001 From: Zubakov Date: Mon, 27 Aug 2018 21:35:29 +0300 Subject: Drop unnecessary properties in SourceRoot --- runners/ant/src/main/kotlin/ant/dokka.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'runners/ant/src') diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt index 9428a7ce..8be9246f 100644 --- a/runners/ant/src/main/kotlin/ant/dokka.kt +++ b/runners/ant/src/main/kotlin/ant/dokka.kt @@ -17,11 +17,9 @@ class AntLogger(val task: Task): DokkaLogger { class AntSourceLinkDefinition(var path: String? = null, var url: String? = null, var lineSuffix: String? = null) -class AntSourceRoot(var path: String? = null, var platforms: String? = null, - var platform: Platform = Platform.DEFAULT) { - fun toSourceRoot(): SourceRootImpl? = path?.let { - path -> - SourceRootImpl(path, platforms?.split(',').orEmpty(), platform) +class AntSourceRoot(var path: String? = null) { + fun toSourceRoot(): SourceRootImpl? = path?.let { path -> + SourceRootImpl(path) } } -- cgit From e7917d0ca9aee41bbe0cc321ebdb171ee49a8337 Mon Sep 17 00:00:00 2001 From: Zubakov Date: Thu, 6 Sep 2018 19:39:41 +0300 Subject: Fixed default values in ant runner configuration --- runners/ant/src/main/kotlin/ant/dokka.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runners/ant/src') diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt index 8be9246f..023b4b7f 100644 --- a/runners/ant/src/main/kotlin/ant/dokka.kt +++ b/runners/ant/src/main/kotlin/ant/dokka.kt @@ -38,9 +38,9 @@ class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { override val includes: List get() = includesPath.list().toList() override var includeNonPublic: Boolean = false - override var includeRootPackage: Boolean = false + override var includeRootPackage: Boolean = true override var reportUndocumented: Boolean = false - override var skipEmptyPackages: Boolean = false + override var skipEmptyPackages: Boolean = true override var skipDeprecated: Boolean = false override var jdkVersion: Int = 6 override val sourceLinks: List -- cgit From 0370d016c95761b57f13b007cd8c2494601a1539 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Wed, 3 Oct 2018 08:01:20 +0300 Subject: Introduce per-pass sinceKotlin --- runners/ant/src/main/kotlin/ant/dokka.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runners/ant/src') diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt index 023b4b7f..5a4111e8 100644 --- a/runners/ant/src/main/kotlin/ant/dokka.kt +++ b/runners/ant/src/main/kotlin/ant/dokka.kt @@ -64,6 +64,8 @@ class AntPassConfig(task: Task) : DokkaConfiguration.PassConfiguration { get() = buildTargets.filter { it.value != "" } .map { it.value } + override var sinceKotlin: String = "1.0" + private val samplesPath: Path by lazy { Path(task.project) } private val includesPath: Path by lazy { Path(task.project) } private val buildClassPath: Path by lazy { Path(task.project) } -- cgit