It's _very inconvenient_ to use extensions having Closure in their API: https://docs.gradle.org/current/userguide/kotlin_dsl.html#groovy_closures_from_kotlin `DependencyLockExtension#setDependencyFilter` should use Action instead of Closure.