January 2018
Intermediate to advanced
434 pages
14h 1m
English
The default structure of the project, when you create a new project in IntelliJ, is as illustrated:
project - src - main (root) - kotlin - java
If you want to have a different structure of the project, you should declare it in build.gradle. You can do it by adding the following lines in build.gradle.
The corresponding sourceSets property should be updated if not using the default convention:
sourceSets { main.kotlin.srcDirs += 'src/main/myKotlin' main.java.srcDirs += 'src/main/myJava'}
Though you can keep Kotlin and Java files under the same package, it’s a good practice to keep them separated.
Read now
Unlock full access