From c3eeb211bc51e19e1dc76c2fad4993bcf4999f5d Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Fri, 10 Jul 2020 10:56:50 +0200 Subject: Implement `AbstractDokkaTask` to suport DokkaMultimoduleTask --- .../dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'runners/gradle-plugin/src/test/kotlin') 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 3ba5602f..b4b54957 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,7 +13,9 @@ class KotlinDslDokkaTaskConfigurationTest { fun `configure project using dokka extension function`() { val project = ProjectBuilder.builder().build() project.plugins.apply("org.jetbrains.dokka") - project.dokka { this.outputDirectory = "test" } + project.tasks.withType(DokkaTask::class.java).forEach { dokkaTask -> + dokkaTask.outputDirectory = "test" + } project.tasks.withType(DokkaTask::class.java).forEach { dokkaTask -> assertEquals("test", dokkaTask.outputDirectory) @@ -25,8 +27,8 @@ class KotlinDslDokkaTaskConfigurationTest { val project = ProjectBuilder.builder().build() project.plugins.apply("org.jetbrains.dokka") - project.dokka { - dokkaSourceSets.run { + project.tasks.withType(DokkaTask::class.java).forEach { dokkaTask -> + dokkaTask.dokkaSourceSets.run { val commonMain = create("commonMain") val jvmMain = create("jvmMain") { it.dependsOn("commonMain") @@ -59,7 +61,7 @@ class KotlinDslDokkaTaskConfigurationTest { val project = ProjectBuilder.builder().build() project.plugins.apply("org.jetbrains.dokka") - project.dokka { + project.tasks.withType(DokkaTask::class.java).first().run { dokkaSourceSets.run { val commonMain = create("commonMain") val jvmMain = create("jvmMain") { @@ -81,7 +83,7 @@ class KotlinDslDokkaTaskConfigurationTest { val kotlin = project.extensions.getByName("kotlin") as KotlinJvmProjectExtension - project.dokka { + project.tasks.withType(DokkaTask::class.java).first().run { dokkaSourceSets.run { val special = create("special") { it.dependsOn(kotlin.sourceSets.getByName("main")) -- cgit