Skip to content

Upgrade perspective/webui Gradle examples to io.ia.sdk.modl 0.5.0 - #211

Open
sankalpsthakur wants to merge 1 commit into
inductiveautomation:ignition-8.3from
sankalpsthakur:upgrade/modl-plugin-0.5.0-perspective
Open

Upgrade perspective/webui Gradle examples to io.ia.sdk.modl 0.5.0#211
sankalpsthakur wants to merge 1 commit into
inductiveautomation:ignition-8.3from
sankalpsthakur:upgrade/modl-plugin-0.5.0-perspective

Conversation

@sankalpsthakur

Copy link
Copy Markdown

Summary

Fixes #119 by upgrading the Perspective component examples (and webui-webpage) from io.ia.sdk.modl 0.1.1 to 0.5.0, matching the pattern already used by immutable-project.

Changes

Project Plugin Module deps
perspective-component/ 0.1.1 → 0.5.0 moduleDependencies.putmoduleDependencySpecs { register(...) }
perspective-component-minimal/ 0.1.1 → 0.5.0 same migration
webui-webpage/ 0.1.1 → 0.5.0 removed empty deprecated moduleDependencies map; docs note 8.3 API

Also set requiredFrameworkVersion = "8" on the full perspective-component example for consistency with the other 8.3 examples.

Migration notes (moduleDependencySpecs)

For modules targeting Ignition 8.3+, prefer moduleDependencySpecs over the deprecated moduleDependencies map. The newer API supports the required flag (gateway faults if the dependency module is missing).

Before (0.1.1 / pre-8.3 style):

moduleDependencies.put("com.inductiveautomation.perspective", "DG")
// or
moduleDependencies.putAll(mapOf("com.inductiveautomation.perspective" to "GD"))

After (0.5.0 / 8.3 style, same as immutable-project):

moduleDependencySpecs {
    register("com.inductiveautomation.perspective") {
        scope = "DG" // G=gateway, D=designer, C=Vision client
        required = true
    }
}

Gradle wrappers were already on 8.2.1 for these projects (plugin 0.5.0 uses SyncSpec via project.sync in CollectModlDependencies; that API needs a modern Gradle). With 8.2.1 + 0.5.0, applying the plugin alongside subprojects that use java-library configures cleanly—the failure mode reported in #119 (Could not generate a decorated class for type CollectModlDependencies / missing SyncSpec) does not reproduce.

Related issues

Validation

export JAVA_HOME=…/openjdk@17   # Java 17 toolchain

cd perspective-component-minimal && ./gradlew help tasks --all   # BUILD SUCCESSFUL
cd perspective-component-minimal && ./gradlew zipModule          # produces OneComponent.unsigned.modl
# module.xml includes:
#   <depends scope="GD" required="true">com.inductiveautomation.perspective</depends>

cd perspective-component && ./gradlew help                       # BUILD SUCCESSFUL
cd perspective-component && ./gradlew tasks --group="Ignition Module"

cd webui-webpage && ./gradlew help                               # BUILD SUCCESSFUL

skipModlSigning remains true (unsigned .modl for local/dev use).

AI disclosure

This contribution was prepared with assistance from an AI coding agent (Grok / xAI). Changes were reviewed and validated locally (Gradle configure + zipModule on the minimal example) before opening this PR.

Align Gradle module examples with immutable-project: bump the Ignition
module plugin to 0.5.0 and migrate Perspective module deps to
moduleDependencySpecs (required for Ignition 8.3). Resolves the
java-library + CollectModlDependencies/SyncSpec apply failure reported
when upgrading past 0.1.1 (inductiveautomation#119).

Also verified ignition-8.3 already uses jakarta.servlet and
requiredIgnitionVersion 8.3.0 for Jetty 12 (inductiveautomation#134). Plugin upgrade
improves collectModlDependencies jar inputs, which helps zipModule
rebuild when Java/resource sources change (inductiveautomation#96).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Perspective component still built with v0.1.1 of the gradle plugin; upgrade non-trivial

1 participant