I have an Android project set up so that uses module system as a way to "plug-in" features selectively.
Here's what the project hierarchy looks like:
- app
- manifests
- java
- assets
- res
- module1
- manifests
- java
- assets
- res
module2
- manifests
- java
- assets
- res
...
Basically what I want to do is selectively include these module1
and module2
so that I can decide what module to include when building.
I already have achieved this by adding
compile project(:module1)
to build.gradle
and setting the settings.gradle file as follows:
include ':app', ':module1'
But here's the real question: Honestly I don't know why I have to modify both of these files.
Technically the build.gradle
file describes the dependency between modules, which means if I included :module1, doesn't this imply that I am including this in the build?
Is there a way to make a change to a single file, and it would take care of everything, instead of updating these two files?