[Java] Add darwin-x64 native runtime support - #2429
Conversation
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Cross-SDK Consistency Review ✅This PR adds Intel macOS ( Why no other SDKs need updating: The changes are entirely Java-specific infrastructure:
The Java SDK's native runtime bundling model (using platform classifiers and Maven profiles to ship the Copilot CLI binary) is unique to the JVM ecosystem. The other SDKs (Node.js, Python, Go, .NET, Rust) use different mechanisms to locate the CLI and do not have an equivalent "native bundling" layer that would need a matching No action needed in other SDK implementations.
|
There was a problem hiding this comment.
Pull request overview
Adds Intel macOS native runtime support to the Java SDK.
Changes:
- Adds
darwin-x64packaging, host validation, and tests. - Extends CI and local publication validation.
- Documents Intel macOS support.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/java-sdk-tests.yml |
Adds Intel macOS testing and publication validation. |
java/README.md |
Documents darwin-x64 support. |
java/copilot-native/pom.xml |
Packages and attaches the classifier. |
java/copilot-native/scripts/fetch-native.test.mjs |
Tests fetching behavior. |
java/copilot-native/scripts/validate-local-publication.mjs |
Requires the classifier in local publications. |
java/copilot-native/scripts/validate-native-artifact.test.mjs |
Tests classifier artifacts. |
java/copilot-native/scripts/validate-native-host.mjs |
Validates Intel macOS hosts. |
java/copilot-native/scripts/validate-native-host.test.mjs |
Tests host validation. |
java/docs/adr/adr-007-native-bundling-strategy.md |
Updates platform and publication scope. |
java/sdk/pom.xml |
Selects the classifier on Intel macOS. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Balanced
| The platform detector recognizes the 8 classifiers listed in this ADR. The Maven build binds native packaging only for a host matching an implemented classifier. Linux x64 and ARM64 glibc hosts can opt in with `copilot.native.libc=glibc`, while Windows x64, Windows ARM64, Intel macOS, and Apple Silicon macOS hosts package `win32-x64`, `win32-arm64`, `darwin-x64`, or `darwin-arm64` automatically. The `inprocess` test profile selects the matching implemented classifier automatically on all six hosts. Every path validates the host before downloading or packaging native files. Linux musl and other unsupported hosts build only the OS-neutral placeholder, sources, and Javadoc artifacts unless they explicitly request in-process tests, which fail during host validation. Additional classifier artifacts remain follow-up work. | ||
|
|
||
| Maven Central release and snapshot workflows build each classifier on its matching native host from the same immutable source. The Linux ARM64, Windows x64, Windows ARM64, and macOS jobs each upload only their verified classifier and checksum manifest. The Ubuntu x64 job verifies and attaches all four, builds `linux-x64` with the glibc opt-in, and performs the only Maven deployment. Release signing therefore covers the neutral artifacts and all five classifiers in one deployment. | ||
| Maven Central release and snapshot workflows build each classifier on its matching native host from the same immutable source. The Linux ARM64, Windows x64, Windows ARM64, Intel macOS, and Apple Silicon macOS jobs each upload only their verified classifier and checksum manifest. The Ubuntu x64 job verifies and attaches all five, builds `linux-x64` with the glibc opt-in, and performs the only Maven deployment. Release signing therefore covers the neutral artifacts and all six classifiers in one deployment. |
Adds Intel macOS support to Java native runtime packaging and in-process testing, following the existing per-platform classifier model.
Packaging
darwin-x64Maven profiles.@github/copilot-darwin-x64runtime classifier.darwin-x64in publication assembly and completeness validation.Validation
CI and documentation
darwin-x64to thejava-sdk-inprocessmatrix usingmacos-15-intel.