From 880196c5c55bf43d3079431f53e39b8b85135439 Mon Sep 17 00:00:00 2001 From: Rudi Date: Wed, 28 Oct 2026 18:04:49 +0000 Subject: [PATCH] Version bump --- README.md | 4 +-- build.gradle | 2 +- .../java/haus/nightmare/j3270/Version.java | 4 +-- .../j3270/Phase27BuildAndRenderTest.java | 24 +++++++++++------- .../j3270/Phase31AboutAndInterfaceTest.java | 25 ++++++++++++------- .../java/haus/nightmare/lib3270j/Version.java | 4 +-- .../Phase30LibraryDistributionTest.java | 19 ++++++++------ setup.ps1 | 4 +-- setup.sh | 4 +-- 9 files changed, 53 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 7c340b5..ef5eebf 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ An **x3270-aligned and IBM Host On-Demand (HoD) compatible IBM 3270 mainframe te Ready-to-run executable JARs and standalone library packages are built and tested across all three Java LTS baselines (**Java 11, Java 17, and Java 21**) by Gitea Actions: - **[Download Latest Tagged Release (`j3270.jar`)](https://git.hugfreevikings.wtf/rudi/j3270/releases)** -- **Standalone Protocol Library (`lib3270j.jar`)**: Built by setup/build scripts and published to Maven (`haus.nightmare.j3270:lib3270j:1.3.0`). +- **Standalone Protocol Library (`lib3270j.jar`)**: Built by setup/build scripts and published to Maven (`haus.nightmare.j3270:lib3270j:1.2.5`). - **[Latest Nightly CI Artifacts](https://git.hugfreevikings.wtf/rudi/j3270/actions)**: Download standalone JARs tailored for each LTS runtime under the latest workflow run: - `j3270-java11-jar` (Java 11 LTS) - `j3270-java17-jar` (Java 17 LTS — primary Gitea runner baseline) @@ -126,7 +126,7 @@ java -jar j3270.jar -d mainframe.example.com - **Persistent Profiles**: Configuration profiles and session preferences saved in INI files (`j3270.ini`). ### 📦 Modular Zero-Dependency Core -- **`lib3270j`**: Standalone Java protocol and terminal engine with **zero third-party dependencies** (`java.base`, `java.desktop` only). Distributed as standalone JAR (`build/lib3270j.jar`) and published Maven coordinate `haus.nightmare.j3270:lib3270j:1.3.0`. +- **`lib3270j`**: Standalone Java protocol and terminal engine with **zero third-party dependencies** (`java.base`, `java.desktop` only). Distributed as standalone JAR (`build/lib3270j.jar`) and published Maven coordinate `haus.nightmare.j3270:lib3270j:1.2.5`. - **`j3270`**: Standalone desktop Swing terminal application. --- diff --git a/build.gradle b/build.gradle index b498c43..94f6725 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ allprojects { group = 'haus.nightmare.j3270' - version = '1.3.0' + version = '1.2.5' repositories { mavenCentral() diff --git a/j3270/src/main/java/haus/nightmare/j3270/Version.java b/j3270/src/main/java/haus/nightmare/j3270/Version.java index bf1070f..2488645 100644 --- a/j3270/src/main/java/haus/nightmare/j3270/Version.java +++ b/j3270/src/main/java/haus/nightmare/j3270/Version.java @@ -8,7 +8,7 @@ public final class Version { /** * Hardcoded fallback release version matching build.gradle and pom coordinates. */ - public static final String VERSION = "1.3.0"; + public static final String VERSION = "1.2.5"; /** * Canonical application name. @@ -22,7 +22,7 @@ public final class Version { * Inspects the package implementation version first (populated when loaded from a JAR), * and falls back to the compile-time {@link #VERSION} constant if null or blank. * - * @return the version string (e.g. "1.3.0") + * @return the version string (e.g. "1.2.5") */ public static String getVersion() { Package pkg = Version.class.getPackage(); diff --git a/j3270/src/test/java/haus/nightmare/j3270/Phase27BuildAndRenderTest.java b/j3270/src/test/java/haus/nightmare/j3270/Phase27BuildAndRenderTest.java index 0605749..2e0a280 100644 --- a/j3270/src/test/java/haus/nightmare/j3270/Phase27BuildAndRenderTest.java +++ b/j3270/src/test/java/haus/nightmare/j3270/Phase27BuildAndRenderTest.java @@ -29,36 +29,42 @@ import static org.junit.jupiter.api.Assertions.*; public class Phase27BuildAndRenderTest { @Test - @DisplayName("Phase 27.1 & 27.2: Release version 1.3.0 synchronized across build files and android.useAndroidX removed") + @DisplayName("Phase 27.1 & 27.2: Release version synchronized across build files and android.useAndroidX removed") public void testVersionSynchronizationAndGradleProperties() throws Exception { File projectRoot = new File(".").getCanonicalFile(); if (!new File(projectRoot, "settings.gradle").exists() && projectRoot.getParentFile() != null) { projectRoot = projectRoot.getParentFile(); } - // 1. Verify build.gradle version = '1.3.0' + String expectedVersion = Version.VERSION; + assertNotNull(expectedVersion, "Version.VERSION must not be null"); + assertFalse(expectedVersion.isBlank(), "Version.VERSION must not be blank"); + + // 1. Verify build.gradle defines the expected version File buildGradle = new File(projectRoot, "build.gradle"); assertTrue(buildGradle.exists(), "build.gradle must exist"); String buildGradleContent = Files.readString(buildGradle.toPath()); - assertTrue(buildGradleContent.contains("version = '1.3.0'"), "build.gradle must define version = '1.3.0'"); + assertTrue(buildGradleContent.contains("version = '" + expectedVersion + "'"), + "build.gradle must define version = '" + expectedVersion + "'"); assertFalse(buildGradleContent.contains("0.1.0"), "build.gradle must not contain 0.1.0"); - - // 3. Verify setup.ps1 Implementation-Version: 1.3.0 + // 2. Verify setup.ps1 specifies the expected Implementation-Version File setupPs1 = new File(projectRoot, "setup.ps1"); assertTrue(setupPs1.exists(), "setup.ps1 must exist"); String setupPs1Content = Files.readString(setupPs1.toPath()); - assertTrue(setupPs1Content.contains("Implementation-Version: 1.3.0"), "setup.ps1 must specify Implementation-Version: 1.3.0"); + assertTrue(setupPs1Content.contains("Implementation-Version: " + expectedVersion), + "setup.ps1 must specify Implementation-Version: " + expectedVersion); assertFalse(setupPs1Content.contains("Implementation-Version: 0.1.0"), "setup.ps1 must not contain 0.1.0"); - // 4. Verify setup.sh Implementation-Version: 1.3.0 + // 3. Verify setup.sh specifies the expected Implementation-Version File setupSh = new File(projectRoot, "setup.sh"); assertTrue(setupSh.exists(), "setup.sh must exist"); String setupShContent = Files.readString(setupSh.toPath()); - assertTrue(setupShContent.contains("Implementation-Version: 1.3.0"), "setup.sh must specify Implementation-Version: 1.3.0"); + assertTrue(setupShContent.contains("Implementation-Version: " + expectedVersion), + "setup.sh must specify Implementation-Version: " + expectedVersion); assertFalse(setupShContent.contains("Implementation-Version: 0.1.0"), "setup.sh must not contain 0.1.0"); - // 5. Verify gradle.properties android.useAndroidX removed + // 4. Verify gradle.properties android.useAndroidX removed File gradleProps = new File(projectRoot, "gradle.properties"); assertTrue(gradleProps.exists(), "gradle.properties must exist"); String gradlePropsContent = Files.readString(gradleProps.toPath()); diff --git a/j3270/src/test/java/haus/nightmare/j3270/Phase31AboutAndInterfaceTest.java b/j3270/src/test/java/haus/nightmare/j3270/Phase31AboutAndInterfaceTest.java index 79bb23c..c25e4cc 100644 --- a/j3270/src/test/java/haus/nightmare/j3270/Phase31AboutAndInterfaceTest.java +++ b/j3270/src/test/java/haus/nightmare/j3270/Phase31AboutAndInterfaceTest.java @@ -20,28 +20,35 @@ import static org.junit.jupiter.api.Assertions.*; public class Phase31AboutAndInterfaceTest { @Test - @DisplayName("Phase 31.1: Dedicated Version classes report v1.3.0 single source of truth") + @DisplayName("Phase 31.1: Dedicated Version classes report single source of truth") public void testVersionClasses() { // lib3270j - assertEquals("1.3.0", haus.nightmare.lib3270j.Version.VERSION); + assertNotNull(haus.nightmare.lib3270j.Version.VERSION, "lib3270j Version.VERSION must not be null"); + assertFalse(haus.nightmare.lib3270j.Version.VERSION.isBlank(), "lib3270j Version.VERSION must not be blank"); assertEquals("lib3270j", haus.nightmare.lib3270j.Version.NAME); - assertEquals("1.3.0", haus.nightmare.lib3270j.Version.getVersion()); + assertEquals(haus.nightmare.lib3270j.Version.VERSION, haus.nightmare.lib3270j.Version.getVersion()); // j3270 - assertEquals("1.3.0", haus.nightmare.j3270.Version.VERSION); + assertNotNull(haus.nightmare.j3270.Version.VERSION, "j3270 Version.VERSION must not be null"); + assertFalse(haus.nightmare.j3270.Version.VERSION.isBlank(), "j3270 Version.VERSION must not be blank"); assertEquals("j3270", haus.nightmare.j3270.Version.NAME); - assertEquals("1.3.0", haus.nightmare.j3270.Version.getVersion()); + assertEquals(haus.nightmare.j3270.Version.VERSION, haus.nightmare.j3270.Version.getVersion()); + + // Both modules should report consistent versions + assertEquals(haus.nightmare.lib3270j.Version.VERSION, haus.nightmare.j3270.Version.VERSION); } @Test - @DisplayName("Phase 31.2: Help > About dialogue text properly reports j3270 v1.3.0 and lib3270j v1.3.0") + @DisplayName("Phase 31.2: Help > About dialogue text properly reports j3270 and lib3270j versions") public void testAboutTextContent() { String aboutText = J3270App.getAboutText(); assertNotNull(aboutText, "About text must not be null"); - // Verify version reports - assertTrue(aboutText.contains("j3270 v1.3.0"), "About text must report j3270 v1.3.0"); - assertTrue(aboutText.contains("lib3270j v1.3.0"), "About text must report lib3270j v1.3.0"); + // Verify version reports dynamically + assertTrue(aboutText.contains("j3270 v" + haus.nightmare.j3270.Version.getVersion()), + "About text must report j3270 v" + haus.nightmare.j3270.Version.getVersion()); + assertTrue(aboutText.contains("lib3270j v" + haus.nightmare.lib3270j.Version.getVersion()), + "About text must report lib3270j v" + haus.nightmare.lib3270j.Version.getVersion()); // Verify stale pre-release versions are eradicated assertFalse(aboutText.contains("0.2.0"), "About text must not contain stale version 0.2.0"); diff --git a/lib3270j/src/main/java/haus/nightmare/lib3270j/Version.java b/lib3270j/src/main/java/haus/nightmare/lib3270j/Version.java index 10f5e0d..fbe3c8c 100644 --- a/lib3270j/src/main/java/haus/nightmare/lib3270j/Version.java +++ b/lib3270j/src/main/java/haus/nightmare/lib3270j/Version.java @@ -8,7 +8,7 @@ public final class Version { /** * Hardcoded fallback release version matching build.gradle and pom coordinates. */ - public static final String VERSION = "1.3.0"; + public static final String VERSION = "1.2.5"; /** * Canonical library name. @@ -22,7 +22,7 @@ public final class Version { * Inspects the package implementation version first (populated when loaded from a JAR), * and falls back to the compile-time {@link #VERSION} constant if null or blank. * - * @return the version string (e.g. "1.3.0") + * @return the version string (e.g. "1.2.5") */ public static String getVersion() { Package pkg = Version.class.getPackage(); diff --git a/lib3270j/src/test/java/haus/nightmare/lib3270j/Phase30LibraryDistributionTest.java b/lib3270j/src/test/java/haus/nightmare/lib3270j/Phase30LibraryDistributionTest.java index 8188bbf..f3012b7 100644 --- a/lib3270j/src/test/java/haus/nightmare/lib3270j/Phase30LibraryDistributionTest.java +++ b/lib3270j/src/test/java/haus/nightmare/lib3270j/Phase30LibraryDistributionTest.java @@ -66,7 +66,8 @@ public class Phase30LibraryDistributionTest { String setupShContent = Files.readString(setupSh.toPath()); assertTrue(setupShContent.contains("lib3270j.jar"), "setup.sh must package lib3270j.jar"); assertTrue(setupShContent.contains("Implementation-Title: lib3270j"), "setup.sh must set Implementation-Title: lib3270j"); - assertTrue(setupShContent.contains("Implementation-Version: 1.3.0"), "setup.sh must set Implementation-Version: 1.3.0"); + assertTrue(setupShContent.contains("Implementation-Version: " + Version.VERSION), + "setup.sh must set Implementation-Version: " + Version.VERSION); // 3. setup.ps1 File setupPs1 = new File(projectRoot, "setup.ps1"); @@ -74,7 +75,8 @@ public class Phase30LibraryDistributionTest { String setupPs1Content = Files.readString(setupPs1.toPath()); assertTrue(setupPs1Content.contains("lib3270j.jar"), "setup.ps1 must package lib3270j.jar"); assertTrue(setupPs1Content.contains("Implementation-Title: lib3270j"), "setup.ps1 must set Implementation-Title: lib3270j"); - assertTrue(setupPs1Content.contains("Implementation-Version: 1.3.0"), "setup.ps1 must set Implementation-Version: 1.3.0"); + assertTrue(setupPs1Content.contains("Implementation-Version: " + Version.VERSION), + "setup.ps1 must set Implementation-Version: " + Version.VERSION); } @Test @@ -112,12 +114,13 @@ public class Phase30LibraryDistributionTest { @DisplayName("Phase 30.2: Maven local published artifacts exist and validate if maven-publish was executed") public void testMavenLocalPublishedArtifacts() throws Exception { String userHome = System.getProperty("user.home"); - File m2ArtifactDir = new File(userHome, ".m2/repository/haus/nightmare/j3270/lib3270j/1.3.0"); + String version = Version.VERSION; + File m2ArtifactDir = new File(userHome, ".m2/repository/haus/nightmare/j3270/lib3270j/" + version); if (m2ArtifactDir.exists()) { - File pomFile = new File(m2ArtifactDir, "lib3270j-1.3.0.pom"); - File jarFile = new File(m2ArtifactDir, "lib3270j-1.3.0.jar"); - File sourcesFile = new File(m2ArtifactDir, "lib3270j-1.3.0-sources.jar"); - File javadocFile = new File(m2ArtifactDir, "lib3270j-1.3.0-javadoc.jar"); + File pomFile = new File(m2ArtifactDir, "lib3270j-" + version + ".pom"); + File jarFile = new File(m2ArtifactDir, "lib3270j-" + version + ".jar"); + File sourcesFile = new File(m2ArtifactDir, "lib3270j-" + version + "-sources.jar"); + File javadocFile = new File(m2ArtifactDir, "lib3270j-" + version + "-javadoc.jar"); assertTrue(pomFile.exists() && pomFile.length() > 0, "POM file must exist and be non-empty"); assertTrue(jarFile.exists() && jarFile.length() > 0, "JAR file must exist and be non-empty"); @@ -127,7 +130,7 @@ public class Phase30LibraryDistributionTest { String pomXml = Files.readString(pomFile.toPath()); assertTrue(pomXml.contains("haus.nightmare.j3270"), "POM must contain groupId"); assertTrue(pomXml.contains("lib3270j"), "POM must contain artifactId"); - assertTrue(pomXml.contains("1.3.0"), "POM must contain version 1.3.0"); + assertTrue(pomXml.contains("" + version + ""), "POM must contain version " + version); assertTrue(pomXml.contains("The Unlicense"), "POM must contain Unlicense"); assertFalse(pomXml.contains("Apache"), "lib3270j POM must not contain Apache license"); assertFalse(pomXml.contains(""), "lib3270j POM must have zero external dependencies"); diff --git a/setup.ps1 b/setup.ps1 index 3244527..3afd030 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -417,7 +417,7 @@ if (Test-Path $libResDir) { # ------------------------------------------------------------------------------ Write-LogInfo "Packaging standalone lib3270j library JAR..." $libManifestFile = Join-Path $BuildDir "LIB_MANIFEST.MF" -$libManifestText = "Manifest-Version: 1.0`r`nImplementation-Title: lib3270j`r`nImplementation-Version: 1.3.0`r`nCreated-By: j3270 setup.ps1`r`n`r`n" +$libManifestText = "Manifest-Version: 1.0`r`nImplementation-Title: lib3270j`r`nImplementation-Version: 1.2.5`r`nCreated-By: j3270 setup.ps1`r`n`r`n" [System.IO.File]::WriteAllText($libManifestFile, $libManifestText) $libJarFile = Join-Path $BuildDir "lib3270j.jar" @@ -425,7 +425,7 @@ $libJarFile = Join-Path $BuildDir "lib3270j.jar" Write-LogInfo "Packaging standalone executable JAR..." $manifestFile = Join-Path $BuildDir "MANIFEST.MF" -$manifestText = "Manifest-Version: 1.0`r`nMain-Class: haus.nightmare.j3270.J3270App`r`nImplementation-Title: j3270`r`nImplementation-Version: 1.3.0`r`nCreated-By: j3270 setup.ps1`r`n`r`n" +$manifestText = "Manifest-Version: 1.0`r`nMain-Class: haus.nightmare.j3270.J3270App`r`nImplementation-Title: j3270`r`nImplementation-Version: 1.2.5`r`nCreated-By: j3270 setup.ps1`r`n`r`n" [System.IO.File]::WriteAllText($manifestFile, $manifestText) $jarFile = Join-Path $BuildDir "j3270.jar" diff --git a/setup.sh b/setup.sh index 05e4688..52d4b6a 100755 --- a/setup.sh +++ b/setup.sh @@ -376,7 +376,7 @@ log_info "Packaging standalone lib3270j library JAR..." cat << 'EOF' > "$BUILD_DIR/LIB_MANIFEST.MF" Manifest-Version: 1.0 Implementation-Title: lib3270j -Implementation-Version: 1.3.0 +Implementation-Version: 1.2.5 Created-By: j3270 setup.sh EOF @@ -390,7 +390,7 @@ cat << 'EOF' > "$BUILD_DIR/MANIFEST.MF" Manifest-Version: 1.0 Main-Class: haus.nightmare.j3270.J3270App Implementation-Title: j3270 -Implementation-Version: 1.3.0 +Implementation-Version: 1.2.5 Created-By: j3270 setup.sh EOF