A module plugin for generate module by template.
Reduce boilerplate routine in multi-module gradle projects.
To make it works, follow these steps:
- Create a directory called gradle_templates in the root of your project.
- Create subdirectories in that folder. Their names don't matter.
- Inside of each folder create a config.yml file and define a name of your module. A template of config.yml can be seen below root project. The file name is config.yml.tl
- Also, create additional folders static and template and put your files in them. s Config.yml
You can add configuration in this file. Take the following as examples:
name: "module-${module.baseName}"
genDir: "modules"
directories:
- "src/main/res/layout/drawable"
- "src/main/res/layout/drawable-xhdpi"
- "src/main/res/layout/drawable-xxhdpi"
- "src/main/res/layout/drawable-xxxhdpi"
- "src/main/res/values"
The key explain as follows:
- name : the module's name
- genDir : the module will be generated
- directories : the dirs to be generated