Why does the KMM application type generate an Andr...
# getting-started
m
Why does the KMM application type generate an Android module with a "java" directory rather than a "kotlin" one? I suppose the more important (?) question is, is there any reason not to rename it "kotlin"?
e
Android sourceset is… special. it doesn't use a "kotlin" directory unless you specifically configure it, e.g.
android.sourceSets.all { java.srcDir("src/$name/kotlin" }
.
since the Kotlin plugin uses Android sourceset's java.srcDirs, "java" works right out of the box
m
Thank you @ephemient. Therefore would I be right in thinking there's no harm in making the necessary changes? Surely it looks likely such a change will become standard in the not too distant future?
e
yes, it's safe to make those changes. I'm not sure if it will become standard, this is how it's been for the whole existence of kotlin-android gradle plugin, and the android plugin doesn't have a way to register custom sourcedirectorysets
👍 1
a
actually the android plugin allows registering custom directory source and resources sets. I have been doing it for quite a while now