Version bump
This commit is contained in:
@@ -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.
|
||||
|
||||
---
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
allprojects {
|
||||
group = 'haus.nightmare.j3270'
|
||||
version = '1.3.0'
|
||||
version = '1.2.5'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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("<groupId>haus.nightmare.j3270</groupId>"), "POM must contain groupId");
|
||||
assertTrue(pomXml.contains("<artifactId>lib3270j</artifactId>"), "POM must contain artifactId");
|
||||
assertTrue(pomXml.contains("<version>1.3.0</version>"), "POM must contain version 1.3.0");
|
||||
assertTrue(pomXml.contains("<version>" + version + "</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("<dependencies>"), "lib3270j POM must have zero external dependencies");
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user