diff options
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/org/jetbrains')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt | 2 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt index 52e7d3df..2c761eef 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt @@ -33,7 +33,7 @@ abstract class AbstractDokkaTask : DefaultTask() { @OutputDirectory val outputDirectory: Property<File> = project.objects.safeProperty<File>() - .safeConvention(defaultDokkaOutputDirectory()) + .safeConvention(project.provider { defaultDokkaOutputDirectory() }) @Optional @InputDirectory diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt index f20513d2..18026e77 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaProperty.kt @@ -13,6 +13,10 @@ internal inline fun <reified T : Any> Property<T?>.safeConvention(value: T): Pro return this.convention(value).cast() } +internal inline fun <reified T : Any> Property<T?>.safeConvention(provider: Provider<T?>): Property<T> { + return this.convention(provider).cast() +} + @OptIn(ExperimentalStdlibApi::class) internal inline fun <reified T> Provider<T>.getSafe(): T = if (typeOf<T>().isMarkedNullable) orNull as T |