Something more staticaly type than Groovy closure
# gradle
s
Something more staticaly type than Groovy closure
j
I ended up creating the following to get around this
Copy code
/**
     * Kotlin-friendly sources config.
     */
    private fun AsciidoctorTask.sources(patternFunction: PatternSet.() -> Unit) {
        this.sources(object : Closure<Unit>(this) {
            override fun call() {
                (delegate as PatternSet).patternFunction()
            }
        })
    }
Which looks a lot nicer 🙂
Copy code
sources {
                include("index.adoc")
            }
I think that was before
delegateClosureOf()
came along