Skip to content

The HomeTracker Application Plugin give help to deploy HomeTracker's modules

Notifications You must be signed in to change notification settings

ChillyCheesy/ModuloApplicationPlugin

Repository files navigation

Modulo Application Plugin

Release App Gradle Plugin Portal


Overview.

The HomeTracker Application Plugin give help to deploy HomeTracker's modules.

Table of Content.

Getting Started Using the Plugin.

Step 1: Apply the plugin to your Gradle build script.

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'

Step 2: Add the module configuration to your project.

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'
}

Step 3: Run the build task.

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

Step 4: Use your module.

Take the built module and put it in the modules file of your Modulo server.

Enjoy 🍻 🌶🧀

Plugins Documentation.

In this section we will see more information about its closures and added tasks.

Closures section.

module.

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'

Tasks section.

generateModuleYml.

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.

runModuloServer.

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.

deployModuleToLocalModuloServer.

This task build your module and copy it on the modulo-server/modules folder at the root of your project.

🌶🧀