The HomeTracker Application Plugin give help to deploy HomeTracker's modules.
To apply the plugin, please add this following part of code.
plugins {
id 'com.chillycheesy.modulo-application' version '1.2.1'
}
group 'your.group'
version '1.0.0'
Add the below module closure with your module's information inside.
module {
moduleName = 'MyAwesomeModule'
version = '1.0.0'
authors = ['Wicket', 'Nippet']
main = 'com.your.module.MainClass'
}
The modulo-application plugin include the java-library plugin. Therefore, you have access to all java-library's tasks include the build task.
Run this following command.
$> ./gradlew build
Take the built module and put it in the modules file of your Modulo server.
Enjoy 🍻 🌶🧀
In this section we will see more information about its closures and added tasks.
The module closure represent the module.yml file inside your module.
name: MyAwesomeModule
version: 1.0.0
authors:
- Wicket
- Nippet
main: com.your.module.MainClass
The above example part of code can be replaced by the below closure.
module {
moduleName = 'MyAwesomeModule'
version = '1.0.0'
authors = ['Wicket', 'Nippet']
main = 'com.your.module.MainClass'
}
The following array was the exhaustive list of module's parameters.
Key | Description | Equivalent of YAML | Default value |
---|---|---|---|
moduleName | Module name. | name | Your Gradle project name. |
version | Module version. | version | Your Gradle project version. |
authors | Module authors. | authors | ['ChillyCheesy'] |
main | Module main. | main | Concat the project group and the project name. |
mainPageName | Module main page name. | mainPageName | 'index' |
dependencies | Module dependencies. | dependencies | Empty list. |
softDependencies | Module soft dependencies. | softDependencies | Empty list. |
target | The output folder for the generated module.yml file. | none | 'src/main/resources' |
moduloVersion | The target version for the modulo server. | none | 'BINKS-0.3.0' |
testServerPath | The path to the test server. | none | 'modulo-server' |
This task generate the module.yml file.
If you run the processResources task. It will automatically call the generateModuleYml task.
The processResources task depends on the generateModuleYml task.
This task run a modulo server. The version of the modulo server is defined by the moduloVersion parameter.
(See moduloVersion closure for more information.)
The server name is automatically downloaded and placed in the modulo-server
folder at the root of your project.
The runModuloServer task depends on the deployModuleToLocalModuloServer task.
This task build your module and copy it on the modulo-server/modules
folder at the root of your project.
🌶🧀