Closed sandwwraith closed 4 months ago
DSL mentioned in the documentation:
apiValidation { @OptIn(kotlinx.validation.ExperimentalBCVApi::class) klib { enabled = true } }
works for Kotlin, but for some reason, when one wants to use it in Groovy, one should write it slightly differently:
apiValidation { klib { it.enabled = true } }
It looks like there is no particular reason for DSL having it.enabled = true instead of just enabled = true.
it.enabled = true
enabled = true
This:
https://github.com/Kotlin/binary-compatibility-validator/blob/3a7003363502236e64bbf044540e569b3eb808a4/src/main/kotlin/ApiValidationExtension.kt#L89
Should use an Action<KlibValidationSettings> which will do the right thing in Groovy and use Kotlin's SAM-with-receiver compiler plugin to do the right thing for Kotlin.
Action<KlibValidationSettings>
DSL mentioned in the documentation:
works for Kotlin, but for some reason, when one wants to use it in Groovy, one should write it slightly differently:
It looks like there is no particular reason for DSL having
it.enabled = true
instead of justenabled = true
.