9b2abef4e1
Converges all five clients on one version after four had drifted onto the already-published 0.1.2/0.1.1 while their APIs kept changing underneath it: - Rust Cargo.toml [package] + [workspace.package] -> 0.2.0 (CLIENT_VERSION already derives from CARGO_PKG_VERSION, no separate edit). - Python pyproject.toml + version.py -> 0.2.0; new test asserts __version__ matches pyproject.toml (closes the CLI-26 residual drift mode). - Go mxgateway/version.go ClientVersion -> 0.2.0. - .NET ZB.MOM.WW.MxGateway.Client.csproj <Version> -> 0.2.0. - Java -> 0.2.1, not 0.2.0: the live Gitea Maven feed already had 0.2.0 published (2026-06-26), before the CLI-37/38/40/41 conformance fixes changed the client's observable behavior, so reusing 0.2.0 would label two different APIs identically. Recorded as an exception in docs/ClientPackaging.md's new Versioning section. Publish-pipeline guards: - scripts/tag-go-module.ps1 implements the CLI-21 guard: after semver validation it refuses to tag unless clients/go/mxgateway/version.go's ClientVersion already matches the requested tag version. - scripts/pack-clients.ps1 gains a Gitea package-registry collision guard wired into every per-language -Publish step; it aborts if the target name+version already exists rather than force-overwriting. Verified live against the real Gitea registry (credentials already present in this environment) — correctly refuses on every known-published artifact and passes on every unpublished target. Docs updated in the same commit: docs/ClientPackaging.md (new Versioning section), and the five client READMEs' stale 0.1.1/0.1.2 example versions. No .proto changes. No publish performed.
90 lines
3.1 KiB
Groovy
90 lines
3.1 KiB
Groovy
plugins {
|
|
id 'base'
|
|
}
|
|
|
|
ext {
|
|
guavaVersion = '33.5.0-jre'
|
|
gsonVersion = '2.13.2'
|
|
grpcVersion = '1.76.0'
|
|
junitVersion = '5.14.1'
|
|
picocliVersion = '4.7.7'
|
|
protobufVersion = '4.33.1'
|
|
}
|
|
|
|
subprojects {
|
|
group = 'com.zb.mom.ww.mxgateway'
|
|
// 0.2.0 was already published to the Gitea Maven feed on 2026-06-26,
|
|
// before the CLI-37/38/40/41 conformance fixes changed the client's
|
|
// observable behavior (status.category-based validation, hresult < 0,
|
|
// exact-secret redaction, typed malformed-reply errors). Bump to 0.2.1
|
|
// so the published coordinate matches the conformant behavior the other
|
|
// four clients ship at 0.2.0 for the first time. See CLI-39 and the
|
|
// "Versioning" section of docs/ClientPackaging.md.
|
|
version = '0.2.1'
|
|
|
|
pluginManager.withPlugin('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 {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
options.encoding = 'UTF-8'
|
|
options.release = 17
|
|
}
|
|
|
|
tasks.withType(Test).configureEach {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation platform("org.junit:junit-bom:${junitVersion}")
|
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
}
|
|
}
|
|
|
|
pluginManager.withPlugin('maven-publish') {
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
from components.java
|
|
pom {
|
|
url = 'https://gitea.dohertylan.com/dohertj2/mxaccessgw'
|
|
description = 'MxAccessGateway Java client'
|
|
scm {
|
|
url = 'https://gitea.dohertylan.com/dohertj2/mxaccessgw'
|
|
connection = 'scm:git:https://gitea.dohertylan.com/dohertj2/mxaccessgw.git'
|
|
}
|
|
developers {
|
|
developer {
|
|
id = 'dohertj2'
|
|
name = 'Joseph Doherty'
|
|
}
|
|
}
|
|
licenses {
|
|
license {
|
|
name = 'Proprietary'
|
|
distribution = 'repo'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
repositories {
|
|
maven {
|
|
name = 'GiteaPackages'
|
|
url = 'https://gitea.dohertylan.com/api/packages/dohertj2/maven'
|
|
credentials {
|
|
username = System.getenv('GITEA_USERNAME') ?: ''
|
|
password = System.getenv('GITEA_TOKEN') ?: ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|