From d1e16a47819509ed645bb93e1a173e0a97025cef Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Wed, 8 Jan 2025 19:25:29 +0100 Subject: build: Move mod to subproject --- build-src/src/main/kotlin/helpers.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 build-src/src/main/kotlin/helpers.kt (limited to 'build-src/src') diff --git a/build-src/src/main/kotlin/helpers.kt b/build-src/src/main/kotlin/helpers.kt new file mode 100644 index 0000000..5afef4f --- /dev/null +++ b/build-src/src/main/kotlin/helpers.kt @@ -0,0 +1,10 @@ +import org.gradle.api.plugins.ExtensionAware +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.findByType + + +inline fun ExtensionAware.configureIf(crossinline block: T.() -> Unit) { + if (extensions.findByType() != null) { + extensions.configure { block() } + } +} -- cgit