I am building a multi-module app, and I have included the modules in the project-level settngs.gradle file, in this manner:
include(":sub_module_1")
project(":sub_module_1").projectDir = file("../path/to/sub_module_1_folder")
include(":sub_module_2")
project(":sub_module_2").projectDir = file("../path/to/sub_module_2_folder")
include(":sub_module_3")
project(":sub_module_3").projectDir = file("../path/to/sub_module_3_folder")
Then I implement them in the app-level build.gradle file, in this manner:
implementation project(":sub_module_1")
implementation project(":sub_module_2")
implementation project(":sub_module_3")
So far, so good. The project builds and runs as expected.
However, in the Project Explorer (both Android & Project tabs), some modules appear inside the main project, while some appear outside of it. But all of the sub-module file folders are located outside of the main project folder. Here's an illustration of the Project Explorer (Android):
> sub_module_1
|__ manifests
|__ java
|__ res
> main_project
> app
|__ manifests
|__ java
|__ res
> sub_module_2
|__ java
> sub_module_3
|__ manifests
|__ java
|__ res
> Gradle Scripts
Q: What could be causing this?