default folder structure look like this:
app:
-manifests
-java
-res
Is there a way that I can create another folder here just for kotlin? So it gonna look like this:
app:
-manifest
-java
-kotlin
-res
Yes, it's possible. Add the folder called kotlin and after that add the following lines to the android section of your app/build.gradle file:
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
If you want to read more about Kotlin-Android projects in Android Studio, you can read this.
Of course, just mark the folder as source. Actually, default Gradle Kotlin plugin automatically recognizes src/main/kotlin and src/main/java as source folders.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With