From 2c967fb5389b0f7891b59d8a9334e4efca546b46 Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Thu, 9 Jul 2020 16:30:36 +0200 Subject: Remove `format` from dokka DokkaConfiguration --- .../src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt | 4 ++-- .../main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt | 4 ---- .../src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 4 ---- .../kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt | 1 - .../org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt | 4 ++-- 5 files changed, 4 insertions(+), 13 deletions(-) (limited to 'runners/gradle-plugin/src') 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 @@ -20,9 +20,6 @@ open class DokkaMultimoduleTask : DefaultTask(), Configurable { @Input var documentationFileName: String = "README.md" - @Input - var outputFormat: String = "html" - @Input var outputDirectory: String = "" @@ -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 @@ -45,9 +45,6 @@ open class DokkaTask : DefaultTask(), Configurable { dependsOn(Callable { kotlinTasks.map { it.taskDependencies } }) } - @Input - var outputFormat: String = "html" - @Input var outputDirectory: String = "" @@ -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) } } -- cgit