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 +=
I think this feature Android Studio. By default, the folder with the source code it is marked as "java". Even if you are in the "src/main" folder contains "kotlin" and "java".