Avoid resolution ambiguity for cinterop DSL

Earlier we used to have two methods: cinterops(Container.() -> Unit) and
cinterops(Action<Container>). It's OK for Groovy DSL but causes resolution
ambiguity in Kotlin DSL. This patch removes the first overload to avoid
this situation. The second overload still can be called in Kotlin DSL
as `cinterops { ... }`.
This commit is contained in:
Ilya Matveev
2019-03-06 21:02:53 +03:00
parent 8a012c83e5
commit 2999cdd3e0
@@ -181,7 +181,6 @@ class KotlinNativeCompilation(
linkerOptsNoWarn = value
}
fun cinterops(action: NamedDomainObjectContainer<DefaultCInteropSettings>.() -> Unit) = cinterops.action()
fun cinterops(action: Closure<Unit>) = cinterops(ConfigureUtil.configureUsing(action))
fun cinterops(action: Action<NamedDomainObjectContainer<DefaultCInteropSettings>>) = action.execute(cinterops)