Create a Module
Creating a basic module from scratch is not difficult, but we've tried to minimize startup friction by offering you some tools to help get started. Whether you use Gradle or Maven, you can utilize the provided build tools to generate a new project with a framework that includes the basic structure necessary for your module.
Pull Tools Repository
The tools repository you choose will depend on your build system. Before pulling a repository, make sure you have Git installed.
- Gradle
- Maven
git clone https://github.com/inductiveautomation/ignition-module-tools
git clone https://github.com/inductiveautomation/ignition-sdk-archetypes
Once you have the module tools in hand you can generate a new project through the command line.
Create a New Project
- Gradle
- Maven
Open the directory containing
ignition-module-tools
.Navigate one level down into
generator
.Open a command prompt in this directory and run the following:
gradlew.bat clean build
Create a new project:
gradlew.bat runCli -–console plain
Fill in the following information when prompted:
Prompt | Description | Example |
---|---|---|
Enter scopes | The scopes your module will require, including Gateway (G ), Client (C ), and Designer (D ). Note that these values are case sensitive. | GCD |
Human readable name | A name for your new project. | New SDK Project |
Root package | A reverse domain name specific to your organization and project. | com.inductiveautomation.ignition.newsdkproject |
Language | Language for gradle buildscripts. Possible values are kotlin and groovy . Default: kotlin . | kotlin |
This will create a new project structure for you with seperate directories for each of the Gateway, Designer and Client scopes, as well as a Common and Build directory. If you receive a BUILD SUCCESSFUL
message, you can close the command prompt and open your new project in your preferred IDE:
The fastest way to get started with a new Ignition module using Maven is to use a Maven Archetype. An archetype is a pre-made structural framework for a Maven project. Your new module will have directories in place, be configured to use the ignition-maven-plugin
described below, and be ready for you to add your own source.
With Maven installed, enter the following in the command line:
mvn archetype:generate -DarchetypeGroupId=com.inductiveautomation.ignitionsdk -DarchetypeArtifactId=client-designer-gateway-archetype -DarchetypeVersion=1.0.3
This archetype will create a new project structure for you with seperate directories for each of the Gateway, Designer and Client scopes, as well as a Common and Build directory. For a full list of the Ignition archetypes, you can browse for com.inductiveautomation at Maven Central