Skip to content

Add publish workflows for Swift (SPM) and Java (Maven Central)#13

Merged
m96-chan merged 1 commit into
mainfrom
feat/publish-swift-java
Feb 21, 2026
Merged

Add publish workflows for Swift (SPM) and Java (Maven Central)#13
m96-chan merged 1 commit into
mainfrom
feat/publish-swift-java

Conversation

@m96-chan

Copy link
Copy Markdown
Owner

Summary

  • Swift: build-xcframework cross-compiles oxbitnet-ffi for macOS universal + iOS, packages as XCFramework; create-release uploads it to GitHub Releases with sha256 checksum
  • Java: build-java-natives matrix-builds oxbitnet-java for 4 platforms (linux-x86_64, macos-aarch64, macos-x86_64, windows-x86_64); publish-maven bundles native libs into JAR and publishes to Maven Central via Gradle
  • Root Package.swift added for SPM git-tag-based resolution
  • NativeLoader.java extracts bundled native libs from JAR classpath at runtime (OS/arch detection → temp dir → System.load())
  • Gradle maven-publish + signing plugins configured with Sonatype repo + in-memory GPG

Required Secrets

Secret Purpose
MAVEN_CENTRAL_USERNAME Sonatype OSSRH username (from https://central.sonatype.com)
MAVEN_CENTRAL_PASSWORD Sonatype OSSRH password/token
GPG_PRIVATE_KEY ASCII-armored GPG private key for signing
GPG_PASSPHRASE Passphrase for the GPG key

Test plan

  • Verify ./gradlew build succeeds locally in packages/rust/crates/oxbitnet-java/java/
  • Push a test tag → all publish jobs pass in CI
  • XCFramework zip appears on GitHub Release
  • Maven artifact appears on Maven Central staging

🤖 Generated with Claude Code

- Add build-xcframework job: cross-compiles oxbitnet-ffi for macOS universal + iOS,
  packages as XCFramework zip with sha256 checksum
- Add create-release job: uploads XCFramework to GitHub Releases
- Add build-java-natives job: matrix build across linux/macos/windows
- Add publish-maven job: bundles native libs into JAR, publishes to Maven Central
- Add root Package.swift for SPM git-tag-based resolution
- Add NativeLoader.java for JAR-bundled native lib extraction at runtime
- Add Gradle maven-publish + signing config with Sonatype + in-memory GPG
- Add Gradle wrapper (8.12) for reproducible CI builds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@m96-chan m96-chan merged commit ec6fe46 into main Feb 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant