@@ -15,9 +15,6 @@ GENERATED_DIR="$SCRIPT_DIR/generated"
1515RELEASE_DIR=" $WORKSPACE /target/release"
1616KOTLIN_SRC=" $SCRIPT_DIR /src/main/kotlin"
1717
18- JNA_VERSION=" 5.19.1"
19- GSON_VERSION=" 2.14.0"
20-
2118ARCH=" $( uname -m) "
2219# Normalize to JNA's resource-prefix arch tokens (its canonical form)
2320case " $ARCH " in
@@ -94,17 +91,9 @@ mkdir -p "$NATIVES_DIR"
9491cp " $RELEASE_DIR /$LIB_NAME " " $NATIVES_DIR /"
9592
9693# ── Generate version.properties ────────────────────────────────────────────────
97- # Cargo.toml is the single source of truth for the version; JNA/Gson versions are
98- # owned here. The Gradle build reads these (build.gradle.kts) for the coordinates and
99- # POM dependency versions, so nothing is hardcoded and versions cannot drift.
100- VERSION=$( grep ' ^version' " $WORKSPACE /Cargo.toml" | head -1 | sed ' s/.*"\(.*\)".*/\1/' )
101- echo " Generating version.properties (version ${VERSION} )..."
102- cat > " $SCRIPT_DIR /version.properties" << EOF
103- # Generated by build.sh — do not edit manually. Version from Cargo.toml; dep versions from build.sh.
104- publishVersion=${VERSION}
105- jnaVersion=${JNA_VERSION}
106- gsonVersion=${GSON_VERSION}
107- EOF
94+ " $SCRIPT_DIR /generate-version-properties.sh"
95+ JNA_VERSION=$( grep ' ^jnaVersion=' " $SCRIPT_DIR /version.properties" | cut -d= -f2)
96+ GSON_VERSION=$( grep ' ^gsonVersion=' " $SCRIPT_DIR /version.properties" | cut -d= -f2)
10897
10998# ── Compile + package JAR via Gradle ───────────────────────────────────────────
11099# Gradle compiles the generated Kotlin (resolving JNA/Gson), bundles the .kt sources,
0 commit comments