From 03ea4d233b51cf90b5028586355e0311151b6780 Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Wed, 12 Aug 2020 14:41:10 +0200 Subject: DokkaMultiModuleTask: Use Property/Provider API --- .../org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt | 6 +++--- .../kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'runners/gradle-plugin/src/test/kotlin/org/jetbrains') diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt index 6ec3dd57..407b1ef9 100644 --- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt +++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayoutTest.kt @@ -57,7 +57,7 @@ class DokkaMultiModuleFileLayoutTest { subFolder.mkdirs() subFolder.resolve("other.file").writeText("other text") - parentTask.fileLayout = object : DokkaMultiModuleFileLayout { + parentTask.fileLayout by object : DokkaMultiModuleFileLayout { override fun targetChildOutputDirectory(parent: DokkaMultiModuleTask, child: AbstractDokkaTask): File { return parent.project.file("target/output") } @@ -105,7 +105,7 @@ class DokkaMultiModuleFileLayoutTest { val project = ProjectBuilder.builder().build() val childTask = project.tasks.create("child") val parentTask = project.tasks.create("parent") - parentTask.fileLayout = object : DokkaMultiModuleFileLayout { + parentTask.fileLayout by object : DokkaMultiModuleFileLayout { override fun targetChildOutputDirectory(parent: DokkaMultiModuleTask, child: AbstractDokkaTask): File { return child.outputDirectory.getSafe().resolve("subfolder") } @@ -118,7 +118,7 @@ class DokkaMultiModuleFileLayoutTest { val project = ProjectBuilder.builder().build() val childTask = project.tasks.create("child") val parentTask = project.tasks.create("parent") - parentTask.fileLayout = NoCopy + parentTask.fileLayout by NoCopy parentTask.copyChildOutputDirectory(childTask) } } diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt index 640d980b..1e444d80 100644 --- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt +++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt @@ -58,7 +58,7 @@ class DokkaMultiModuleTaskTest { assertTrue(multimoduleTasks.isNotEmpty(), "Expected at least one multimodule task") multimoduleTasks.configureEach { task -> - task.documentationFileName = "customDocumentationFileName.md" + task.documentationFileName by "customDocumentationFileName.md" task.outputDirectory by task.project.buildDir.resolve("customOutputDirectory") task.cacheRoot by File("customCacheRoot") task.pluginsConfiguration.put("pluginA", "configA") @@ -131,7 +131,7 @@ class DokkaMultiModuleTaskTest { val childTask = child.tasks.create("child") parentTask.addChildTask(childTask) - parentTask.documentationFileName = "module.txt" + parentTask.documentationFileName by "module.txt" assertEquals( listOf(parent.file("child/module.txt")), parentTask.childDocumentationFiles, @@ -165,7 +165,7 @@ class DokkaMultiModuleTaskTest { val childTask = child.tasks.create("child") parentTask.addChildTask(childTask) - parentTask.fileLayout = object : DokkaMultiModuleFileLayout { + parentTask.fileLayout by object : DokkaMultiModuleFileLayout { override fun targetChildOutputDirectory(parent: DokkaMultiModuleTask, child: AbstractDokkaTask): File { return parent.project.buildDir.resolve(child.name) } -- cgit