How to exclude kotlin files from compiling with gradle

When I create an Android Project with Java only, these code below works well:

    sourceSets {
        main {
            java {
                exclude '**/ExcludeClass.java'
            }
        }
    }

But when I apply the kotlin-android plugin, it is complete failure. This class wasn’t removed by gradle(both of them are not removed):

    sourceSets {
        main {
            java {
                exclude '**/TestExcludeClass.java'
            }

            kotlin {
                exclude '**/TestExcludeKotlinClass.kt'
            }
        }
    }

Can anyone tell me how to exclude classes in an Android project with Kotlin?