Gradle build of Kotlin project generates duplicate class files


Using the Spring Initializr, I created a simple Kotlin Spring Boot project using Gradle as the build tool. I am using Gradle 4.0.1. When I run gradle build, I observe that two sets of identical class files are getting emitted. One set is under build/classes/java and the other set is under build/kotlin-classes. Why are two sets of class files being emitted?