blob: 48c230ea94a8e556eeda603a901acb0c154f5f48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import org.gradle.api.plugins.ExtensionAware
import org.gradle.kotlin.dsl.DependencyHandlerScope
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.findByType
inline fun <reified T : Any> ExtensionAware.configureIf(crossinline block: T.() -> Unit) {
if (extensions.findByType<T>() != null) {
extensions.configure<T> { block() }
}
}
val ktor_version = "3.0.3"
fun DependencyHandlerScope.declareKtorVersion() {
"implementation"(platform("io.ktor:ktor-bom:$ktor_version"))
}
|