How to exclude kotlin files from compiling with gradle


#1

With Java, we are excluding like this:

java {
    srcDir 'src'
    exclude '**/myTests/**'
}

I want to make the same thing with kotlin.
Trying to find some docs on this in official documentation configuring kotlin with no success.
What i’ve expected and already tried (and of course with no success):

kotlin {
    srcDir 'src'
    exclude '**/myTests/*.kt'
}