Skip to content

Commit

Permalink
IGN-10603 Clean up filename and required ignition version templates (i…
Browse files Browse the repository at this point in the history
…nductiveautomation#58)

Plus massaged existing overlapping unit test fixtures to ensure they
keep passing.

---------

Co-authored-by: Paul Griffith <[email protected]>
  • Loading branch information
brianeray and paul-griffith authored Aug 27, 2024
1 parent a9f0a15 commit 8432a9e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Consists of two projects useful in generating the boilerplate structure for an Ignition module built using the
Gradle build tool.

1. [Ignition Module Generator Core](https://github.com/inductiveautomation/ignition-module-tools/tree/master/generator/generator-core#readme) library for creating Ignition module skeletons. Written in Kotlin, usable in Kotlin, Java and other JVM languages via jar-based dependency available as Maven artifacts.
1. [Ignition Module Generator Core](generator-core/README.md): library for creating Ignition module skeletons. Written in Kotlin, usable in Kotlin, Java and other JVM languages via jar-based dependency available as Maven artifacts.

2. [Module Generator CLI](https://github.com/inductiveautomation/ignition-module-tools/tree/master/generator/generator-cli#readme) command line application which uses the generator library to provide a _command line interface_ (CLI) that can be used to create modules from your operating system's terminal/console.
2. [Module Generator CLI](generator-cli/README.md): command line application which uses the generator library to provide a _command line interface_ (CLI) that can be used to create modules from your operating system's terminal/console.

## Usage

Expand Down
2 changes: 1 addition & 1 deletion generator/generator-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A library for generating boilerplate folder/file structures for gradle-based Ign

We've had requests to make it easier to get started with module development using Gradle. So when we started writing
functional tests for
the [Gradle Module Plugin](https://github.com/inductiveautomation/ignition-module-tools/tree/master/gradle-module-plugin#readme)
the [Gradle Module Plugin](../../gradle-module-plugin)
and realized that we were generating module projects, we decided to pull out the functions and make them an independent
library. The result is a somewhat unpolished but functional codebase, owing to its roots as simple testing support.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ class ModuleGeneratorContext(override val config: GeneratorConfig) : GeneratorCo
init {
// initialize the values that will be injected into the template resource files
replacements[MODULE_NAME.key] = config.moduleName
replacements[MODULE_FILENAME.key] =
"${config.moduleName.replace(" ", "-")}.modl"
replacements[MODULE_FILENAME.key] = config.moduleName.replace(" ", "-")
replacements[MODULE_ID.key] = "${config.packageName}.$classPrefix"
replacements[MODULE_CLASSNAME.key] = classPrefix
replacements[PACKAGE_ROOT.key] = config.packageName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ignitionModule {
* the course of a major Ignition (7.9, 8.0, etc) version, except for when the Ignition Platform adds/changes APIs
* used by the module.
*/
requiredIgnitionVersion = "8.0.10"
requiredIgnitionVersion = rootProject.ext.sdk_version
/*
* This is a map of String: String, where the 'key' represents the fully qualified path to the project
* (using gradle path syntax), and the value is the shorthand Scope string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ignitionModule {
* the course of a major Ignition (7.9, 8.0, etc) version, except for when the Ignition Platform adds/changes APIs
* used by the module.
*/
requiredIgnitionVersion.set("8.1.11")
requiredIgnitionVersion.set(rootProject.ext.sdk_version)
/*
* This is a map of String: String, where the 'key' represents the fully qualified path to the project
* (using gradle path syntax), and the value is the shorthand Scope string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class WriteModuleXmlTest : BaseTest() {
}
}
""",
"requiredIgnitionVersion = \"8.0.10\"" to
"requiredIgnitionVersion = rootProject.ext.sdk_version" to
"requiredIgnitionVersion = \"8.3.0\""
)

Expand Down Expand Up @@ -72,7 +72,7 @@ class WriteModuleXmlTest : BaseTest() {
}
}
""",
"requiredIgnitionVersion = \"8.0.10\"" to
"requiredIgnitionVersion = rootProject.ext.sdk_version" to
"requiredIgnitionVersion = \"8.3.0\""
)

Expand Down Expand Up @@ -119,7 +119,7 @@ class WriteModuleXmlTest : BaseTest() {
}
}
""",
"requiredIgnitionVersion = \"8.0.10\"" to
"requiredIgnitionVersion = rootProject.ext.sdk_version" to
"requiredIgnitionVersion = \"8.3.0\""
)

Expand Down

0 comments on commit 8432a9e

Please sign in to comment.