aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'runners/gradle-plugin/src/main')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt4
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt11
2 files changed, 9 insertions, 6 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt
index e3b82e7c..9da9352c 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleFileLayout.kt
@@ -47,7 +47,7 @@ interface DokkaMultiModuleFileLayout {
internal fun DokkaMultiModuleTask.targetChildOutputDirectory(
child: AbstractDokkaTask
): File {
- return fileLayout.targetChildOutputDirectory(this, child)
+ return fileLayout.get().targetChildOutputDirectory(this, child)
}
internal fun DokkaMultiModuleTask.copyChildOutputDirectories() {
@@ -57,7 +57,7 @@ internal fun DokkaMultiModuleTask.copyChildOutputDirectories() {
}
internal fun DokkaMultiModuleTask.copyChildOutputDirectory(child: AbstractDokkaTask) {
- val targetChildOutputDirectory = project.file(fileLayout.targetChildOutputDirectory(this, child))
+ val targetChildOutputDirectory = project.file(fileLayout.get().targetChildOutputDirectory(this, child))
val sourceChildOutputDirectory = child.outputDirectory.getSafe()
/* Pointing to the same directory -> No copy necessary */
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 29e0d76e..f6690c3b 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
@@ -1,6 +1,7 @@
package org.jetbrains.dokka.gradle
import org.gradle.api.internal.tasks.TaskDependencyInternal
+import org.gradle.api.provider.Property
import org.gradle.api.tasks.*
import org.jetbrains.dokka.DokkaConfigurationImpl
import org.jetbrains.dokka.DokkaModuleDescriptionImpl
@@ -19,14 +20,16 @@ open class DokkaMultiModuleTask : AbstractDokkaParentTask(DokkaMultimoduleBootst
* This file has to be placed inside the subproject root directory.
*/
@Internal
- var documentationFileName: String = "README.md"
+ val documentationFileName: Property<String> = project.objects.safeProperty<String>()
+ .safeConvention("README.md")
@Internal
- var fileLayout: DokkaMultiModuleFileLayout = DokkaMultiModuleFileLayout.CompactInParent
+ var fileLayout: Property<DokkaMultiModuleFileLayout> = project.objects.safeProperty<DokkaMultiModuleFileLayout>()
+ .safeConvention(DokkaMultiModuleFileLayout.CompactInParent)
@get:InputFiles
internal val childDocumentationFiles: Iterable<File>
- get() = childDokkaTasks.map { task -> task.project.projectDir.resolve(documentationFileName) }
+ get() = childDokkaTasks.map { task -> task.project.projectDir.resolve(documentationFileName.getSafe()) }
@get:InputFiles
internal val sourceChildOutputDirectories: Iterable<File>
@@ -59,7 +62,7 @@ open class DokkaMultiModuleTask : AbstractDokkaParentTask(DokkaMultimoduleBootst
DokkaModuleDescriptionImpl(
name = dokkaTask.project.name,
path = targetChildOutputDirectory(dokkaTask).relativeTo(outputDirectory.getSafe()),
- docFile = dokkaTask.project.projectDir.resolve(documentationFileName).absoluteFile
+ docFile = dokkaTask.project.projectDir.resolve(documentationFileName.get()).absoluteFile
)
}
)