inductiveautomation / ignition-module-tools

Tools that help in the creation and development of Modules for Inductive Automation's Ignition.
49 stars 14 forks source link

Add ability to support "required" flag in module dependencies of module.xml #48

Closed ia-keaton closed 7 months ago

ia-keaton commented 7 months ago

This PR introduces a new flag to the ModuleSettings class called requiredModuleDependencies. This flag is intended as a substitute for the existing moduleDependencies, not a replacement. Current module builds should be unaffected.

In order to utilize this flag, requiredIgnitionVersion will need to also be set to at least 8.3.0. To simplify the usage of this new property, this PR also adds a Kotlin DSL to parse user input into a new RequiredModuleDependency class. Usage of this DSL is in the following form:

requiredModuleDependencies = setOf(
     moduleId("com.inductiveautomation.vision") {
         scope = "GCD"
         required = true
     }
)

This PR also includes unit tests for the WriteModuleXml class which previously had none. These tests are for usage of both the new flag as well as the original.

brianeray commented 7 months ago

I figured out the compileTestKotlin warnings, here in 6a5982a.

Pretty sure a similar build script bug bit me a long, long time ago.

Now onto a "final" PR pass.