build(java-client): retarget JDK 21 -> 17 for Ignition 8.3 (v0.2.0)

Ignition 8.3 runs on JDK 17; the 0.1.2 client was compiled --release 21
(class-file v65) and would throw UnsupportedClassVersionError when loaded
in an Ignition module. Drop the toolchain and bytecode target to 17 so the
artifact loads on the gateway (a 17 build still runs on 21+). No source uses
Java 18-21 APIs, so this is a pure target change. Bump 0.1.2 -> 0.2.0.

Update the toolchain-pinning smoke test to assert feature()==17.
All 97 tests pass; all jar classes verified class-file v61. Roadmap G0.
This commit is contained in:
Joseph Doherty
2026-06-26 16:02:48 -04:00
parent 8cb8fcdf57
commit 291c94ffe1
2 changed files with 9 additions and 5 deletions
+5 -3
View File
@@ -13,18 +13,20 @@ ext {
subprojects { subprojects {
group = 'com.zb.mom.ww.mxgateway' group = 'com.zb.mom.ww.mxgateway'
version = '0.1.2' version = '0.2.0'
pluginManager.withPlugin('java') { pluginManager.withPlugin('java') {
java { java {
// Retargeted 21 -> 17 so the artifact loads on Ignition 8.3's JDK 17
// (a 17-targeted build still runs on 21+). See roadmap G0.
toolchain { toolchain {
languageVersion = JavaLanguageVersion.of(21) languageVersion = JavaLanguageVersion.of(17)
} }
} }
tasks.withType(JavaCompile).configureEach { tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
options.release = 21 options.release = 17
} }
tasks.withType(Test).configureEach { tasks.withType(Test).configureEach {
@@ -23,7 +23,9 @@ final class GeneratedContractSmokeTests {
} }
@Test @Test
void javaTwentyOneToolchainRunsTests() { void javaSeventeenToolchainRunsTests() {
assertEquals(21, Runtime.version().feature()); // Pinned to 17: the client is retargeted to JDK 17 so it loads on
// Ignition 8.3's JDK 17 runtime (roadmap G0). A 17 build still runs on 21+.
assertEquals(17, Runtime.version().feature());
} }
} }