This is a small Gradle DSL that can be used to include multiple modules. Let's imagine that we have a set up like this:
root
+-- app
+-- modules
+-- core
+-- androidx
+-- core
The traditional way to include these structure would look something like this:
include(":app")
include(":modules:core")
include(":modules:androidx:core")
With this dsl we can do this instead:
include {
":app"()
":modules" {
":core"()
":androidx" {
":core"()
}
}
}
This looks more like the actual folder structure. In this example there aren't many modules, however it should be aparent that as the project grows this way of defining the project structure will scale better. Code should be easier to refactor, so changing the name of a parent module would reqauire to just change the name on one place and rename the folder. Easy peasy!