0

I am adding Kotlin SourceSets to my project but I am unable to see Kotlin source in the Project layout.

What I have in build.gradle.kts

sourceSets {
    getByName("main").java.srcDirs("src/main/kotlin")
}

What I see in the project path

enter image description here

And also when I run ./gradlew sourcesets task I see 2 sources for the module.

enter image description here

I googled it but couldn't find useful info. How can I have kotlin instead of java? Thanks.

nuhkoca
  • 1,777
  • 4
  • 20
  • 44

1 Answers1

0

Okay, It is too simple to do so. Just delete java source and create a new directory called kotlin inside main. Everything will be done.

nuhkoca
  • 1,777
  • 4
  • 20
  • 44