My android project is written 100% in Kotlin and I wanted to rename the java directory to kotlin to be consistent. I added
sourceSets{
main.java.srcDirs +=
Android Studio 3.6 has the same behavior. This is how I fixed it, in app/build.gradle:
// Register kotlin files
android.sourceSets {
androidTest.java.srcDirs += "src/androidTest/kotlin"
debug.java.srcDirs += "src/debug/kotlin"
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
}