aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/configuration.kt1
-rw-r--r--core/src/main/kotlin/defaultConfiguration.kt1
-rw-r--r--plugins/base/src/main/kotlin/DokkaBase.kt16
-rw-r--r--plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt2
-rw-r--r--plugins/gfm/src/main/kotlin/GfmPlugin.kt2
-rw-r--r--plugins/gfm/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt4
-rw-r--r--plugins/javadoc/src/main/kotlin/javadoc/JavadocPlugin.kt11
-rw-r--r--plugins/jekyll/src/main/kotlin/JekyllPlugin.kt3
-rw-r--r--runners/cli/src/main/kotlin/cli/main.kt5
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt4
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt4
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt4
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt1
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt4
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt10
-rw-r--r--testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt1
16 files changed, 19 insertions, 54 deletions
diff --git a/core/src/main/kotlin/configuration.kt b/core/src/main/kotlin/configuration.kt
index c531ab9a..eaee351b 100644
--- a/core/src/main/kotlin/configuration.kt
+++ b/core/src/main/kotlin/configuration.kt
@@ -66,7 +66,6 @@ fun DokkaConfiguration.toJson(): String {
interface DokkaConfiguration {
val outputDir: String
- val format: String
val cacheRoot: String?
val offlineMode: Boolean
val failOnWarning: Boolean
diff --git a/core/src/main/kotlin/defaultConfiguration.kt b/core/src/main/kotlin/defaultConfiguration.kt
index 79beddd7..02274e5d 100644
--- a/core/src/main/kotlin/defaultConfiguration.kt
+++ b/core/src/main/kotlin/defaultConfiguration.kt
@@ -7,7 +7,6 @@ import java.io.Serializable
data class DokkaConfigurationImpl(
override val outputDir: String,
- override val format: String,
override val cacheRoot: String?,
override val offlineMode: Boolean,
override val sourceSets: List<DokkaSourceSetImpl>,
diff --git a/plugins/base/src/main/kotlin/DokkaBase.kt b/plugins/base/src/main/kotlin/DokkaBase.kt
index 8fed0afd..bcd2c93e 100644
--- a/plugins/base/src/main/kotlin/DokkaBase.kt
+++ b/plugins/base/src/main/kotlin/DokkaBase.kt
@@ -135,7 +135,7 @@ class DokkaBase : DokkaPlugin() {
}
val htmlRenderer by extending {
- CoreExtensions.renderer providing ::HtmlRenderer applyIf { format == "html" }
+ CoreExtensions.renderer providing ::HtmlRenderer
}
val defaultKotlinAnalysis by extending {
@@ -159,7 +159,7 @@ class DokkaBase : DokkaPlugin() {
}
val rootCreator by extending {
- htmlPreprocessors with RootCreator applyIf { format == "html" }
+ htmlPreprocessors with RootCreator
}
val defaultSamplesTransformer by extending {
@@ -182,19 +182,19 @@ class DokkaBase : DokkaPlugin() {
}
val navigationPageInstaller by extending {
- htmlPreprocessors with NavigationPageInstaller order { after(rootCreator) } applyIf { format == "html" }
+ htmlPreprocessors with NavigationPageInstaller order { after(rootCreator) }
}
val searchPageInstaller by extending {
- htmlPreprocessors with SearchPageInstaller order { after(rootCreator) } applyIf { format == "html" }
+ htmlPreprocessors with SearchPageInstaller order { after(rootCreator) }
}
val resourceInstaller by extending {
- htmlPreprocessors with ResourceInstaller order { after(rootCreator) } applyIf { format == "html" }
+ htmlPreprocessors with ResourceInstaller order { after(rootCreator) }
}
val styleAndScriptsAppender by extending {
- htmlPreprocessors with StyleAndScriptsAppender order { after(rootCreator) } applyIf { format == "html" }
+ htmlPreprocessors with StyleAndScriptsAppender order { after(rootCreator) }
}
val packageListCreator by extending {
@@ -204,7 +204,7 @@ class DokkaBase : DokkaPlugin() {
"html",
"html"
)
- } order { after(rootCreator) } applyIf { format == "html" }
+ } order { after(rootCreator) }
}
val sourcesetDependencyAppender by extending {
@@ -216,4 +216,4 @@ class DokkaBase : DokkaPlugin() {
MultimodulePageCreator(it)
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt
index 5ac5aafa..397a9c45 100644
--- a/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt
+++ b/plugins/base/src/test/kotlin/renderers/html/HtmlRenderingOnlyTestBase.kt
@@ -24,7 +24,7 @@ abstract class HtmlRenderingOnlyTestBase : RenderingOnlyTestBase<Element>() {
DokkaBase().externalLocationProviderFactory to { ::JavadocExternalLocationProviderFactory },
DokkaBase().externalLocationProviderFactory to { ::DokkaExternalLocationProviderFactory },
testConfiguration = DokkaConfigurationImpl(
- "", "", null, false, emptyList(), emptyList(), emptyMap(), emptyList(), false
+ "", null, false, emptyList(), emptyList(), emptyMap(), emptyList(), false
)
)
diff --git a/plugins/gfm/src/main/kotlin/GfmPlugin.kt b/plugins/gfm/src/main/kotlin/GfmPlugin.kt
index 15fe6943..a07a26f2 100644
--- a/plugins/gfm/src/main/kotlin/GfmPlugin.kt
+++ b/plugins/gfm/src/main/kotlin/GfmPlugin.kt
@@ -24,14 +24,12 @@ class GfmPlugin : DokkaPlugin() {
val renderer by extending {
(CoreExtensions.renderer
providing { CommonmarkRenderer(it) }
- applyIf { format == "gfm" }
override dokkaBase.htmlRenderer)
}
val locationProvider by extending {
(dokkaBase.locationProviderFactory
providing { MarkdownLocationProviderFactory(it) }
- applyIf { format == "gfm" }
override dokkaBase.locationProvider)
}
diff --git a/plugins/gfm/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt b/plugins/gfm/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt
index 64e55f4f..6d0dd3a6 100644
--- a/plugins/gfm/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt
+++ b/plugins/gfm/src/test/kotlin/renderers/gfm/GfmRenderingOnlyTestBase.kt
@@ -22,11 +22,11 @@ abstract class GfmRenderingOnlyTestBase : RenderingOnlyTestBase<String>() {
GfmPlugin().gfmPreprocessors to { _ -> RootCreator },
testConfiguration = DokkaConfigurationImpl(
- "", "", null, false, emptyList(), emptyList(), emptyMap(), emptyList(), false
+ "", null, false, emptyList(), emptyList(), emptyMap(), emptyList(), false
)
)
override val renderedContent: String by lazy {
files.contents.getValue("test-page.md")
}
-} \ No newline at end of file
+}
diff --git a/plugins/javadoc/src/main/kotlin/javadoc/JavadocPlugin.kt b/plugins/javadoc/src/main/kotlin/javadoc/JavadocPlugin.kt
index 1a14e97e..8283bd78 100644
--- a/plugins/javadoc/src/main/kotlin/javadoc/JavadocPlugin.kt
+++ b/plugins/javadoc/src/main/kotlin/javadoc/JavadocPlugin.kt
@@ -20,7 +20,6 @@ class JavadocPlugin : DokkaPlugin() {
val dokkaJavadocPlugin by extending {
(CoreExtensions.renderer
providing { ctx -> KorteJavadocRenderer(dokkaBasePlugin.querySingle { outputWriter }, ctx, "views") }
- applyIf { format == javadocFormat }
override dokkaBasePlugin.htmlRenderer)
}
@@ -31,13 +30,13 @@ class JavadocPlugin : DokkaPlugin() {
dokkaBasePlugin.querySingle { signatureProvider },
context.logger
)
- } override dokkaBasePlugin.documentableToPageTranslator applyIf { format == javadocFormat }
+ } override dokkaBasePlugin.documentableToPageTranslator
}
val javadocLocationProviderFactory by extending {
locationProviderFactory providing { context ->
JavadocLocationProviderFactory(context)
- } applyIf { format == javadocFormat }
+ }
}
val javadocSignatureProvider by extending {
@@ -48,11 +47,7 @@ class JavadocPlugin : DokkaPlugin() {
dokkaBasePlugin.commentsToContentConverter
), ctx.logger
)
- } override kotinAsJavaPlugin.javaSignatureProvider applyIf { format == javadocFormat }
- }
-
- companion object {
- private val javadocFormat = "javadoc"
+ } override kotinAsJavaPlugin.javaSignatureProvider
}
}
diff --git a/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt b/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt
index ad83ca76..f6ea894c 100644
--- a/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt
+++ b/plugins/jekyll/src/main/kotlin/JekyllPlugin.kt
@@ -21,7 +21,6 @@ class JekyllPlugin : DokkaPlugin() {
val renderer by extending {
(CoreExtensions.renderer
providing { JekyllRenderer(it) }
- applyIf { format == "jekyll" }
override plugin<DokkaBase>().htmlRenderer)
}
@@ -54,4 +53,4 @@ class JekyllRenderer(
content(builder, page)
return builder.toString()
}
-} \ 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 d284e653..a30ffa42 100644
--- a/runners/cli/src/main/kotlin/cli/main.kt
+++ b/runners/cli/src/main/kotlin/cli/main.kt
@@ -20,11 +20,6 @@ class GlobalArguments(args: Array<String>) : DokkaConfiguration {
override val outputDir by parser.option(ArgType.String, description = "Output directory path")
.default(DokkaDefaults.outputDir)
- override val format by parser.option(
- ArgType.String,
- description = "Output format (html, gfm, jekyll)"
- ).default(DokkaDefaults.format)
-
override val cacheRoot by parser.option(
ArgType.String,
description = "Path to cache folder, or 'default' to use ~/.cache/dokka, if not provided caching is disabled"
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt
index 7aa7c0fa..da834775 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt
@@ -37,8 +37,8 @@ open class DokkaCollectorTask : DefaultTask() {
// TODO this certainly not the ideal solution
configuration = configurations.fold(initial) { acc, it: GradleDokkaConfigurationImpl ->
- if (acc.format != it.format || acc.cacheRoot != it.cacheRoot)
- throw IllegalStateException("Dokka task configurations differ on core arguments (format, cacheRoot)")
+ if (acc.cacheRoot != it.cacheRoot)
+ throw IllegalStateException("Dokka task configurations differ on core argument cacheRoot")
acc.sourceSets = acc.sourceSets + it.sourceSets
acc.pluginsClasspath = (acc.pluginsClasspath + it.pluginsClasspath).distinct()
acc
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt
index 3ed81054..76a2e80a 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt
@@ -21,9 +21,6 @@ open class DokkaMultimoduleTask : DefaultTask(), Configurable {
var documentationFileName: String = "README.md"
@Input
- var outputFormat: String = "html"
-
- @Input
var outputDirectory: String = ""
@Input
@@ -73,7 +70,6 @@ open class DokkaMultimoduleTask : DefaultTask(), Configurable {
internal fun getConfiguration(): GradleDokkaConfigurationImpl =
GradleDokkaConfigurationImpl().apply {
outputDir = project.file(outputDirectory).absolutePath
- format = outputFormat
pluginsClasspath = plugins.resolve().toList()
pluginsConfiguration = this@DokkaMultimoduleTask.pluginsConfiguration
modules = project.subprojects
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
index 09088968..2bdfa0bd 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
@@ -46,9 +46,6 @@ open class DokkaTask : DefaultTask(), Configurable {
}
@Input
- var outputFormat: String = "html"
-
- @Input
var outputDirectory: String = ""
@Input
@@ -186,7 +183,6 @@ open class DokkaTask : DefaultTask(), Configurable {
return GradleDokkaConfigurationImpl().apply {
outputDir = project.file(outputDirectory).absolutePath
- format = outputFormat
cacheRoot = this@DokkaTask.cacheRoot
offlineMode = this@DokkaTask.offlineMode
sourceSets = defaultModulesConfiguration
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt
index 49819f9a..b6b8399c 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt
@@ -225,7 +225,6 @@ class GradleDokkaModuleDescription : DokkaModuleDescription {
class GradleDokkaConfigurationImpl : DokkaConfiguration {
override var outputDir: String = ""
- override var format: String = DokkaDefaults.format
override var cacheRoot: String? = DokkaDefaults.cacheRoot
override var offlineMode: Boolean = DokkaDefaults.offlineMode
override var failOnWarning: Boolean = DokkaDefaults.failOnWarning
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt
index da6daeea..3ba5602f 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt
@@ -13,10 +13,10 @@ class KotlinDslDokkaTaskConfigurationTest {
fun `configure project using dokka extension function`() {
val project = ProjectBuilder.builder().build()
project.plugins.apply("org.jetbrains.dokka")
- project.dokka { this.outputFormat = "test" }
+ project.dokka { this.outputDirectory = "test" }
project.tasks.withType(DokkaTask::class.java).forEach { dokkaTask ->
- assertEquals("test", dokkaTask.outputFormat)
+ assertEquals("test", dokkaTask.outputDirectory)
}
}
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index aa92516f..fdd1c646 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -170,8 +170,6 @@ abstract class AbstractDokkaMojo : AbstractMojo() {
protected abstract fun getOutDir(): String
- protected abstract fun getOutFormat(): String
-
override fun execute() {
if (skip) {
log.info("Dokka skip parameter is true so no dokka output will be produced")
@@ -239,7 +237,6 @@ abstract class AbstractDokkaMojo : AbstractMojo() {
val configuration = DokkaConfigurationImpl(
outputDir = getOutDir(),
- format = getOutFormat(),
offlineMode = offlineMode,
cacheRoot = cacheRoot,
sourceSets = listOf(sourceSet).also {
@@ -319,13 +316,9 @@ abstract class AbstractDokkaMojo : AbstractMojo() {
requiresProject = true
)
class DokkaMojo : AbstractDokkaMojo() {
- @Parameter(required = true, defaultValue = "html")
- var outputFormat: String = "html"
-
@Parameter(required = true, defaultValue = "\${project.basedir}/target/dokka")
var outputDir: String = ""
- override fun getOutFormat() = outputFormat
override fun getOutDir() = outputDir
}
@@ -339,8 +332,6 @@ class DokkaMojo : AbstractDokkaMojo() {
class DokkaJavadocMojo : AbstractDokkaMojo() {
@Parameter(required = true, defaultValue = "\${project.basedir}/target/dokkaJavadoc")
var outputDir: String = ""
-
- override fun getOutFormat() = "javadoc"
override fun getOutDir() = outputDir
}
@@ -396,7 +387,6 @@ class DokkaJavadocJarMojo : AbstractDokkaMojo() {
@Component(role = Archiver::class, hint = "jar")
private var jarArchiver: JarArchiver? = null
- override fun getOutFormat() = "javadoc"
override fun getOutDir() = outputDir
override fun execute() {
diff --git a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
index 381fb2af..9aae4b0c 100644
--- a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
+++ b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
@@ -164,7 +164,6 @@ abstract class AbstractCoreTest {
private val sourceSets = mutableListOf<DokkaSourceSetImpl>()
fun build() = DokkaConfigurationImpl(
outputDir = outputDir,
- format = format,
cacheRoot = cacheRoot,
offlineMode = offlineMode,
sourceSets = sourceSets,