Github Actions for Modular Android Projects
As most Android Developers know, an Android Project may have many different modules.
If you change one single module and submit a Pull Request, most CI workflows will try to build/test all the existing modules, which might take a lot of time, when in reality you only need to build the module you changed.
This GitHub Action aims to solve that problem. When you submit a Pull Request, it will only build the module you changed or no module at all if you left them untouched (in case of documentation or configuration changes).
Usage
Add it to your workflow YAML like this:
- name: Build with Modular Action
uses: rosariopfernandes/modular-android-action@v0.2.0
with
for-each-module: 'assembleDebug'
for-all-modules: 'check'
As you can see, it takes 2 arguments:
-
for-each-module
- gradle task to run for each module. -
for-all-modules
- gradle…