diff options
Diffstat (limited to 'build-logic/src/main/kotlin/org/jetbrains/internal')
| -rw-r--r-- | build-logic/src/main/kotlin/org/jetbrains/internal/gradleKotlinDslAccessors.kt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/build-logic/src/main/kotlin/org/jetbrains/internal/gradleKotlinDslAccessors.kt b/build-logic/src/main/kotlin/org/jetbrains/internal/gradleKotlinDslAccessors.kt new file mode 100644 index 00000000..78bbc568 --- /dev/null +++ b/build-logic/src/main/kotlin/org/jetbrains/internal/gradleKotlinDslAccessors.kt @@ -0,0 +1,27 @@ +@file:Suppress("PackageDirectoryMismatch") + +package org.gradle.kotlin.dsl // for convenience use a default package for gradle.kts scripts + +import org.gradle.api.Project +import org.jetbrains.DokkaBuildProperties + +/* + * Utility functions for accessing Gradle extensions that are created by convention plugins. + * + * (Gradle can't generate the nice DSL accessors for the project that defines them) + * + * These functions are not needed outside the convention plugins project and should be marked as + * `internal` + */ + +/** + * Retrieves the [dokkaBuild][org.jetbrains.DokkaBuildProperties] extension. + */ +internal val Project.dokkaBuild: DokkaBuildProperties + get() = extensions.getByType() + +/** + * Configures the [dokkaBuild][org.jetbrains.DokkaBuildProperties] extension. + */ +internal fun Project.dokkaBuild(configure: DokkaBuildProperties.() -> Unit) = + extensions.configure(configure) |
